@ -42,7 +42,7 @@ namespace Engine { namespace { // unnamed
bool DetermineGameHooks ( ) // 7/19/2015
{
#if 0 // jichi 7/19/2015: Disabled as it will crash the game
if ( IthFind File( L " UE3ShaderCompileWorker.exe " ) & & IthFind File( L " awesomium_process.exe " ) ) {
if ( Util: : Check File( L " UE3ShaderCompileWorker.exe " ) & & Util: : Check File( L " awesomium_process.exe " ) ) {
InsertLovaGameHook ( ) ;
return true ;
}
@ -58,23 +58,23 @@ bool DeterminePCEngine()
return true ;
}
if ( IthFind File( L " PPSSPP*.exe " ) ) { // jichi 7/12/2014 PPSSPPWindows.exe, PPSSPPEX.exe PPSSPPSP.exe
if ( Util: : Check File( L " PPSSPP*.exe " ) ) { // jichi 7/12/2014 PPSSPPWindows.exe, PPSSPPEX.exe PPSSPPSP.exe
InsertPPSSPPHooks ( ) ;
return true ;
}
if ( IthFind File( L " pcsx2*.exe " ) ) { // jichi 7/19/2014 PCSX2.exe or PCSX2WX.exe
if ( Util: : Check File( L " pcsx2*.exe " ) ) { // jichi 7/19/2014 PCSX2.exe or PCSX2WX.exe
InsertPCSX2Hooks ( ) ;
return true ;
}
if ( IthFind File( L " Dolphin.exe " ) ) { // jichi 7/20/2014
if ( Util: : Check File( L " Dolphin.exe " ) ) { // jichi 7/20/2014
InsertGCHooks ( ) ;
return true ;
}
// jichi 5/14/2015: Skip hijacking BALDRSKY ZEROs
if ( Ith CheckFile( L " bsz_Data \\ Mono \\ mono.dll " ) | | Ith CheckFile( L " bsz2_Data \\ Mono \\ mono.dll " ) ) {
if ( Util: : CheckFile( L " bsz_Data \\ Mono \\ mono.dll " ) | | Util: : CheckFile( L " bsz2_Data \\ Mono \\ mono.dll " ) ) {
ConsoleOutput ( " vnreng: IGNORE BALDRSKY ZEROs " ) ;
return true ;
}
@ -96,12 +96,12 @@ bool DeterminePCEngine()
bool DetermineEngineByFile1 ( )
{
if ( IthFind File( L " *.xp3 " ) | | Util : : SearchResourceString ( L " TVP(KIRIKIRI) " ) ) {
if ( Util: : Check File( L " *.xp3 " ) | | Util : : SearchResourceString ( L " TVP(KIRIKIRI) " ) ) {
if ( Util : : SearchResourceString ( L " TVP(KIRIKIRI) Z " ) ) { // TVP(KIRIKIRI) Z CORE
// jichi 11/24/2014: Disabled that might crash VBH
//if ( Ith CheckFile(L"plugin\\KAGParser.dll"))
//if ( Util:: CheckFile(L"plugin\\KAGParser.dll"))
// InsertKAGParserHook();
//else if ( Ith CheckFile(L"plugin\\KAGParserEx.dll"))
//else if ( Util:: CheckFile(L"plugin\\KAGParserEx.dll"))
// InsertKAGParserExHook();
if ( InsertKiriKiriZHook ( ) )
return true ;
@ -120,89 +120,89 @@ bool DetermineEngineByFile1()
InsertSideBHook ( ) ;
return true ;
}
if ( IthFindFile( L " bgi.* " ) | | IthFind File( L " sysgrp.arc " ) ) {
if ( Util: : CheckFile ( L " bgi.* " ) | | Util : : Check File( L " sysgrp.arc " ) ) {
InsertBGIHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " Bootup.dat " ) & & InsertBootupHook ( ) ) // 5/22/2015 Bootup
if ( Util: : CheckFile( L " Bootup.dat " ) & & InsertBootupHook ( ) ) // 5/22/2015 Bootup
// lstrlenW can also find text with repetition though
return true ;
if ( Ith CheckFile( L " AGERC.DLL " ) ) { // 6/1/2014 jichi: Eushully, AGE.EXE
if ( Util: : CheckFile( L " AGERC.DLL " ) ) { // 6/1/2014 jichi: Eushully, AGE.EXE
InsertEushullyHook ( ) ;
return true ;
}
if ( IthFind File( L " data*.arc " ) & & IthFind File( L " stream*.arc " ) ) {
if ( Util: : Check File( L " data*.arc " ) & & Util: : Check File( L " stream*.arc " ) ) {
InsertMajiroHook ( ) ;
return true ;
}
// jichi 5/31/2014
if ( // Ith CheckFile(L"Silkys.exe") || // It might or might not have Silkys.exe
if ( // Util:: CheckFile(L"Silkys.exe") || // It might or might not have Silkys.exe
// data, effect, layer, mes, music
Ith CheckFile( L " data.arc " ) & & Ith CheckFile( L " effect.arc " ) & & Ith CheckFile( L " mes.arc " ) ) {
Util: : CheckFile( L " data.arc " ) & & Util: : CheckFile( L " effect.arc " ) & & Util: : CheckFile( L " mes.arc " ) ) {
InsertElfHook ( ) ;
return true ;
}
// jichi 6/9/2015: Skip Silkys Sakura
if ( // Almost the same as Silkys except mes.arc is replaced by Script.arc
Ith CheckFile( L " data.arc " ) & & Ith CheckFile( L " effect.arc " ) & & Ith CheckFile( L " Script.arc " ) ) {
Util: : CheckFile( L " data.arc " ) & & Util: : CheckFile( L " effect.arc " ) & & Util: : CheckFile( L " Script.arc " ) ) {
InsertSilkysHook ( ) ;
return true ;
}
if ( IthFind File( L " data \\ pack \\ *.cpz " ) ) {
if ( Util: : Check File( L " data \\ pack \\ *.cpz " ) ) {
InsertCMVSHook ( ) ;
return true ;
}
// jichi 10/12/2013: Restore wolf engine
// jichi 10/18/2013: Check for data/*.wolf
if ( IthFind File( L " data.wolf " ) | | IthFind File( L " data \\ *.wolf " ) ) {
if ( Util: : Check File( L " data.wolf " ) | | Util: : Check File( L " data \\ *.wolf " ) ) {
InsertWolfHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " AdvData \\ DAT \\ NAMES.DAT " ) ) {
if ( Util: : CheckFile( L " AdvData \\ DAT \\ NAMES.DAT " ) ) {
InsertCircusHook1 ( ) ;
return true ;
}
if ( Ith CheckFile( L " AdvData \\ GRP \\ NAMES.DAT " ) ) {
if ( Util: : CheckFile( L " AdvData \\ GRP \\ NAMES.DAT " ) ) {
InsertCircusHook2 ( ) ;
return true ;
}
if ( IthFindFile( L " *.noa " ) | | IthFind File( L " data \\ *.noa " ) ) {
if ( Util: : CheckFile ( L " *.noa " ) | | Util : : Check File( L " data \\ *.noa " ) ) {
InsertCotophaHook ( ) ;
return true ;
}
if ( IthFind File( L " *.pfs " ) ) { // jichi 10/1/2013
if ( Util: : Check File( L " *.pfs " ) ) { // jichi 10/1/2013
InsertArtemisHook ( ) ;
return true ;
}
if ( IthFind File( L " *.int " ) ) {
if ( Util: : Check File( L " *.int " ) ) {
InsertCatSystemHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " message.dat " ) ) {
if ( Util: : CheckFile( L " message.dat " ) ) {
InsertAtelierHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " Check.mdx " ) ) { // jichi 4/1/2014: AUGame
if ( Util: : CheckFile( L " Check.mdx " ) ) { // jichi 4/1/2014: AUGame
InsertTencoHook ( ) ;
return true ;
}
// jichi 12/25/2013: It may or may not be QLIE.
// AlterEgo also has GameData/sound.pack but is not QLIE
if ( IthFind File( L " GameData \\ *.pack " ) & & InsertQLIEHook ( ) )
if ( Util: : Check File( L " GameData \\ *.pack " ) & & InsertQLIEHook ( ) )
return true ;
if ( Ith CheckFile( L " dll \\ Pal.dll " ) ) {
if ( Util: : CheckFile( L " dll \\ Pal.dll " ) ) {
InsertPalHook ( ) ;
return true ;
}
if ( IthFind File( L " *.pac " ) ) {
if ( Util: : Check File( L " *.pac " ) ) {
// jichi 6/3/2014: AMUSE CRAFT and SOFTPAL
// Selectively insert, so that lstrlenA can still get correct text if failed
//if ( IthCheckFile(L"dll\\resource.dll") && Ith CheckFile(L"dll\\pal.dll") && InsertAmuseCraftHook())
//if ( Util::CheckFile(L"dll\\resource.dll") && Util:: CheckFile(L"dll\\pal.dll") && InsertAmuseCraftHook())
// return true;
if ( Ith CheckFile( L " Thumbnail.pac " ) ) {
if ( Util: : CheckFile( L " Thumbnail.pac " ) ) {
//ConsoleOutput("vnreng: IGNORE NeXAS");
InsertNeXASHook ( ) ; // jichi 7/6/2014: GIGA
return true ;
@ -214,23 +214,23 @@ bool DetermineEngineByFile1()
}
}
// jichi 12/27/2014: LunaSoft
if ( IthFind File( L " Pac \\ *.pac " ) ) {
if ( Util: : Check File( L " Pac \\ *.pac " ) ) {
InsertLunaSoftHook ( ) ;
return true ;
}
// jichi 9/16/2013: Add Gesen18
if ( IthFindFile( L " *.szs " ) | | IthFind File( L " Data \\ *.szs " ) ) {
if ( Util: : CheckFile ( L " *.szs " ) | | Util : : Check File( L " Data \\ *.szs " ) ) {
InsertUnicornHook ( ) ;
return true ;
}
// jichi 12/22/2013: Add rejet
if ( Ith CheckFile( L " gd.dat " ) & & Ith CheckFile( L " pf.dat " ) & & Ith CheckFile( L " sd.dat " ) ) {
if ( Util: : CheckFile( L " gd.dat " ) & & Util: : CheckFile( L " pf.dat " ) & & Util: : CheckFile( L " sd.dat " ) ) {
InsertRejetHook ( ) ;
return true ;
}
// Only examined with version 1.0
//if ( IthFind File(L"Adobe AIR\\Versions\\*\\Adobe AIR.dll")) { // jichi 4/15/2014: FIXME: Wildcard not working
if ( Ith CheckFile( L " Adobe AIR \\ Versions \\ 1.0 \\ Adobe AIR.dll " ) ) { // jichi 4/15/2014: Adobe AIR
//if ( Util::Check File(L"Adobe AIR\\Versions\\*\\Adobe AIR.dll")) { // jichi 4/15/2014: FIXME: Wildcard not working
if ( Util: : CheckFile( L " Adobe AIR \\ Versions \\ 1.0 \\ Adobe AIR.dll " ) ) { // jichi 4/15/2014: Adobe AIR
InsertAdobeAirHook ( ) ;
return true ;
}
@ -239,51 +239,51 @@ bool DetermineEngineByFile1()
bool DetermineEngineByFile2 ( )
{
if ( Ith CheckFile( L " resident.dll " ) ) {
if ( Util: : CheckFile( L " resident.dll " ) ) {
InsertRetouchHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " Malie.ini " ) | | Ith CheckFile( L " Malie.exe " ) ) { // jichi: 9/9/2014: Add malie.exe in case malie.ini is missing
if ( Util: : CheckFile( L " Malie.ini " ) | | Util: : CheckFile( L " Malie.exe " ) ) { // jichi: 9/9/2014: Add malie.exe in case malie.ini is missing
InsertMalieHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " live.dll " ) ) {
if ( Util: : CheckFile( L " live.dll " ) ) {
InsertLiveHook ( ) ;
return true ;
}
// 9/5/2013 jichi
if ( Ith CheckFile( L " aInfo.db " ) ) {
if ( Util: : CheckFile( L " aInfo.db " ) ) {
InsertNextonHook ( ) ;
return true ;
}
if ( IthFind File( L " *.lpk " ) ) {
if ( Util: : Check File( L " *.lpk " ) ) {
InsertLucifenHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " cfg.pak " ) ) {
if ( Util: : CheckFile( L " cfg.pak " ) ) {
InsertWaffleHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " Arc00.dat " ) ) {
if ( Util: : CheckFile( L " Arc00.dat " ) ) {
InsertTinkerBellHook ( ) ;
return true ;
}
if ( IthFind File( L " *.vfs " ) ) { // jichi 7/6/2014: Better to test AoiLib.dll? ja.wikipedia.org/wiki/ソフトハウスキャラ
if ( Util: : Check File( L " *.vfs " ) ) { // jichi 7/6/2014: Better to test AoiLib.dll? ja.wikipedia.org/wiki/ソフトハウスキャラ
InsertSystemAoiHook ( ) ;
return true ;
}
if ( IthFind File( L " *.mbl " ) ) {
if ( Util: : Check File( L " *.mbl " ) ) {
InsertMBLHook ( ) ;
return true ;
}
// jichi 8/1/2014: YU-RIS engine, lots of clockup game also has this pattern
if ( IthFind File( L " pac \\ *.ypf " ) | | IthFind File( L " *.ypf " ) ) {
if ( Util: : Check File( L " pac \\ *.ypf " ) | | Util: : Check File( L " *.ypf " ) ) {
// jichi 8/14/2013: CLOCLUP: "ノーブレスオブリージュ" would crash the game.
if ( ! Ith CheckFile( L " noblesse.exe " ) )
if ( ! Util: : CheckFile( L " noblesse.exe " ) )
InsertYurisHook ( ) ;
return true ;
}
if ( IthFind File( L " *.npa " ) ) {
if ( Util: : Check File( L " *.npa " ) ) {
InsertNitroplusHook ( ) ;
return true ;
}
@ -292,7 +292,7 @@ bool DetermineEngineByFile2()
bool DetermineEngineByFile3 ( )
{
//if ( Ith CheckFile(L"libscr.dll")) { // already checked
//if ( Util:: CheckFile(L"libscr.dll")) { // already checked
// InsertBrunsHook();
// return true;
//}
@ -304,48 +304,48 @@ bool DetermineEngineByFile3()
// -loadpath
// .
// am.cfg
if ( Ith CheckFile( L " args.txt " ) ) {
if ( Util: : CheckFile( L " args.txt " ) ) {
InsertBrunsHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " emecfg.ecf " ) ) {
if ( Util: : CheckFile( L " emecfg.ecf " ) ) {
InsertEMEHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " rrecfg.rcf " ) ) {
if ( Util: : CheckFile( L " rrecfg.rcf " ) ) {
InsertRREHook ( ) ;
return true ;
}
if ( IthFindFile( L " *.fpk " ) | | IthFind File( L " data \\ *.fpk " ) ) {
if ( Util: : CheckFile ( L " *.fpk " ) | | Util : : Check File( L " data \\ *.fpk " ) ) {
InsertCandyHook ( ) ;
return true ;
}
if ( IthFind File( L " arc.a* " ) ) {
if ( Util: : Check File( L " arc.a* " ) ) {
InsertApricoTHook ( ) ;
return true ;
}
if ( IthFind File( L " *.mpk " ) ) {
if ( Util: : Check File( L " *.mpk " ) ) {
InsertStuffScriptHook ( ) ;
return true ;
}
if ( IthFind File( L " USRDIR \\ *.mpk " ) ) { // jichi 12/2/2014
if ( Util: : Check File( L " USRDIR \\ *.mpk " ) ) { // jichi 12/2/2014
InsertStuffScriptHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " Execle.exe " ) ) {
if ( Util: : CheckFile( L " Execle.exe " ) ) {
InsertTriangleHook ( ) ;
return true ;
}
// jichi 2/28/2015: No longer work for "大正×対称アリス episode I" from Primula
//if ( Ith CheckFile(L"PSetup.exe")) {
//if ( Util:: CheckFile(L"PSetup.exe")) {
// InsertPensilHook();
// return true;
//}
if ( Ith CheckFile( L " Yanesdk.dll " ) ) {
if ( Util: : CheckFile( L " Yanesdk.dll " ) ) {
InsertAB2TryHook ( ) ;
return true ;
}
if ( IthFind File( L " *.med " ) ) {
if ( Util: : Check File( L " *.med " ) ) {
InsertMEDHook ( ) ;
return true ;
}
@ -354,57 +354,57 @@ bool DetermineEngineByFile3()
bool DetermineEngineByFile4 ( )
{
if ( Ith CheckFile( L " EAGLS.dll " ) ) { // jichi 3/24/2014: E.A.G.L.S
if ( Util: : CheckFile( L " EAGLS.dll " ) ) { // jichi 3/24/2014: E.A.G.L.S
//ConsoleOutput("vnreng: IGNORE EAGLS");
InsertEaglsHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " bmp.pak " ) & & Ith CheckFile( L " dsetup.dll " ) ) {
if ( Util: : CheckFile( L " bmp.pak " ) & & Util: : CheckFile( L " dsetup.dll " ) ) {
// 1/1/2016 jich: skip izumo4 from studio ego that is not supported by debonosu
if ( IthFind File( L " *izumo4*.exe " ) ) {
if ( Util: : Check File( L " *izumo4*.exe " ) ) {
PcHooks : : hookLstrFunctions ( ) ;
return true ;
}
InsertDebonosuHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " C4.EXE " ) | | Ith CheckFile( L " XEX.EXE " ) ) {
if ( Util: : CheckFile( L " C4.EXE " ) | | Util: : CheckFile( L " XEX.EXE " ) ) {
InsertC4Hook ( ) ;
return true ;
}
if ( Ith CheckFile( L " Rio.arc " ) & & IthFind File( L " Chip*.arc " ) ) {
if ( Util: : CheckFile( L " Rio.arc " ) & & Util: : Check File( L " Chip*.arc " ) ) {
InsertWillPlusHook ( ) ;
return true ;
}
if ( IthFind File( L " *.tac " ) ) {
if ( Util: : Check File( L " *.tac " ) ) {
InsertTanukiHook ( ) ;
return true ;
}
if ( IthFind File( L " *.gxp " ) ) {
if ( Util: : Check File( L " *.gxp " ) ) {
InsertGXPHook ( ) ;
return true ;
}
if ( IthFind File( L " *.aos " ) ) { // jichi 4/2/2014: AOS hook
if ( Util: : Check File( L " *.aos " ) ) { // jichi 4/2/2014: AOS hook
InsertAOSHook ( ) ;
return true ;
}
if ( IthFind File( L " *.at2 " ) ) { // jichi 12/23/2014: Mink, sample files: voice.at2, voice.det, voice.nme
if ( Util: : Check File( L " *.at2 " ) ) { // jichi 12/23/2014: Mink, sample files: voice.at2, voice.det, voice.nme
InsertMinkHook ( ) ;
return true ;
}
if ( IthFind File( L " *.ykc " ) ) { // jichi 7/15/2014: YukaSystem1 is not supported, though
if ( Util: : Check File( L " *.ykc " ) ) { // jichi 7/15/2014: YukaSystem1 is not supported, though
//ConsoleOutput("vnreng: IGNORE YKC:Feng/HookSoft(SMEE)");
InsertYukaSystem2Hook ( ) ;
return true ;
}
if ( IthFind File( L " model \\ *.hed " ) ) { // jichi 9/8/2014: EXP
if ( Util: : Check File( L " model \\ *.hed " ) ) { // jichi 9/8/2014: EXP
InsertExpHook ( ) ;
return true ;
}
// jichi 2/6/2015 平安亭
// dPi.dat, dPih.dat, dSc.dat, dSch.dat, dSo.dat, dSoh.dat, dSy.dat
//if ( Ith CheckFile(L"dSoh.dat")) { // no idea why this file does not work
if ( Ith CheckFile( L " dSch.dat " ) ) {
//if ( Util:: CheckFile(L"dSoh.dat")) { // no idea why this file does not work
if ( Util: : CheckFile( L " dSch.dat " ) ) {
InsertSyuntadaHook ( ) ;
return true ;
}
@ -414,7 +414,7 @@ bool DetermineEngineByFile4()
// - PSetup.exe no longer exists
// - MovieTexture.dll information shows MovieTex dynamic library, copyright Pensil 2013
// - ta_trial.exe information shows 2XT - Primula Adventure Engine
if ( Ith CheckFile( L " PSetup.exe " ) | | IthFind File( L " PENCIL.* " ) | | Util : : SearchResourceString ( L " 2XT - " ) ) {
if ( Util: : CheckFile( L " PSetup.exe " ) | | Util: : Check File( L " PENCIL.* " ) | | Util : : SearchResourceString ( L " 2XT - " ) ) {
InsertPensilHook ( ) ;
return true ;
}
@ -427,7 +427,7 @@ bool DetermineEngineByProcessName()
wcscpy ( str , process_name_ ) ;
_wcslwr ( str ) ; // lower case
if ( wcsstr ( str , L " reallive " ) | | Ith CheckFile( L " Reallive.exe " ) | | Ith CheckFile( L " REALLIVEDATA \\ Start.ini " ) ) {
if ( wcsstr ( str , L " reallive " ) | | Util: : CheckFile( L " Reallive.exe " ) | | Util: : CheckFile( L " REALLIVEDATA \\ Start.ini " ) ) {
InsertRealliveHook ( ) ;
return true ;
}
@ -439,39 +439,39 @@ bool DetermineEngineByProcessName()
//}
// jichi 8/17/2013: Handle "~"
if ( wcsstr ( str , L " siglusengine " ) | | ! wcsncmp ( str , L " siglus~ " , 7 ) | | Ith CheckFile( L " SiglusEngine.exe " ) ) {
if ( wcsstr ( str , L " siglusengine " ) | | ! wcsncmp ( str , L " siglus~ " , 7 ) | | Util: : CheckFile( L " SiglusEngine.exe " ) ) {
InsertSiglusHook ( ) ;
return true ;
}
if ( wcsstr ( str , L " taskforce2 " ) | | ! wcsncmp ( str , L " taskfo~ " , 7 ) | | Ith CheckFile( L " Taskforce2.exe " ) ) {
if ( wcsstr ( str , L " taskforce2 " ) | | ! wcsncmp ( str , L " taskfo~ " , 7 ) | | Util: : CheckFile( L " Taskforce2.exe " ) ) {
InsertTaskforce2Hook ( ) ;
return true ;
}
if ( wcsstr ( str , L " rugp " ) | | Ith CheckFile( L " rugp.exe " ) ) {
if ( wcsstr ( str , L " rugp " ) | | Util: : CheckFile( L " rugp.exe " ) ) {
InsertRUGPHook ( ) ;
return true ;
}
// jichi 8/17/2013: Handle "~"
if ( wcsstr ( str , L " igs_sample " ) | | ! wcsncmp ( str , L " igs_sa~ " , 7 ) | | Ith CheckFile( L " igs_sample.exe " ) ) {
if ( wcsstr ( str , L " igs_sample " ) | | ! wcsncmp ( str , L " igs_sa~ " , 7 ) | | Util: : CheckFile( L " igs_sample.exe " ) ) {
InsertIronGameSystemHook ( ) ;
return true ;
}
if ( wcsstr ( str , L " bruns " ) | | Ith CheckFile( L " bruns.exe " ) ) {
if ( wcsstr ( str , L " bruns " ) | | Util: : CheckFile( L " bruns.exe " ) ) {
InsertBrunsHook ( ) ;
return true ;
}
if ( wcsstr ( str , L " anex86 " ) | | Ith CheckFile( L " anex86.exe " ) ) {
if ( wcsstr ( str , L " anex86 " ) | | Util: : CheckFile( L " anex86.exe " ) ) {
InsertAnex86Hook ( ) ;
return true ;
}
// jichi 8/17/2013: Handle "~"
if ( wcsstr ( str , L " shinydays " ) | | ! wcsncmp ( str , L " shinyd~ " , 7 ) | | Ith CheckFile( L " ShinyDays.exe " ) ) {
if ( wcsstr ( str , L " shinydays " ) | | ! wcsncmp ( str , L " shinyd~ " , 7 ) | | Util: : CheckFile( L " ShinyDays.exe " ) ) {
InsertShinyDaysGameHook ( ) ;
return true ;
}
@ -483,7 +483,7 @@ bool DetermineEngineByProcessName()
// return true;
//}
if ( wcsstr ( process_name_ , L " SAISYS " ) | | Ith CheckFile( L " SaiSys.exe " ) ) { // jichi 4/19/2014: Marine Heart
if ( wcsstr ( process_name_ , L " SAISYS " ) | | Util: : CheckFile( L " SaiSys.exe " ) ) { // jichi 4/19/2014: Marine Heart
InsertMarineHeartHook ( ) ;
return true ;
}
@ -492,7 +492,7 @@ bool DetermineEngineByProcessName()
// jichi 8/24/2013: Checking for Rio.ini or $procname.ini
//wcscpy(str+len-4, L"_?.war");
//if ( IthFind File(str)) {
//if ( Util::Check File(str)) {
// InsertShinaHook();
// return true;
//}
@ -504,22 +504,22 @@ bool DetermineEngineByProcessName()
str [ len - 2 ] = L ' i ' ;
str [ len - 1 ] = L ' n ' ;
str [ len ] = 0 ;
if ( ( IthCheckFile( str ) | | Ith CheckFile( L " trial.bin " ) ) // jichi 7/8/2014: add trial.bin
if ( ( Util: : CheckFile ( str ) | | Util : : CheckFile( L " trial.bin " ) ) // jichi 7/8/2014: add trial.bin
& & InsertCaramelBoxHook ( ) )
return true ;
// jichi 7/23/2015 It also has gameexe.bin existed
if ( Ith CheckFile( L " configure.cfg " ) & & Ith CheckFile( L " gfx.bin " ) ) {
if ( Util: : CheckFile( L " configure.cfg " ) & & Util: : CheckFile( L " gfx.bin " ) ) {
InsertEscudeHook ( ) ;
return true ;
}
// This must appear at last since str is modified
wcscpy ( str + len - 4 , L " _checksum.exe " ) ;
if ( Ith CheckFile( str ) ) {
if ( Util: : CheckFile( str ) ) {
InsertRyokuchaHook ( ) ;
if ( IthFind File( L " *.iar " ) & & IthFind File( L " *.sec5 " ) ) // jichi 9/27/2014: For new Ryokucha games
if ( Util: : Check File( L " *.iar " ) & & Util: : Check File( L " *.sec5 " ) ) // jichi 9/27/2014: For new Ryokucha games
InsertScenarioPlayerHook ( ) ;
return true ;
}
@ -533,12 +533,12 @@ bool DetermineEngineOther()
return true ;
// jichi 1/19/2015: Disable inserting Lstr for System40
// See: http://sakuradite.com/topic/618
if ( Ith CheckFile( L " System40.ini " ) ) {
if ( Util: : CheckFile( L " System40.ini " ) ) {
ConsoleOutput ( " vnreng: IGNORE old System40.ini " ) ;
return true ;
}
// jichi 12/26/2013: Add this after alicehook
if ( Ith CheckFile( L " AliceStart.ini " ) ) {
if ( Util: : CheckFile( L " AliceStart.ini " ) ) {
InsertSystem43Hook ( ) ;
return true ;
}
@ -556,7 +556,8 @@ bool DetermineEngineOther()
name [ len ] = L ' x ' ;
name [ len + 1 ] = L ' e ' ;
name [ len + 2 ] = 0 ;
if ( IthCheckFile ( name ) ) {
if ( Util : : CheckFile ( name ) ) {
sizeof ( FILE_BOTH_DIR_INFORMATION ) ;
name [ len - 2 ] = L ' * ' ;
name [ len - 1 ] = 0 ;
wcscpy ( static_search_name , name ) ;
@ -586,37 +587,37 @@ bool DetermineEngineOther()
// Put the patterns that might break other games at last
bool DetermineEngineAtLast ( )
{
if ( Ith CheckFile( L " MovieTexture.dll " ) & & ( InsertPensilHook ( ) | | Insert2RMHook ( ) ) ) // MovieTexture.dll also exists in 2RM games such as 母子愛2体験版, which is checked first
if ( Util: : CheckFile( L " MovieTexture.dll " ) & & ( InsertPensilHook ( ) | | Insert2RMHook ( ) ) ) // MovieTexture.dll also exists in 2RM games such as 母子愛2体験版, which is checked first
return true ;
if ( IthFind File( L " system " ) & & IthFind File( L " system.dat " ) ) { // jichi 7/31/2015
if ( Util: : Check File( L " system " ) & & Util: : Check File( L " system.dat " ) ) { // jichi 7/31/2015
InsertAbelHook ( ) ;
return true ;
}
if ( IthFind File( L " data \\ *.cpk " ) ) { // jichi 12/2/2014
if ( Util: : Check File( L " data \\ *.cpk " ) ) { // jichi 12/2/2014
Insert5pbHook ( ) ;
return true ;
}
// jichi 7/6/2014: named as ScenarioPlayer since resource string could be: scenario player program for xxx
// Do this at last as it is common
if ( IthFind File( L " *.iar " ) & & IthFind File( L " *.sec5 " ) ) { // jichi 4/18/2014: Other game engine could also have *.iar such as Ryokucha
if ( Util: : Check File( L " *.iar " ) & & Util: : Check File( L " *.sec5 " ) ) { // jichi 4/18/2014: Other game engine could also have *.iar such as Ryokucha
InsertScenarioPlayerHook ( ) ;
return true ;
}
//if ( IthCheckFile(L"arc0.dat") && Ith CheckFile(L"script.dat") // jichi 11/14/2014: too common
//if ( Util::CheckFile(L"arc0.dat") && Util:: CheckFile(L"script.dat") // jichi 11/14/2014: too common
if ( Util : : SearchResourceString ( L " HorkEye " ) ) { // appear in copyright: Copyright (C) HorkEye, http://horkeye.com
InsertHorkEyeHook ( ) ;
return true ;
}
if ( Ith CheckFile( L " comnArc.arc " ) // jichi 8/17/2014: this file might exist in multiple files
if ( Util: : CheckFile( L " comnArc.arc " ) // jichi 8/17/2014: this file might exist in multiple files
& & InsertNexton1Hook ( ) ) // old nexton game
return true ;
if ( Ith CheckFile( L " arc.dat " ) // jichi 9/27/2014: too common
if ( Util: : CheckFile( L " arc.dat " ) // jichi 9/27/2014: too common
& & InsertApricoTHook ( ) )
return true ;
if ( IthFind File( L " *.pak " ) // jichi 12/25/2014: too common
if ( Util: : Check File( L " *.pak " ) // jichi 12/25/2014: too common
& & InsertLeafHook ( ) )
return true ;
if ( IthFind File( L " *.dat " ) // mireado 08/22/2016: too common
if ( Util: : Check File( L " *.dat " ) // mireado 08/22/2016: too common
& & InsertNekopackHook ( ) )
return true ;
// jichi 10/31/2014
@ -629,14 +630,14 @@ bool DetermineEngineAtLast()
InsertAdobeFlash10Hook ( ) ; // only v10 might be supported. Otherwise, fallback to Lstr hooks
return true ;
}
if ( IthFind File( L " dat \\ *.arc " ) ) { // jichi 2/6/2015
if ( Util: : Check File( L " dat \\ *.arc " ) ) { // jichi 2/6/2015
InsertFocasLensHook ( ) ; // Touhou
return true ;
}
// jichi 8/23/2015: Tamamo
if ( Ith CheckFile( L " data.pck " ) & & Ith CheckFile( L " image.pck " ) & & Ith CheckFile( L " script.pck " ) ) {
//if ( Ith CheckFile(L"QtGui.dll"))
if ( Util: : CheckFile( L " data.pck " ) & & Util: : CheckFile( L " image.pck " ) & & Util: : CheckFile( L " script.pck " ) ) {
//if ( Util:: CheckFile(L"QtGui.dll"))
InsertTamamoHook ( ) ;
return true ;
}
@ -649,14 +650,14 @@ bool DetermineEngineGeneric()
{
bool ret = false ;
if ( Ith CheckFile( L " AlterEgo.exe " ) ) {
if ( Util: : CheckFile( L " AlterEgo.exe " ) ) {
ConsoleOutput ( " vnreng: AlterEgo, INSERT WideChar hooks " ) ;
ret = true ;
} else if ( IthFind File( L " data \\ Sky \\ * " ) ) {
} else if ( Util: : Check File( L " data \\ Sky \\ * " ) ) {
ConsoleOutput ( " vnreng: TEATIME, INSERT WideChar hooks " ) ;
ret = true ;
}
//} else if ( IthFindFile(L"image\\*.po2") || IthFind File(L"image\\*.jo2")) {
//} else if ( Util::CheckFile(L"image\\*.po2") || Util::Check File(L"image\\*.jo2")) {
// ConsoleOutput("vnreng: HarukaKanata, INSERT WideChar hooks"); // はるかかなた
// ret = true;
//}
@ -667,85 +668,85 @@ bool DetermineEngineGeneric()
bool DetermineNoEngine ( )
{
//if ( IthFind File(L"*\\Managed\\UnityEngine.dll")) { // jichi 12/3/2013: Unity (BALDRSKY ZERO)
//if ( Util::Check File(L"*\\Managed\\UnityEngine.dll")) { // jichi 12/3/2013: Unity (BALDRSKY ZERO)
// ConsoleOutput("vnreng: IGNORE Unity");
// return true;
//}
//if ( IthCheckFile(L"bsz_Data\\Managed\\UnityEngine.dll") || Ith CheckFile(L"bsz2_Data\\Managed\\UnityEngine.dll")) {
//if ( Util::CheckFile(L"bsz_Data\\Managed\\UnityEngine.dll") || Util:: CheckFile(L"bsz2_Data\\Managed\\UnityEngine.dll")) {
// ConsoleOutput("vnreng: IGNORE Unity");
// return true;
//}
// jichi 6/7/2015: RPGMaker v3
if ( IthFind File( L " *.rgss3a " ) ) {
if ( Util: : Check File( L " *.rgss3a " ) ) {
ConsoleOutput ( " vnreng: IGNORE RPGMaker RGSS3 " ) ;
return true ;
}
// jichi 11/22/2015: 凍京NECRO 体験版
if ( IthFind File( L " *.npk " ) ) {
if ( Util: : Check File( L " *.npk " ) ) {
ConsoleOutput ( " vnreng: IGNORE new Nitroplus " ) ;
return true ;
}
// 8/29/2015 jichi: minori, text in GetGlyphOutlineA
if ( IthFind File( L " *.paz " ) ) {
if ( Util: : Check File( L " *.paz " ) ) {
ConsoleOutput ( " vnreng: IGNORE minori " ) ;
return true ;
}
// 7/28/2015 jichi: Favorite games
if ( IthFind File( L " *.hcb " ) ) {
if ( Util: : Check File( L " *.hcb " ) ) {
ConsoleOutput ( " vnreng: IGNORE FVP " ) ;
return true ;
}
// jichi 2/14/2015: Guilty+ R I N × S E N (PK)
if ( Ith CheckFile( L " rio.ini " ) | | IthFind File( L " *.war " ) ) {
if ( Util: : CheckFile( L " rio.ini " ) | | Util: : Check File( L " *.war " ) ) {
ConsoleOutput ( " vnreng: IGNORE unknown ShinaRio " ) ;
return true ;
}
if ( Ith CheckFile( L " AdvHD.exe " ) | | Ith CheckFile( L " AdvHD.dll " ) ) {
if ( Util: : CheckFile( L " AdvHD.exe " ) | | Util: : CheckFile( L " AdvHD.dll " ) ) {
ConsoleOutput ( " vnreng: IGNORE Adv Player HD " ) ; // supposed to be WillPlus
return true ;
}
if ( Ith CheckFile( L " ScrPlayer.exe " ) ) {
if ( Util: : CheckFile( L " ScrPlayer.exe " ) ) {
ConsoleOutput ( " vnreng: IGNORE ScrPlayer " ) ;
return true ;
}
if ( Ith CheckFile( L " nnnConfig2.exe " ) ) {
if ( Util: : CheckFile( L " nnnConfig2.exe " ) ) {
ConsoleOutput ( " vnreng: IGNORE Nya NNNConfig " ) ;
return true ;
}
// jichi 4/30/2015: Skip games made from らすこう, such as とある人妻のネトラレ事情
// It has garbage from lstrlenW. Correct text is supposed to be in TabbedTextOutA.
if ( Ith CheckFile( L " data_cg.dpm " ) ) {
if ( Util: : CheckFile( L " data_cg.dpm " ) ) {
ConsoleOutput ( " vnreng: IGNORE DPM data_cg.dpm " ) ;
return true ;
}
//if ( Ith CheckFile(L"AGERC.DLL")) { // jichi 3/17/2014: Eushully, AGE.EXE
//if ( Util:: CheckFile(L"AGERC.DLL")) { // jichi 3/17/2014: Eushully, AGE.EXE
// ConsoleOutput("vnreng: IGNORE Eushully");
// return true;
//}
if ( Ith CheckFile( L " game_sys.exe " ) ) {
if ( Util: : CheckFile( L " game_sys.exe " ) ) {
ConsoleOutput ( " vnreng: IGNORE Atelier Kaguya BY/TH " ) ;
return true ;
}
if ( IthFind File( L " *.bsa " ) ) {
if ( Util: : Check File( L " *.bsa " ) ) {
ConsoleOutput ( " vnreng: IGNORE Bishop " ) ;
return true ;
}
// jichi 3/19/2014: Escude game
// Example: bgm.bin gfx.bin maou.bin script.bin snd.bin voc.bin
if ( Ith CheckFile( L " gfx.bin " ) & & Ith CheckFile( L " snd.bin " ) & & Ith CheckFile( L " voc.bin " ) ) {
if ( Util: : CheckFile( L " gfx.bin " ) & & Util: : CheckFile( L " snd.bin " ) & & Util: : CheckFile( L " voc.bin " ) ) {
ConsoleOutput ( " vnreng: IGNORE Escude " ) ;
return true ;
}
@ -764,12 +765,12 @@ bool DetermineNoEngine()
return true ;
}
if ( Ith CheckFile( L " MovieTexture.dll " ) ) {
if ( Util: : CheckFile( L " MovieTexture.dll " ) ) {
ConsoleOutput ( " vnreng: IGNORE MovieTexture " ) ;
return true ;
}
if ( wcsstr ( process_name_ , L " lcsebody " ) | | ! wcsncmp ( process_name_ , L " lcsebo~ " , 7 ) | | IthFind File( L " lcsebody* " ) ) { // jichi 3/19/2014: LC-ScriptEngine, GetGlyphOutlineA
if ( wcsstr ( process_name_ , L " lcsebody " ) | | ! wcsncmp ( process_name_ , L " lcsebo~ " , 7 ) | | Util: : Check File( L " lcsebody* " ) ) { // jichi 3/19/2014: LC-ScriptEngine, GetGlyphOutlineA
ConsoleOutput ( " vnreng: IGNORE lcsebody " ) ;
return true ;
}
@ -783,7 +784,7 @@ bool DetermineNoEngine()
}
* ( DWORD * ) ( str + i + 1 ) = 0x630068 ; //.hcb
* ( DWORD * ) ( str + i + 3 ) = 0x62 ;
if ( Ith CheckFile( str ) ) {
if ( Util: : CheckFile( str ) ) {
ConsoleOutput ( " vnreng: IGNORE FVP " ) ; // jichi 10/3/2013: such like アトリエかぐや
return true ;
}