From ea3161160694aecd4c087491b7ac86e783c3fd7a Mon Sep 17 00:00:00 2001 From: Elliot Nunn Date: Mon, 20 Sep 2021 09:25:08 +0800 Subject: [PATCH] Flattener: lea detection --- FlattenSegmentedMacAppForDisassembler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FlattenSegmentedMacAppForDisassembler.py b/FlattenSegmentedMacAppForDisassembler.py index 2d62cb6..8bdd808 100755 --- a/FlattenSegmentedMacAppForDisassembler.py +++ b/FlattenSegmentedMacAppForDisassembler.py @@ -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)