From a05ed2351c331d26facf1e7500e27fc6e53d0dba 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: Tue, 9 Jul 2024 23:49:59 +0800 Subject: [PATCH] erogos --- LunaHook/CMakeLists.txt | 2 +- LunaHook/engine32/Erogos.cpp | 14 ++++++++++++++ LunaHook/engine32/Erogos.h | 12 ++++++++++++ LunaHook/enginecollection32.cpp | 6 ++++-- LunaHook/texthook.cc | 14 ++++++++++++++ 5 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 LunaHook/engine32/Erogos.cpp create mode 100644 LunaHook/engine32/Erogos.h diff --git a/LunaHook/CMakeLists.txt b/LunaHook/CMakeLists.txt index 24b6b11..49bab4f 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 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 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/Erogos.cpp b/LunaHook/engine32/Erogos.cpp new file mode 100644 index 0000000..a02e1b3 --- /dev/null +++ b/LunaHook/engine32/Erogos.cpp @@ -0,0 +1,14 @@ +#include"Erogos.h" +//らぶフェチ ~マゾ編~ +//らぶフェチ~千聡編~ + +bool Erogos::attach_function() { + + HookParam hp; + hp.address = (DWORD)TextOutA; + hp.type=USING_STRING|USING_SPLIT; + hp.split=get_stack(4); + hp.offset=get_stack(4); + hp.length_offset=5; + return NewHook(hp, "Erogos"); +} \ No newline at end of file diff --git a/LunaHook/engine32/Erogos.h b/LunaHook/engine32/Erogos.h new file mode 100644 index 0000000..1f4e566 --- /dev/null +++ b/LunaHook/engine32/Erogos.h @@ -0,0 +1,12 @@ + + +class Erogos:public ENGINE{ + public: + Erogos(){ + + check_by=CHECK_BY::FILE_ALL; + check_by_target=check_by_list{L"ags.exe",L"bg.dat",L"bgm.dat",L"mov.dat",L"script.dat",L"voice.dat"}; + is_engine_certain=false; + }; + bool attach_function(); +}; \ No newline at end of file diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index 213b081..7430766 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -93,6 +93,7 @@ #include"engine32/Nijyuei.h" #include"engine32/MBLMED.h" #include"engine32/NNNConfig.h" +#include"engine32/Erogos.h" #include"engine32/godot.h" #include"engine32/Yuris.h" #include"engine32/Nitroplus.h" @@ -341,7 +342,8 @@ std::vector check_engines(){ new lua51, new GuruGuruSMF4, new A98SYS, - new godot + new godot, + new Erogos }; } @@ -392,7 +394,7 @@ std::vector unsafe_check_atlast(){ new ShinaRio, new Suika2, new KISS, - new EntisGLS, + new EntisGLS }; } \ No newline at end of file diff --git a/LunaHook/texthook.cc b/LunaHook/texthook.cc index 3c662cc..e7751c6 100644 --- a/LunaHook/texthook.cc +++ b/LunaHook/texthook.cc @@ -185,6 +185,19 @@ bool checklengthembedable(const HookParam&hp,size_t size){ } return size>len; } +bool commonfilter(void* data, size_t* len, HookParam* hp){ + + if(hp->type & CODEC_UTF16); + else if(hp->type & CODEC_UTF32); + else if(hp->type & CODEC_UTF8); + else{ + if(*len==2){ + StringFilter((char*)data,len,"\x81\xa4",2); + StringFilter((char*)data,len,"\x81\xa5",2); + } + } + return true; +} void TextHook::Send(uintptr_t lpDataBase) { auto buffer =(TextOutput_T*) local_buffer; @@ -294,6 +307,7 @@ void TextHook::Send(uintptr_t lpDataBase) } } } + if(!commonfilter(pbData, &lpCount, &hp) ||lpCount <= 0) __leave; if (hp.filter_fun && !hp.filter_fun(pbData, &lpCount, &hp) || lpCount <= 0) __leave; if (hp.type & (NO_CONTEXT | FIXING_SPLIT)) lpRetn = 0;