Flattener: lea detection

This commit is contained in:
Elliot Nunn 2021-09-20 09:25:08 +08:00
parent e434e16c75
commit ea31611606
1 changed files with 1 additions and 1 deletions

View File

@ -90,7 +90,7 @@ with open(args.dest + ".py", "w") as idascript:
interseg_calls = {}
for r in other_resources:
for i in range(0, len(r) - 3, 2):
if r[i : i + 2] in (b"\x4e\xad", b"\x48\x6d"):
if r[i : i + 2] in (b"\x4e\xad", b"\x48\x6d") or (r[i] == 0x41 and r[i + 1] & 0xF8 == 0xE8):
(targ,) = struct.unpack_from(">h", r, i + 2)
if targ > 0:
interseg_calls.setdefault(targ, []).append(addr(r.id) + i)