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

16 lines
493 B
C++

#include"SRPGStudio.h"
bool SRPGStudio::attach_function() {
//NAGINATA SOFT
//HERO'S PARTY R
//https://store.steampowered.com/app/1804020/HEROS_PARTY_R/
auto dll=GetModuleHandleW(L"OLEAUT32.dll");
if(dll==0)return 0;
auto addr=GetProcAddress(dll,"SysAllocString");
if(addr==0)return 0;
HookParam hp;
hp.address = (DWORD)addr;
hp.offset=get_stack(1);
hp.type = USING_STRING|CODEC_UTF16|EMBED_ABLE|EMBED_BEFORE_SIMPLE|EMBED_AFTER_NEW;
return NewHook(hp, "SRPGStudio");
}