0

Once any file has been compiled (exe, dll,...), only the operating system can understand its content. There are some known hexadecimal editors that allow opening and editing those files but it's such a hard work to modify (or even undertand) an exe (for example) with an hexadecimal editor.

Is there any app that 'decompile' compiled files obtaining a reasonably good (and specially understandable) result? I know about decompilers but it's also hard work to understand their output.

Any suggestions would be greatly appreciated

Thanks ;D

Antoni
  • 2,071
  • 2
  • 24
  • 31
  • What would be the point of decompiling it right after it's compiled? – Cole Tobin Oct 02 '13 at 13:15
  • Possible duplicate: [Is there a C++ decompiler?](http://stackoverflow.com/questions/205059/is-there-a-c-decompiler) – Paul R Oct 02 '13 at 13:16
  • Do you have a specific language in mind? exe files are not treated the same by Windows. – NoChance Oct 02 '13 at 13:20
  • There's no point of decompiling after it's compiled. I was just curious and didn't find any interesting thing in google so that's why I asked here. I was only trying to improve my knowledge. @Emmad Kareem I asked this not for a specific system but for a "general purpose". I was just curious if someone had worked with a decompiler which gave "great" results. – Antoni Oct 02 '13 at 14:07

1 Answers1

1

No, decompilers is your best option. (If there was something better than the existing ones, wouldn't that too be called a decompiler?)

The reason it is hard to understand the output from decompilers is that a lot of information is removed when the code is compiled. If the code was compiled in debug mode some of the information is retained. If the program was compiled with optimization the decompilation may differ a lot from the original code.

Klas Lindbäck
  • 33,105
  • 5
  • 57
  • 82
  • Even the asm would have changed that much? I imagine that obtaining a C source code from an exe file would be almost impossible but how about the asm? Compilers perform optimizations that change the original code but asm is more understandable than '0' and '1'. Perhaps disasembling rather than decompiling would be the point – Antoni Oct 02 '13 at 14:23
  • Getting the machine code disassembled is trivial. It's a bit harder to read than hand-coded assembler since it has no symbolic constants and no comments. Disassembling is decompiling to assembler code, so I would argue that it is a kind of decompiler. – Klas Lindbäck Oct 02 '13 at 14:41
  • 1
    Well-written assembler code tends to use macros for things like function preamble/postamble, accessing structs, system calls and other general purpose stuff - you won't get any of this back when you disassemble, just raw assembler source (and no comments of course!). – Paul R Oct 02 '13 at 15:08