mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-24 06:15:35 +08:00
17 lines
513 B
C++
17 lines
513 B
C++
#include"Xbangbang.h"
|
|
|
|
bool Xbangbang::attach_function() {
|
|
//さわさわ絵にっき
|
|
//さわさわ絵にっき2
|
|
bool ok=false;
|
|
for(auto addr:findiatcallormov_all((DWORD)GetTextExtentPoint32A,processStartAddress,processStartAddress,processStopAddress,PAGE_EXECUTE)){
|
|
addr = MemDbg::findEnclosingAlignedFunction(addr);
|
|
if (!addr) continue;
|
|
HookParam hp;
|
|
hp.address = addr;
|
|
hp.offset=get_stack(2);
|
|
hp.type=USING_STRING;
|
|
ok|=NewHook(hp, "Xbangbang");
|
|
}
|
|
return ok;
|
|
}
|