Hex-Rays v1.1 vs. v1.0 Decompiler Comparison Page
Below you will find side-by-side comparisons of v1.0 and v1.1 decompilations. Please maximize the window too see both columns simultaneously.
The following examples are displayed on this page:
- More aggressive variable elimination
- More for-loops
- Better recognition of 64-bit idioms
- Better recognition of 64-bit idioms, example 2
- Floating point instructions
- Better recognition of built-in functions
- More aggressive value propagation
- New algorithm to detect function arguments
- Implicit value propagation
NOTE: The new decompiler can use comparison instructions (and other clues) to determine possible variable values. In the example above, it is clear that the result variable is equal to zero within the if-block. This knowledge allows for more optimizations and makes the code more readable.
More aggressive variable elimination
We improved the decompiler engine to eliminate more variables. This means less useless assignments, shorter and more readable code.
For-loops are easier to read than while- or do-loops. The decompiler prefers to generate for loops now. Again, note the difference in size and readability!
Better recognition of 64-bit idioms
While we still do not recognize all 64-bit idioms (perfections is out of question in binary analysis) we do much better now. Above is just one of many possible examples (v10 on the left and v21 on the right are 64-bit variables.
Better recognition of 64-bit idioms, example 2
Yet one more illustration of 64-bit arithmetics.
Floating point instructions
One could say that this comparison is not fair and we would agree. Previous versions of the decompiler could not handle floating point instruction at all, and the new version knows all about them, including conversion intricacies and other subtle details.
Better recognition of built-in functions
While there is a lot to do, the new version copes better with inline memcpy(), strlen(), and similar functions.
More aggressive value propagation
Thanks to the more aggressive propagation algorithm, the output becomes simpler.
New algorithm to detect function arguments
We switched to a new heuristic algorithm to detect arguments of unknown function calls. While it is not perfect, it loses less arguments and tends to produce more reliable output. Please note that this algorithm is required to determine the types of only unknown calls: once the user specifies the function prototype, it will be used by the decompiler.