A decompiler, actually *attempts* to take the output of a compiler and produce readable (or at least compilable) source code. Because of the nature of compiling, it is quite unusual for it to succeed entirely.

However some languages don't compile "all the way" to machine code - notable examples are Java, .NET (C# and VB.Net etc) and some versions of VB (Not .NET)

These "bytecode" compiled languages are generally much easier to decompile, and produce much more legible results than stuff made in C and compiled to machine code.

However, that still doesn't necessarily mean the output of a decompiler is very legible, even if it's correct. You normally lose the names of local variables, and all the comments, so it can get quite confusing.

Additionally, "obfuscators" are available (for C# and Java anyway) which will rename variables and methods to make them shorter, remove debugging information (line numbers), and generally make life harder for the decompiler to do its work and a human to read the output. They're fairly effective.

Slarty