From 22472558c7a9fb5a3befd7cd5b9afbbb10d75c13 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: Wed, 17 Apr 2024 21:05:15 +0800 Subject: [PATCH] Update Eushully.cpp --- LunaHook/engine32/Eushully.cpp | 37 +++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/LunaHook/engine32/Eushully.cpp b/LunaHook/engine32/Eushully.cpp index f207649..d432efc 100644 --- a/LunaHook/engine32/Eushully.cpp +++ b/LunaHook/engine32/Eushully.cpp @@ -515,8 +515,43 @@ bool InsertEushullyHook() } return succ; } +namespace{ + //(18禁ゲーム)[200529][エウシュリー] 天冥のコンキスタ DL版 + bool TENMEI(){ + BYTE sig[]={ + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x0f,0x00,0x00,0x00, + 0xc6,0x45,XX,0x00, + 0xc6,0x45,XX,0x01, + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x00,0x00,0x00,0x00, + 0xc7,0x45,XX,0x0f,0x00,0x00,0x00, + 0xc6,0x45,XX,0x00, + 0xc6,0x45,XX,0x03, + }; + auto addr=MemDbg::findBytes(sig,sizeof(sig),processStartAddress,processStopAddress); + if(addr==0)return false; + addr=MemDbg::findEnclosingAlignedFunction(addr); + if(addr==0)return false; + HookParam hp; + hp.address = addr; + hp.type = USING_STRING|USING_SPLIT|NO_CONTEXT;//必须NO_CONTEXT否则被注音的字会被分开 + hp.offset = get_stack(5); + hp.split= get_stack(1); //name 80000000 各种所有text 0 + hp.filter_fun=[](void* data, size_t* len, HookParam* hp){ + StringFilter((char*)data,len,"\xf0\x40",2); + NewLineCharFilterA((char*)data,len,hp); + return true; + }; + return NewHook(hp, "TENMEI"); + } +} bool Eushully::attach_function() { - return InsertEushullyHook(); + return InsertEushullyHook()||TENMEI(); } \ No newline at end of file