TeethingRing

This commit is contained in:
恍兮惚兮 2024-06-05 16:02:28 +08:00
parent d30a9cfbd8
commit 50543f5b13
4 changed files with 72 additions and 2 deletions

View File

@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(enginepath "engine64")
set(collector "enginecollection64.cpp")
else()
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(enginessrc 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 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()

View File

@ -0,0 +1,57 @@
#include "TeethingRing.h"
bool TeethingRing::attach_function()
{
// https://vndb.org/v5635
// キミとボクとエデンの林檎
// HSF932#-C@85FB0:EDEN.exe
BYTE bytes[] = {
0x8B,0x0A,0x8B,0xC1,0x83,0xF8,0x20 ,
0x0F,0x8F,XX4,
0x0F,0x84,XX4,
0x48 ,
0xBE,0x0F,0x00,0x00,0x00,0x3B,0xC6 ,
0x77,XX,
};
auto addr=MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
if(addr==0)return false;
BYTE sehstart[]={
0x6a,0xff,
0x68,XX4,
0x64,0xa1,0,0,0,0
};
addr=reverseFindBytes(sehstart,sizeof(sehstart),addr-0x100,addr);
if(addr==0)return false;
HookParam hp;
hp.address = addr;//0x84C70+(DWORD)GetModuleHandle(0);
hp.type=USING_STRING|NO_CONTEXT|FULL_STRING;
hp.text_fun = [](hook_stack *stack, HookParam *hp, uintptr_t *data, uintptr_t *split, size_t *len)
{
auto _this = (void *)stack->THISCALLTHIS;
auto a2 = (DWORD *)stack->ARG1;
auto v2 = *a2;
if ((int)*a2 <= 32)
{
if (*a2 != 32)
{
switch (v2)
{
case 16:
auto v4 = (char *)(*(int(__thiscall **)(void *, DWORD))(*(DWORD *)_this + 60))(_this, a2[1]);
*data = (uintptr_t)v4;
*len = strlen(v4);
}
}
}
};
hp.filter_fun=[](void* data, size_t* len, HookParam* hp){
//#F【琉星】#F
if(all_ascii((char*)data,*len))return false;
auto str=std::string((char*)data,*len);
strReplace(str,"#F","");
return write_string_overwrite(data,len,str);
};
return NewHook(hp, "TeethingRing");
}

View File

@ -0,0 +1,11 @@
class TeethingRing:public ENGINE{
public:
TeethingRing(){
check_by=CHECK_BY::RESOURCE_STR;
check_by_target=L"TeethingRing";
};
bool attach_function();
};

View File

@ -56,6 +56,7 @@
#include"engine32/Circus2.h"
#include"engine32/Cotopha.h"
#include"engine32/Xbangbang.h"
#include"engine32/TeethingRing.h"
#include"engine32/Unknown.h"
#include"engine32/Artemis.h"
#include"engine32/CatSystem.h"
@ -333,7 +334,8 @@ std::vector<ENGINE*> check_engines(){
new VALKYRIA,
new CoffeeMaker,
new Fizz,
new CaramelBox2
new CaramelBox2,
new TeethingRing
};
}