ollydbg 中给dll 的所有导出函数下断点

ollydbg 非常的方便,好用。主要表现在界面舒服,然后就是可扩展性强,正因为这些优点,它已经流行了很多年。
因为一般好的应用模块化比较好,我们在逆向分析的时候往往有需要对一个dll的所有导出函数都下上断点,然后分析每个导出函数功能的时候很有帮助。
 
  
var ImageBase
var Pe
var Export
var ExportNum //导出函数个数
var ExportFunAddr //函数地址表
var Fun


mov ImageBase,10000000
mov Pe,[ImageBase+3c]
add Pe,ImageBase
mov Export,[Pe+78]
add Export,ImageBase
mov ExportNum,[Export+14] //函数个数




mov ExportFunAddr,[Export+1c] //函数地址RVA
add ExportFunAddr,ImageBase
BpBegin:


cmp ExportNum,0
je Exit
dec ExportNum
mov Fun,[ExportFunAddr]
add Fun,ImageBase
add ExportFunAddr,4
bp Fun
jmp BpBegin


Exit:
msg "运行完成"
ret

你可能感兴趣的:(逆向分析)