mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-30 23:14:12 +08:00
23 lines
476 B
C++
23 lines
476 B
C++
|
#include"Nijyuei.h"
|
||
|
|
||
|
|
||
|
bool Nijyuei::attach_function() {
|
||
|
//二重影
|
||
|
BYTE bytes[] = {
|
||
|
0xE8,XX4,
|
||
|
0x85,0xc0,
|
||
|
0x0f,0x85,XX4,
|
||
|
0x5f,0x5e,0x5d,0x5b,
|
||
|
0x81,0xC4,0x0C,0x01,0x00,0x00,
|
||
|
0xC3
|
||
|
|
||
|
};
|
||
|
auto addr=MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
|
||
|
if(addr==0)return false;
|
||
|
|
||
|
HookParam hp;
|
||
|
hp.address = addr+5;
|
||
|
hp.type = USING_STRING;
|
||
|
hp.offset=get_reg(regs::edx);
|
||
|
return NewHook(hp, "Nijyuei");
|
||
|
}
|