Reading disassembled code

2019-07-19 01:53发布

问题:

I wrote simple Hello word program with masm32. But then when I try to disassemble it with IDA and I am getting much bigger output (I won't write it there because it would take to much space). And I don't get it why it's different. How to run the disasembled code?

回答1:

This is normal. Compilation is a "lossy" process, which means that if you compile code and then decompile it, you're not guaranteed to get exactly the same thing out that you originally put in. The same thing applies to assembly language. When you assemble and link the code, it's a one-way process.

This is why programmers save the original source code, rather than just trying to decompile their binaries when they want to fix bugs.