keypatch icon indicating copy to clipboard operation
keypatch copied to clipboard

Excessive IDA analysis

Open n-o-o-n opened this issue 8 years ago • 2 comments

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).

n-o-o-n avatar Jan 30 '18 12:01 n-o-o-n

Does your technique works for pre-v7?

aquynh avatar Jan 30 '18 12:01 aquynh

I didn't try with pre-v7 versions, sorry.

n-o-o-n avatar Jan 30 '18 12:01 n-o-o-n