diff --git a/LunaHook/CMakeLists.txt b/LunaHook/CMakeLists.txt index 2ea1c73..b383970 100644 --- a/LunaHook/CMakeLists.txt +++ b/LunaHook/CMakeLists.txt @@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(enginepath "engine64") set(collector "enginecollection64.cpp") else() - set(enginessrc RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY Erogos godot A98SYS GuruGuruSMF4 TeethingRing Fizz CoffeeMaker VALKYRIA mirage CisLugI tamasoft FrontWing solfasys Diskdream splushwave ransel akatombo GASTRO GSX Aksys ScrPlayer SYSD KISS IGScript Jellyfish BKEngine Overflow SRPGStudio Suika2 FVP LCScript Ohgetsu RPGMakerRGSS3 ONScripterru OVERDRIVE HXP Palette Purple Ruf RUNE Tarte Tomato Sakuradog Troy VitaminSoft Unknown TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono pchooks PONScripter Bishop sakanagl Lightvn KiriKiri SideB BGI Bootup morning shyakunage Regista NNNConfig Eushully Majiro littlecheese Elf Silkys CMVS Wolf Circus1 Circus2 Cotopha Artemis CatSystem Atelier Tenco QLIE Pal AIL2 NeXAS LunaSoft Unicorn Rejet Interlude AdobeAir Retouch Malie Live Nexton Lucifen Waffle TinkerBell SystemAoi Yuris Nitroplus2 Bruns EME RRE Candy Speed ApricoT Triangle AB2Try MBLMED GameMaker DxLib CodeX Minori Sprite RpgmXP Eagls Debonosu C4 WillPlus Tanuki GXP AOS Mink YukaSystem2 sakusesu Exp Syuntada Pensil Anim hibiki Nitroplus Reallive Siglus Taskforce2 RUGP IronGameSystem Anex86 ShinyDaysGame MarineHeart ShinaRio CaramelBox UnisonShift Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT) + set(enginessrc AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY Erogos godot A98SYS GuruGuruSMF4 TeethingRing Fizz CoffeeMaker VALKYRIA mirage CisLugI tamasoft FrontWing solfasys Diskdream splushwave ransel akatombo GASTRO GSX Aksys ScrPlayer SYSD KISS IGScript Jellyfish BKEngine Overflow SRPGStudio Suika2 FVP LCScript Ohgetsu RPGMakerRGSS3 ONScripterru OVERDRIVE HXP Palette Purple Ruf RUNE Tarte Tomato Sakuradog Troy VitaminSoft Unknown TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono pchooks PONScripter Bishop sakanagl Lightvn KiriKiri SideB BGI Bootup morning shyakunage Regista NNNConfig Eushully Majiro littlecheese Elf Silkys CMVS Wolf Circus1 Circus2 Cotopha Artemis CatSystem Atelier Tenco QLIE Pal AIL2 NeXAS LunaSoft Unicorn Rejet Interlude AdobeAir Retouch Malie Live Nexton Lucifen Waffle TinkerBell SystemAoi Yuris Nitroplus2 Bruns EME RRE Candy Speed ApricoT Triangle AB2Try MBLMED GameMaker DxLib CodeX Minori Sprite RpgmXP Eagls Debonosu C4 WillPlus Tanuki GXP AOS Mink YukaSystem2 sakusesu Exp Syuntada Pensil Anim hibiki Nitroplus Reallive Siglus Taskforce2 RUGP IronGameSystem Anex86 ShinyDaysGame MarineHeart ShinaRio CaramelBox UnisonShift Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT) set(enginepath "engine32") set(collector "enginecollection32.cpp") endif() diff --git a/LunaHook/engine32/AksysGames.cpp b/LunaHook/engine32/AksysGames.cpp new file mode 100644 index 0000000..c9c30f5 --- /dev/null +++ b/LunaHook/engine32/AksysGames.cpp @@ -0,0 +1,77 @@ +#include "AksysGames.h" + +bool AksysGames::attach_function() +{ + + const BYTE bytes[] = { + /* + v8 = *v2; + if ( *v2 == (char)0x80 ) + { + ++v2; + ++v5; + goto LABEL_26; + } + v9 = 0; + v17 = v7; + v15 = v2; + v10 = v6; + if ( (unsigned __int8)v8 >= 0x81u && (unsigned __int8)v8 <= 0x9Fu + || (unsigned __int8)v8 >= 0xE0u && (unsigned __int8)v8 <= 0xFCu ) + { + */ + /* + .text:004BCB70 mov cl, [eax] + .text:004BCB72 cmp cl, 80h ; '€' + .text:004BCB75 jz loc_4BCC76 + .text:004BCB7B xor esi, esi + .text:004BCB7D mov [ebp+var_20C], edi + .text:004BCB83 mov [ebp+var_214], eax + .text:004BCB89 mov ebx, edx + .text:004BCB8B test edi, edi + .text:004BCB8D jz short loc_4BCBE3 + .text:004BCB8F cmp cl, 81h + .text:004BCB92 jb short loc_4BCB99 + .text:004BCB94 cmp cl, 9Fh + .text:004BCB97 jbe short loc_4BCBA3 + .text:004BCB99 + .text:004BCB99 loc_4BCB99: ; CODE XREF: sub_4BCB20+72↑j + .text:004BCB99 cmp cl, 0E0h + .text:004BCB9C jb short loc_4BCBC3 + .text:004BCB9E cmp cl, 0FCh + .text:004BCBA1 ja short loc_4BCBC3 + */ + //clang-format off + 0x8a, 0x08, + 0x80, 0xf9, 0x80, + 0x0f, 0x84, XX4, + 0x33, 0xf6, + 0x89, XX, XX4, + 0x89, XX, XX4, + 0x8b, 0xda, + 0x85, 0xff, + 0x74, XX, + 0x80, 0xf9, 0x81, + 0x72, XX, + 0x80, 0xf9, 0x9f, + 0x76, XX, + 0x80, 0xf9, 0xe0, + 0x72, XX, + 0x80, 0xf9, 0xfc, + 0x77, XX, + //clang-format on + }; + + ULONG range = min(processStopAddress - processStartAddress, MAX_REL_ADDR); + ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStartAddress + range); + if (!addr) + return false; + addr = findfuncstart(addr, 0x100, true); + if (!addr) + return false; + HookParam hp; + hp.address = addr; + hp.offset = get_stack(1); + hp.type = USING_STRING; + return NewHook(hp, "AksysGames"); +} \ No newline at end of file diff --git a/LunaHook/engine32/AksysGames.h b/LunaHook/engine32/AksysGames.h new file mode 100644 index 0000000..4606e41 --- /dev/null +++ b/LunaHook/engine32/AksysGames.h @@ -0,0 +1,42 @@ +// https://store.steampowered.com/app/828380/Death_Mark_Vol1/ +// Death Mark Vol.1 - 死印之迷雾 +/* +FILEVERSION 1,0,0,0 +PRODUCTVERSION 1,0,0,0 +FILEFLAGSMASK 0x3F +FILEFLAGS 0x0 +FILEOS VOS_NT_WINDOWS32 +FILETYPE VFT_APP +FILESUBTYPE 0x0 +{ + BLOCK "StringFileInfo" + { + BLOCK "041104b0" + { + VALUE "FileVersion", "1.0.0.0" + VALUE "InternalName", "Death Mark.exe" + VALUE "LegalCopyright", "©EXPERIENCE. Licensed to and published by Aksys Games." + VALUE "OriginalFilename", "Death Mark.exe" + VALUE "ProductName", "Death Mark" + VALUE "ProductVersion", "1.0.0.0" + } + } + BLOCK "VarFileInfo" + { + VALUE "Translation", 0x411, 1200 + } +} + +*/ +class AksysGames : public ENGINE +{ +public: + AksysGames() + { + + check_by = CHECK_BY::RESOURCE_STR; + check_by_target = L"Aksys Games"; + is_engine_certain = false; + }; + bool attach_function(); +}; \ No newline at end of file diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index 368c6ea..a746ee6 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -87,6 +87,7 @@ #include "engine32/Nexton.h" #include "engine32/Lucifen.h" #include "engine32/Waffle.h" +#include "engine32/AksysGames.h" #include "engine32/Sakuradog.h" #include "engine32/TinkerBell.h" #include "engine32/Jisatu101.h" @@ -405,6 +406,7 @@ std::vector check_engines() new TextXtra_x32, new Stronger, new RPGMaker, - new Aisystem6 + new Aisystem6, + new AksysGames }; } \ No newline at end of file