2024-11-02 15:49:09 +08:00
|
|
|
#include "akatombo.h"
|
2024-04-10 16:15:01 +08:00
|
|
|
|
2024-11-02 15:49:09 +08:00
|
|
|
bool akatombo::attach_function()
|
|
|
|
{
|
|
|
|
// サキュヴァス ~堕ちた天使~
|
|
|
|
// https://vndb.org/v7387
|
2024-04-10 16:15:01 +08:00
|
|
|
BYTE bytes[] = {
|
2024-11-02 15:49:09 +08:00
|
|
|
0x3C, 0x80, 0x72, XX, 0x3C, 0x9F, 0x76, XX, 0x3C, 0xE0, 0x72, XX, 0x3C, 0xEF, 0x77, XX};
|
2024-04-10 16:15:01 +08:00
|
|
|
auto addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
|
2024-11-02 15:49:09 +08:00
|
|
|
if (addr == 0)
|
|
|
|
return false;
|
|
|
|
addr = findfuncstart(addr, 0x200);
|
|
|
|
if (addr == 0)
|
|
|
|
return false;
|
2024-04-10 16:15:01 +08:00
|
|
|
HookParam hp;
|
|
|
|
hp.address = addr;
|
2024-11-02 15:49:09 +08:00
|
|
|
hp.offset = get_stack(1);
|
|
|
|
hp.type = USING_STRING | EMBED_ABLE | EMBED_AFTER_NEW | EMBED_BEFORE_SIMPLE | EMBED_DYNA_SJIS;
|
|
|
|
return NewHook(hp, "akatombo");
|
|
|
|
}
|