mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-27 13:44:11 +08:00
26 lines
712 B
C++
26 lines
712 B
C++
#include"Sakuradog.h"
|
|
|
|
|
|
bool Sakuradog::attach_function() {
|
|
//綾瀬家のオンナ~淫華の血脈~
|
|
|
|
auto entry=Util::FindImportEntry(processStartAddress,(DWORD)GetGlyphOutlineA);
|
|
if(entry==0)return false;
|
|
BYTE bytes2[]={
|
|
0x57,
|
|
0x50,
|
|
0x6a,0x06,
|
|
0x56,
|
|
0x53,
|
|
0xff,0x15,XX4
|
|
};
|
|
memcpy(bytes2+sizeof(bytes2)-4,&entry,4);
|
|
auto addr = MemDbg::findBytes(bytes2, sizeof(bytes2), processStartAddress, processStopAddress);
|
|
if (addr == 0)return false;
|
|
HookParam hp;
|
|
hp.address = addr+6;
|
|
hp.offset=get_reg(regs::esi);
|
|
hp.split=0xe4;
|
|
hp.type = CODEC_ANSI_BE|USING_SPLIT|NO_CONTEXT ;
|
|
return NewHook(hp, "Sakuradog");
|
|
}
|