-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
handle negative hashes #3
Comments
add this function and replace all "parse_highlighted_value" with "extract_immediate_value":
|
The reason why we can't use this method is that we'd have to parse the microcode instead. The highlighted values could be optimized from multiple immediate values, they could also be registers, etc. |
it must be considered that the value of the hash is always a number and is taken from the disassembly window (even if it is selected from the decompilation window) and not from the decompilation window where, on the other hand, there may be more immediate values. I have tested it in many conditions and it seems to work. Could you please provide me with a particular use case that is not covered? Thanks. |
Currently we use
get_highlight
to pull the selected constant from IDA but this is an issue when the constant is negative. The negative sign is not highlighted in IDA so we don't grab it and misinterpret the constant as positive.This can be handled elegantly in the disassembly by checking the operands at the selected address for both negative and positive values of the selected constant to determine which one to use... however this doesn't really work when the value is selected in the pseudocode window.
TLDR Issue
When we use
get_highlight
in the pseudocode window to select a constant how can we match that constant with the actual value in the IDA microcode/pseudocode representation? This is my lack of understanding of how to manipulate the pseudocode from python... example code would be much appreciated 🙏The text was updated successfully, but these errors were encountered: