NOTE: these are just some selected examples that can be illustrated as a side-by-side difference. Hex-Rays Decompiler v1.2 includes are many other improvements and new features that are not mentioned on this page - simply because there was nothing to compare them with. Also, some improvements have already been illustrated in the previous comparisons. We continue to improve 64-bit arithmetics and inline function recognition, but the examples would somewhat repeat older stuff, so we did not include them. Please refer to the news page for more details.
Intrinsic functions
Intrinsic functions are generally superior to inline assembly and the above text shows it.
The decompiler can handle SSE scalar floating point instructions directly, without any need of intrinsic functions. Mac OS X users will appreciate this improvement very much because short SSE scalar sequences are very popular in Mach-O files.
While operations on packed values are difficult to decipher with and without intrinsic functions, there is still a side effect: the decompiler has more information about the data flows and unknown assembly instructions do not disrupt the analysis. See how the v6 temporary variable disappears.
The old version was producing a page of code, the new version - just one line.
Always a pleasure to have a shorter text: no intermediary variables, no inline assembly, just straightforward code.
signed int __cdecl casual(signed int arg0, int arg4){return (signed int)floor((double)arg0 + (double)(random() &0x7FFFFFFF) /2147483647.0* (double)(arg4 - arg0));}
The decompiler could recognize an unsigned conversion and represented in concisely. It looks surprising but the line on the right side is identical to the long text on the right side.