fix tinkerbell and add getstringtype and foldstring

This commit is contained in:
Akash Mozumdar 2020-02-29 18:32:58 -07:00
parent ffff4f2eb9
commit 0d4af5c140
4 changed files with 13 additions and 5 deletions

View File

@ -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);

View File

@ -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/

View File

@ -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/ソフトハウスキャラ

View File

@ -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);