LunaHook-mirror/LunaHook/engine32/jukujojidai.cpp
2024-02-07 20:59:24 +08:00

23 lines
636 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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");
}