From cefab6d691f704854ac489ed1c7cffa0f8151cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Sat, 1 Jun 2024 15:56:08 +0800 Subject: [PATCH] fizz --- LunaHook/CMakeLists.txt | 2 +- LunaHook/engine32/Fizz.cpp | 37 +++++++++++++++++++++++++++++++++ LunaHook/engine32/Fizz.h | 11 ++++++++++ LunaHook/enginecollection32.cpp | 4 +++- 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 LunaHook/engine32/Fizz.cpp create mode 100644 LunaHook/engine32/Fizz.h diff --git a/LunaHook/CMakeLists.txt b/LunaHook/CMakeLists.txt index b74bbc8..45edc14 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 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 lua51 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono pchooks PONScripter Bishop sakanagl Renpy 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 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 lua51 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono pchooks PONScripter Bishop sakanagl Renpy 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/Fizz.cpp b/LunaHook/engine32/Fizz.cpp new file mode 100644 index 0000000..ef1dfbe --- /dev/null +++ b/LunaHook/engine32/Fizz.cpp @@ -0,0 +1,37 @@ +#include"Fizz.h" + +bool Fizz::attach_function() { + //char __thiscall sub_59AA90(char *this, int a2, int a3, int a4, int a5, int a6, int a7, int a8, char a9) + //HB8@59AA90 + //https://vndb.org/v1380 + //さくらテイル + + const BYTE bytes[] = { + 0x55,0x8b,0xec, + 0x6a,0xff, + 0x68,XX4, + 0x64,0xa1,0,0,0,0, + 0x50, + 0x81,0xec,XX2,0,0, + 0xa1,XX4, + 0x33,0xc5, + 0x89,0x45,0xf0, + 0x50, + 0x8d,0x45,0xf4, + 0x64,0xa3,0,0,0,0, + 0x89,0x4d,XX, + 0xc7,0x45,XX,0,0,0,0, + 0xc7,0x45,XX,0,0,0,0, + 0x8d,0x4d,XX, + 0xe8,XX4, + + }; + ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress); + if (!addr) return false; + + HookParam hp; + hp.address = addr; + hp.offset=get_stack(2); + hp.type = USING_CHAR; + return NewHook(hp, "Fizz"); +} \ No newline at end of file diff --git a/LunaHook/engine32/Fizz.h b/LunaHook/engine32/Fizz.h new file mode 100644 index 0000000..947b059 --- /dev/null +++ b/LunaHook/engine32/Fizz.h @@ -0,0 +1,11 @@ + + +class Fizz:public ENGINE{ + public: + Fizz(){ + + check_by=CHECK_BY::FILE_ALL; + check_by_target=check_by_list{L"data.gsp",L"Image*.gsp",L"se.gsp",L"bgm*.gsp",L"voice/*.gsp"}; + }; + bool attach_function(); +}; \ No newline at end of file diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index 9052ee0..65152f3 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -19,6 +19,7 @@ #include"engine32/mirage.h" #include"engine32/Sprite.h" #include"engine32/PONScripter.h" +#include"engine32/Fizz.h" #include"engine32/Ruf.h" #include"engine32/SYSD.h" #include"engine32/Renpy.h" @@ -330,7 +331,8 @@ std::vector check_engines(){ new CisLugI, new mirage, new VALKYRIA, - new CoffeeMaker + new CoffeeMaker, + new Fizz }; }