LunaHook-mirror/LunaHook/engine32/jukujojidai.cpp

23 lines
636 B
C++
Raw Normal View History

2024-02-07 20:59:24 +08:00
#include"jukujojidai.h"
bool jukujojidai::attach_function() {
const BYTE bytes[] = {
//撫乳~今夜、あなたのお掃除しましょうか?
//https://vndb.org/v15867
0x41,
0x83,0xC0,0x20,
0x81,0xF9,0xC8,0x00,0x00,0x00,
0x7C
};
ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
if (addr == 0)return false;
addr = MemDbg::findEnclosingAlignedFunction(addr,0x1000);
if (addr == 0)return false;
HookParam hp;
hp.address = addr;
hp.offset=get_stack(1);
hp.type = CODEC_UTF16|DATA_INDIRECT;
return NewHook(hp, "jukujojidai");
}