-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MLIL doesn't properly infer _guard_dispatch_icall_nop
as taking rax as the first parameter.
#1760
Comments
It's actually calling |
Oh ok, I thought as the |
It would be nice if this could be improved upon since I believe Microsoft turns this option on by default in msvc for release builds. |
This will likely be dependent on #1606 as we would need a platform specific analysis pass. |
One quick hack to get this analyzing better would be to on the dynamic dispatch call changed click 'E' and edit the instruction to be |
_guard_dispatch_icall_nop
as taking rax as the first parameter.
The problem actually doesn't appear to have anything to do with HLIL. The MLIL layer isn't properly inferring the parameters. |
Fixed in 3.1.3731 which adds a new feature to translate these calls to a |
Current Windows PE files (from Microsoft, on x64) contain (most of the time) CFG constructs (like
_guard_dispatch_icall*
functions) that are replaced by the loader to invoke control flow guard protections.In current Binary Ninja versions (at least on the latest stable and 2.0.2201-dev) the CFG calls are not replaced by the targeted function, e.g.
which is translated to HLIL as:
The correct behavior would be to eliminate the guard call (which is just a
call rax
) and display it like:The following file can be used as an example that implements the CFG icall:
https://msdl.microsoft.com/download/symbols/ndiswan.sys/559f3aa835000/ndiswan.sys
NdisWanReadRegistry
(0x1c002fd65
)0x1c002fdff
(toRtlQueryRegistryValues@IAT
)The text was updated successfully, but these errors were encountered: