17 lines
513 B
C++
Raw Normal View History

2024-02-07 20:59:24 +08:00
#include"Xbangbang.h"
bool Xbangbang::attach_function() {
//さわさわ絵にっき
//さわさわ絵にっき2
bool ok=false;
2024-04-25 18:09:46 +08:00
for(auto addr:findiatcallormov_all((DWORD)GetTextExtentPoint32A,processStartAddress,processStartAddress,processStopAddress,PAGE_EXECUTE)){
2024-02-07 20:59:24 +08:00
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;
}