mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-27 05:34:14 +08:00
17 lines
465 B
C++
17 lines
465 B
C++
#include"Tomato.h"
|
|
bool Tomato::attach_function() {
|
|
//姫武者
|
|
bool ok=false;
|
|
for(auto addr:findiatcallormov_all((DWORD)TextOutA,processStartAddress,processStartAddress,processStopAddress,PAGE_EXECUTE)){
|
|
addr = MemDbg::findEnclosingAlignedFunction(addr);
|
|
if (!addr) continue;
|
|
HookParam hp;
|
|
hp.address = addr;
|
|
hp.offset=get_reg(regs::edx);
|
|
hp.type = DATA_INDIRECT;
|
|
hp.index = 0;
|
|
ok|=NewHook(hp, "Tomato");
|
|
}
|
|
return ok;
|
|
}
|
|
|