binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

HLIL simplification should leverage associative property of addition

Open xusheng6 opened this issue 1 year ago • 1 comments

6

var_10 is at stack offset -0x10, and column is at stack offset -0x24. So *(&var_10 + i - 0x14) really means column[i]. It seems that our analysis does not leverage the associative nature of addition

babymips.zip

xusheng6 avatar Apr 24 '24 01:04 xusheng6

This is the corresponding disassembly:

Screenshot 2024-05-07 at 10 24 31 PM

I have no idea why the compiler decides to calculate sp+0x20, and then minus 0x14 from it, instead of directly doing a sp+0xc

xusheng6 avatar May 07 '24 14:05 xusheng6

Closed in favor of https://github.com/Vector35/binaryninja-api/issues/5406

xusheng6 avatar May 14 '24 12:05 xusheng6