Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Hide code in Hex-Rays decompiled pseudo-code

This project demonstrates that relying on a decompiler isn't always a good idea. As I'll show, the generated pseudo-code might miss very important information.

In this example code, the resulting Hex-Rays decompiled pseudo-code doesn't show the invocation of function func_b, but if the code is executed the function is invoked.

The cause of the "problem" seems to be the CMOVcc instruction. However, I don't think this can be considered as a bug, but the Hex-Rays developers can think about this case as a possibility for improvement.

Tested on Hex-Rays decompiler v7.4.0.191112 (which for the record is an awesome product ^^)

Update

06/03/2020 - Rolf Rolles commented my reddit post, clarifying that this situation is correctly handled by Hex-Rays by specifying a custom calling convention: void *__usercall func_a<edi>(bool in<f>) for function func_a.

Video

Click the image below for a demo.

Hiding code from Hex-Rays decompilation pseudo-code