コード例 #1
0
ファイル: quicktime.py プロジェクト: IDA-RE-things/toolbag
def FindLastAssignment(ea, register):
    start,end = database.guessrange(ea)
    while ea > start:
        ea = database.prev(ea)
        m = idc.GetMnem(ea)
        r = idc.GetOpnd(ea, 0)

        if m == 'mov' and r == register:
            return ea
        continue
    
    raise ValueError('FindLastAssignment(0x%x, %s) Found no matches'% (ea, register))
コード例 #2
0
def FindLastAssignment(ea, register):
    start,end = database.guessrange(ea)
    while ea > start:
        ea = database.prev(ea)
        m = idc.GetMnem(ea)
        r = idc.GetOpnd(ea, 0)

        if m == 'mov' and r == register:
            return ea
        continue
    
    raise ValueError('FindLastAssignment(0x%x, %s) Found no matches'% (ea, register))