2024-02-07 20:59:24 +08:00
|
|
|
|
#include"IronGameSystem.h"
|
|
|
|
|
|
|
|
|
|
|
2024-05-13 17:59:25 +08:00
|
|
|
|
bool InsertIGSDynamicHook(LPVOID addr, hook_stack* ,uintptr_t frame, uintptr_t stack)
|
2024-02-07 20:59:24 +08:00
|
|
|
|
{
|
|
|
|
|
if (addr != GetGlyphOutlineW)
|
|
|
|
|
return false;
|
|
|
|
|
DWORD i;
|
|
|
|
|
i = *(DWORD *)frame;
|
|
|
|
|
i = *(DWORD *)(i+4);
|
|
|
|
|
//if (SafeFillRange(L"mscorlib.ni.dll", &j, &k)) { // Artikash 6/30/2018: Dunno why addresses are needed
|
|
|
|
|
while (*(BYTE *)i != 0xe8)
|
|
|
|
|
i++;
|
|
|
|
|
DWORD t = *(DWORD *)(i + 1) + i + 5;
|
|
|
|
|
//if (t>j && t<k) {
|
|
|
|
|
HookParam hp;
|
|
|
|
|
hp.address = t;
|
|
|
|
|
hp.offset=get_reg(regs::edx);
|
|
|
|
|
hp.split = get_reg(regs::esp);
|
|
|
|
|
hp.type = CODEC_UTF16|USING_SPLIT;
|
|
|
|
|
ConsoleOutput("INSERT IronGameSystem");
|
|
|
|
|
|
|
|
|
|
//ConsoleOutput("IGS - Please set text(ヂ<>ス<EFBFBD> display speed(表示速度) to fastest(瞬<>");
|
|
|
|
|
//RegisterEngineType(ENGINE_IGS);
|
|
|
|
|
return NewHook(hp, "IronGameSystem");
|
|
|
|
|
//}
|
|
|
|
|
//}
|
|
|
|
|
ConsoleOutput("IGS: failed");
|
|
|
|
|
return true; // jichi 12/25/2013: return true
|
|
|
|
|
}
|
|
|
|
|
void InsertIronGameSystemHook()
|
|
|
|
|
{
|
|
|
|
|
//ConsoleOutput("Probably IronGameSystem. Wait for text.");
|
|
|
|
|
trigger_fun = InsertIGSDynamicHook;
|
|
|
|
|
ConsoleOutput("TRIGGER IronGameSystem");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool IronGameSystem::attach_function() {
|
|
|
|
|
InsertIronGameSystemHook();
|
|
|
|
|
return true;
|
|
|
|
|
}
|