Log in

View Full Version : Some functions are neater than the decompiler thinks


Hex Blog
April 9th, 2008, 21:49
The decompiler makes some assumptions about the input code. Like that call instructions usually return, the memory model is flat, the function frame is set properly, etc. When these assumptions are correct, the output is good. When they are wrong, well, the output does not correspond to the input. Take, for example, the following snippet:

http://www.hexblog.com/decompilation/pix/spoils_callerasm.gif

The decompiler produces the following pseudocode:

http://www.hexblog.com/decompilation/pix/spoils_callerc1.gif

Apparently, the v3 variable (it corresponds to edx) is not initialized at all. Why?



http://hexblog.com/2008/04/some_functions_are_too_neat.html