Add more missed matches

This commit is contained in:
Léo Lam 2020-12-29 01:38:07 +01:00
parent 27196eb945
commit 81b1ec96bb
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
3 changed files with 219 additions and 212 deletions

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,9 @@ def main() -> None:
new_matches: Dict[int, str] = dict()
calls = fn_checker.get_possible_calls().copy()
for base_target, my_target in calls.items():
target_info = functions_by_addr[base_target]
target_info = functions_by_addr.get(base_target)
if target_info is None:
continue
if target_info.status != utils.FunctionStatus.NotDecompiled:
continue

View File

@ -70,6 +70,11 @@ class FunctionChecker:
reg = i1.operands[1].reg
if reg in adrp_pair_registers:
adrp_pair_registers.remove(reg)
elif i1.mnemonic == 'b':
branch_target = i1.operands[0].imm
if not (base_fn.addr <= branch_target < base_fn.addr + size):
if not self._check_function_call(i1, i2, branch_target, i2.operands[0].imm):
return False
continue
if i1.mnemonic != i2.mnemonic: