没有pbd情况下对dll的函数筛选

import idautils,idc,idaapi
a=[]
b=[]
for ea in idautils.XrefsTo(0x005FC45C,1):
    func=idaapi.get_func(ea.frm)
    #addr=ea.frm
    if func not in a:
        a.append(func)
for ea in idautils.XrefsTo(0x0045642D,1):
    func=idaapi.get_func(ea.frm)
    if func is not None and func not in b:
        b.append(func)
result=[]
for i in a:
    if i in b:
        if i.startEA not in result:
            try:
              cfunc=idaapi.decompile(i)
              if '(Handle, 4u, dword_532C98, AccessMode[0], &Object, 0);' in str(cfunc):
                  result.append(i.startEA)
            except:
              print 'decompile error when ',i    
print 'find %d results' %(len(result))
for i in result:print hex(i)
        

你可能感兴趣的:(没有pbd情况下对dll的函数筛选)