Function patch() takes a lot of time to analyze code in cases where a function has chunks at addresses lower than its start. I'm talking about this:
# ask IDA to re-analyze the patched area
if orig_func_end == idc.BADADDR:
# only analyze patched bytes, otherwise it would take a lot of time to re-analyze the whole binary
idaapi.analyze_area(address, address + patched_len + 1)
else:
idaapi.analyze_area(address, orig_func_end)
# try to fix IDA function re-analyze issue after patching
idaapi.func_setend(address, orig_func_end)
In IDA v7.0 is apparently enough to do only idaapi.analyze_area(address, address + patched_len + 1).
Function
patch()
takes a lot of time to analyze code in cases where a function has chunks at addresses lower than its start. I'm talking about this:In IDA v7.0 is apparently enough to do only
idaapi.analyze_area(address, address + patched_len + 1)
.