Ret Address Recorder
轉:http://old.xxxxx.im/viewthread.php?tid=25694
還是以前的名字比較好聽我覺得...
這個很好用的喔...稍微改一下還有很多用途...
這裡教了怎麼寫表跟查表...
還是以前的名字比較好聽我覺得...
這個很好用的喔...稍微改一下還有很多用途...
這裡教了怎麼寫表跟查表...
- // Ret Address Recorder
- // Auther: Inndy
- [ENABLE]
- Alloc(HookProc, 128)
- Label(LoopSearch)
- Label(Return)
- Label(AddToList)
- Alloc(EspList, 2048)
- Alloc(Count, 4)
- RegisterSymbol(HookProc)
- RegisterSymbol(EspList)
- RegisterSymbol(Count)
- HookProc:
- Pushad
- Mov Eax, [Esp+20]
- Cmp Eax, 00400000 // [Esp] 下限
- Jl Return
- Cmp Eax, 01000000 // [Esp] 上限
- Jg Return
- Mov Ebx, EspList
- Mov Ecx, [Count]
- Test Ecx, Ecx
- Je AddToList
- Dec Ecx
- LoopSearch:
- Cmp [Ebx+Ecx*4], Eax
- Je Return
- Test Ecx, Ecx
- Je AddToList
- Dec Ecx
- Jmp LoopSearch
- AddToList:
- Mov Ecx, [Count]
- Mov [Ebx+Ecx*4], Eax
- Inc [Count]
- Return:
- Popad
- // Orginal Code Here Please
- // Jump Back Here Please
- // {Address}:
- // Jmp HookProc
- [DISABLE]
- // Restore Hook Here Please
- Dealloc(HookProc)
- Dealloc(EspList)
- Dealloc(Count)
- UnregisterSymbol(HookProc)
- UnregisterSymbol(EspList)
- UnregisterSymbol(Count)
網址更新囉:http://old.xxxxx.im/viewthread.php?tid=25694
回覆刪除