From 3eedd0ec8dbf51f4cd637c1424e13ab60e8f2036 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, 16 Apr 2024 00:30:21 +0800 Subject: [PATCH] silkys --- LunaHook/engine32/Silkys.cpp | 31 +++++++++++++++++++++++++++++++ LunaHook/engine32/Silkys.h | 11 +++++++++++ LunaHook/enginecollection32.cpp | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/LunaHook/engine32/Silkys.cpp b/LunaHook/engine32/Silkys.cpp index c89c2aa..818cebe 100644 --- a/LunaHook/engine32/Silkys.cpp +++ b/LunaHook/engine32/Silkys.cpp @@ -550,4 +550,35 @@ bool Siglusold::attach_function(){ succ|= NewHook(hpref, "Siglusold_fast"); } return succ; +} + +bool Silkyssakura::attach_function(){ + auto addr=MemDbg::findCallerAddressAfterInt3((DWORD)GetGlyphOutlineW,processStartAddress,processStopAddress); + if(addr==0)return false; + HookParam hp; + hp.address=addr; + hp.offset=get_stack(3); + hp.split=get_stack(5); + hp.type=DATA_INDIRECT|USING_CHAR|USING_SPLIT|CODEC_UTF16; + + auto xrefs=findxref_reverse_checkcallop(addr,processStartAddress,processStopAddress,0xe8); + if(xrefs.size()==1){ + addr=MemDbg::findEnclosingAlignedFunction(xrefs[0]); + if(addr){ + xrefs=findxref_reverse_checkcallop(addr,processStartAddress,processStopAddress,0xe8); + if(xrefs.size()==1){ + addr=MemDbg::findEnclosingAlignedFunction(xrefs[0]); + if(addr){ + HookParam hp_embed; + hp_embed.address=addr; + hp_embed.offset=get_stack(2); + hp_embed.type=USING_STRING|EMBED_ABLE|EMBED_AFTER_NEW|EMBED_BEFORE_SIMPLE|CODEC_UTF16; + hp_embed.hook_font=F_GetGlyphOutlineW; + return NewHook(hp_embed,"embedSilkyssakura");//这个是分两层分别绘制文字和阴影,需要两个都内嵌。 + } + } + } + } + + return NewHook(hp,"Silkyssakura"); } \ No newline at end of file diff --git a/LunaHook/engine32/Silkys.h b/LunaHook/engine32/Silkys.h index ae6dd5b..5d0b5ac 100644 --- a/LunaHook/engine32/Silkys.h +++ b/LunaHook/engine32/Silkys.h @@ -32,3 +32,14 @@ class Siglusold:public ENGINE{ }; bool attach_function(); }; + + +class Silkyssakura:public ENGINE{ + public: + Silkyssakura(){ + //いれかわ お姉ちゃん、ぼくの身体でオナニーしちゃうの! + check_by=CHECK_BY::FILE; + check_by_target=L"pak\\data001.pak"; + }; + bool attach_function(); +}; diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index a05daeb..45630da 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -311,7 +311,8 @@ std::vector check_engines(){ new GSX, new GASTRO, new akatombo, - new ransel + new ransel, + new Silkyssakura }; }