diff --git a/texthook/engine/engine.cc b/texthook/engine/engine.cc index abf3c1f..726db04 100644 --- a/texthook/engine/engine.cc +++ b/texthook/engine/engine.cc @@ -6007,7 +6007,7 @@ void InsertWaffleHook() //ConsoleOutput("vnreng:WAFFLE: failed"); } -void InsertTinkerBellHook() +bool InsertTinkerBellHook() { //DWORD s1,s2,i; //DWORD ch=0x8141; @@ -6042,7 +6042,9 @@ void InsertTinkerBellHook() } } } + if (count) return true; ConsoleOutput("vnreng:TinkerBell: failed"); + return false; } // s1=SearchPattern(processStartAddress,processStopAddress-processStartAddress-4,&ch,4); diff --git a/texthook/engine/engine.h b/texthook/engine/engine.h index 0552b02..1d55603 100644 --- a/texthook/engine/engine.h +++ b/texthook/engine/engine.h @@ -171,7 +171,7 @@ void InsertLucifenHook(); // Lucifen@Navel: *.lpk void InsertRyokuchaHook(); // Ryokucha: _checksum.exe void InsertRealliveHook(); // RealLive: RealLive*.exe void InsertStuffScriptHook(); // Stuff: *.mpk -void InsertTinkerBellHook(); // TinkerBell: arc00.dat +bool InsertTinkerBellHook(); // TinkerBell: arc00.dat void InsertWaffleHook(); // WAFFLE: cg.pak // CIRCUS: avdata/ diff --git a/texthook/engine/match32.cc b/texthook/engine/match32.cc index 63b015d..9b54baf 100644 --- a/texthook/engine/match32.cc +++ b/texthook/engine/match32.cc @@ -273,8 +273,7 @@ bool DetermineEngineByFile2() InsertWaffleHook(); return true; } - if (Util::CheckFile(L"Arc00.dat")) { - InsertTinkerBellHook(); + if (Util::CheckFile(L"Arc00.dat") && InsertTinkerBellHook()) { return true; } if (Util::CheckFile(L"*.vfs")) { // jichi 7/6/2014: Better to test AoiLib.dll? ja.wikipedia.org/wiki/ソフトハウスキャラ diff --git a/texthook/engine/native/pchooks.cc b/texthook/engine/native/pchooks.cc index 77ca7e7..2069f13 100644 --- a/texthook/engine/native/pchooks.cc +++ b/texthook/engine/native/pchooks.cc @@ -279,11 +279,18 @@ void PcHooks::hookOtherPcFunctions() // _Out_opt_ LPBOOL lpUsedDefaultChar // ); - // 3/17/2014 jichi: Temporarily disabled + // 2/29/2020 Artikash: TODO: Sort out what to do for string comparison functions // http://sakuradite.com/topic/159 NEW_HOOK(L"kernel32.dll", MultiByteToWideChar, s_arg3, 0,4,0, USING_STRING, s_arg4 / arg_sz) NEW_HOOK(L"kernel32.dll", WideCharToMultiByte, s_arg3, 0,4,0, USING_UNICODE|USING_STRING, s_arg4 / arg_sz) + NEW_HOOK(L"kernel32.dll", GetStringTypeA, s_arg3, 0, 0, 0, USING_STRING, s_arg4 / arg_sz) + NEW_HOOK(L"kernel32.dll", GetStringTypeExA, s_arg3, 0, 0, 0, USING_STRING, s_arg4 / arg_sz) + NEW_HOOK(L"kernel32.dll", FoldStringA, s_arg2, 0, 0, 0, USING_STRING, s_arg3 / arg_sz) + NEW_HOOK(L"kernel32.dll", GetStringTypeW, s_arg2, 0, 0, 0, USING_UNICODE|USING_STRING, s_arg3 / arg_sz) + NEW_HOOK(L"kernel32.dll", GetStringTypeExW, s_arg3, 0, 0, 0, USING_UNICODE|USING_STRING, s_arg4 / arg_sz) + NEW_HOOK(L"kernel32.dll", FoldStringW, s_arg2, 0, 0, 0, USING_UNICODE|USING_STRING, s_arg3 / arg_sz) + NEW_HOOK(L"user32.dll", CharNextA, s_arg1, 0,0,0, USING_STRING|DATA_INDIRECT, 1) // LPTSTR WINAPI CharNext(_In_ LPCTSTR lpsz); NEW_HOOK(L"user32.dll", CharNextW, s_arg1, 0,0,0, USING_UNICODE|DATA_INDIRECT, 1) NEW_HOOK(L"user32.dll", CharPrevA, s_arg1, 0,0,0, USING_STRING|DATA_INDIRECT, 1) // LPTSTR WINAPI CharPrev(_In_ LPCTSTR lpszStart, _In_ LPCTSTR lpszCurrent);