This commit is contained in:
恍兮惚兮 2024-12-19 14:51:29 +08:00
parent 853f7e7fbe
commit 6182eaee36
8 changed files with 108 additions and 19 deletions

View File

@ -1,10 +1,29 @@
include_directories(. util engines) include_directories(. util engines)
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(enginessrc BGI MKXPZ Ryujinx livecaptions Kincaid vita3k rpcs3 yuzu TYPEMOON UnrealEngine AGES7 mono Godot 5pb lucasystem LightVN V8 Artemis KiriKiri YOX CMVS Suika2 ) set(enginessrc
BGI MKXPZ Ryujinx livecaptions Kincaid vita3k rpcs3 yuzu TYPEMOON UnrealEngine AGES7 mono
Godot 5pb lucasystem LightVN V8 Artemis KiriKiri YOX CMVS Suika2)
set(enginepath "engine64") set(enginepath "engine64")
set(collector "enginecollection64.cpp") set(collector "enginecollection64.cpp")
else() else()
set(enginessrc e_Erekiteru AbogadoPowers DAC BunBun antique T2U Moonstone Aromarie Winters Cage AGE_System AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY 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 UnknownEngine TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar jukujojidai VanillawareGC cef V8 mono 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 AIL 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
e_Erekiteru AbogadoPowers DAC BunBun antique T2U Moonstone Aromarie Winters Cage AGE_System
AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY 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 UnknownEngine TSSystem
Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar
jukujojidai VanillawareGC cef V8 mono 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 AIL 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 H_do_C)
set(enginepath "engine32") set(enginepath "engine32")
set(collector "enginecollection32.cpp") set(collector "enginecollection32.cpp")
endif() endif()

View File

@ -90,7 +90,7 @@ bool Circus1::attach_function()
bool Circus_old::attach_function() bool Circus_old::attach_function()
{ {
//[041213][CIRCUS]最終試験くじら //[041213][CIRCUS]最終試験くじら
auto call = finddllfunctioncall((DWORD)GetGlyphOutlineA, processStartAddress, processStopAddress); auto call = findiatcallormov((DWORD)GetGlyphOutlineA, processStartAddress, processStartAddress, processStopAddress);
if (!call) if (!call)
return false; return false;
auto func = MemDbg::findEnclosingAlignedFunction(call); auto func = MemDbg::findEnclosingAlignedFunction(call);

View File

@ -0,0 +1,67 @@
#include "H_do_C.h"
// https://vndb.org/v565
// 夢見師
namespace
{
bool nomal()
{
auto call = findiatcallormov((ULONG)GetGlyphOutlineA, processStartAddress, processStartAddress, processStopAddress, false, XX);
if (!call)
return false;
BYTE sig[] = {0xB8, 0x68, 0x24, 0x00, 0x00};
auto addr = reverseFindBytes(sig, sizeof(sig), call - 0x100, call);
if (!addr)
return false;
auto as = findxref_reverse_checkcallop(addr, processStartAddress, processStopAddress, 0xe8);
if (as.size() != 2)
return false;
auto as0 = MemDbg::findEnclosingAlignedFunction(as[0]);
auto as1 = MemDbg::findEnclosingAlignedFunction(as[1]);
if (as0 != as1)
return false;
if (!as0)
return false;
HookParam hp;
hp.address = as0;
hp.offset = stackoffset(2);
hp.type = USING_CHAR | CODEC_ANSI_BE;
return NewHook(hp, "H_do_C");
}
bool embed()
{
BYTE sig[] = {
0x8a, 0x03,
0x3c, 0x7c,
0x0f, 0x84, XX4,
0x3c, 0x80,
0x72, 0x0b,
0x83, 0xc6, 0x02,
0x83, 0xc3, 0x02,
0xe9, XX4,
0x3c, 0x5c,
0x0f, 0x85, XX4,
0x8a, 0x43, 0x01,
0x83, 0xc3, 0x01,
0x83, 0xc6, 0x01,
0x3c, 0x31};
bool succ = false;
for (auto addr : Util::SearchMemory(sig, sizeof(sig), PAGE_EXECUTE, processStartAddress, processStopAddress))
{
addr = MemDbg::findEnclosingAlignedFunction(addr);
if (!addr)
continue;
HookParam hp;
hp.address = addr;
hp.offset = regoffset(ecx);
hp.type = USING_STRING | EMBED_ABLE | EMBED_AFTER_NEW | EMBED_DYNA_SJIS;
hp.embed_hook_font = F_GetGlyphOutlineA;
hp.lineSeparator = L"||";
succ |= NewHook(hp, "H_do_C");
}
return succ;
}
}
bool H_do_C::attach_function()
{
return embed() | nomal();
}

View File

@ -0,0 +1,14 @@

class H_do_C : public ENGINE
{
public:
H_do_C()
{
check_by = CHECK_BY::CUSTOM;
check_by_target = []()
{ return Util::CheckFile(L"*.pak") && Util::SearchResourceString(L"(C) H℃"); };
};
bool attach_function();
};

View File

@ -417,7 +417,7 @@ namespace
bool saiminset() bool saiminset()
{ {
//[230929][1237052][シルキーズSAKURA] 催眠奪女Set パッケージ版 //[230929][1237052][シルキーズSAKURA] 催眠奪女Set パッケージ版
auto addr1 = finddllfunctioncall((DWORD)GetGlyphOutlineA, processStartAddress, processStopAddress); auto addr1 = findiatcallormov((DWORD)GetGlyphOutlineA, processStartAddress, processStartAddress, processStopAddress);
if (addr1 == 0) if (addr1 == 0)
return false; return false;
auto func1 = MemDbg::findEnclosingAlignedFunction(addr1); auto func1 = MemDbg::findEnclosingAlignedFunction(addr1);

View File

@ -6,6 +6,7 @@
#include "engine32/mono.h" #include "engine32/mono.h"
#include "engine32/Tarte.h" #include "engine32/Tarte.h"
#include "engine32/sakanagl.h" #include "engine32/sakanagl.h"
#include "engine32/H_do_C.h"
#include "engine32/LCScript.h" #include "engine32/LCScript.h"
#include "engine32/Cage.h" #include "engine32/Cage.h"
#include "engine32/ONScripterru.h" #include "engine32/ONScripterru.h"
@ -426,5 +427,7 @@ std::vector<ENGINE *> check_engines()
new BunBun, new BunBun,
new DAC, new DAC,
new AbogadoPowers, new AbogadoPowers,
new e_Erekiteru}; new e_Erekiteru,
new H_do_C
};
} }

View File

@ -431,19 +431,6 @@ std::vector<DWORD> findrelativecall(const BYTE *pattern, int length, DWORD calla
} }
return save; return save;
} }
uintptr_t finddllfunctioncall(uintptr_t funcptr, uintptr_t start, uintptr_t end, WORD sig, bool reverse)
{
auto entry = Util::FindImportEntry(start, funcptr);
if (entry == 0)
return 0;
BYTE bytes[] = {0xFF, 0x15, XX4};
memcpy(bytes + 2, &entry, 4);
memcpy(bytes, &sig, 2);
if (reverse)
return reverseFindBytes(bytes, sizeof(bytes), start, end);
else
return MemDbg::findBytes(bytes, sizeof(bytes), start, end);
}
uintptr_t findfuncstart(uintptr_t start, uintptr_t range, bool checkalign) uintptr_t findfuncstart(uintptr_t start, uintptr_t range, bool checkalign)
{ {
const BYTE funcstart[] = { const BYTE funcstart[] = {

View File

@ -57,7 +57,6 @@ uintptr_t SafeFindBytes(LPCVOID pattern, size_t patternSize, uintptr_t lowerBoun
std::vector<DWORD> findrelativecall(const BYTE *pattern, int length, DWORD calladdress, DWORD start, DWORD end); std::vector<DWORD> findrelativecall(const BYTE *pattern, int length, DWORD calladdress, DWORD start, DWORD end);
uintptr_t finddllfunctioncall(uintptr_t funcptr, uintptr_t start, uintptr_t end, WORD sig = 0x15ff, bool reverse = false);
uintptr_t findfuncstart(uintptr_t addr, uintptr_t range = 0x100, bool checkalign = false); uintptr_t findfuncstart(uintptr_t addr, uintptr_t range = 0x100, bool checkalign = false);
uintptr_t findiatcallormov(uintptr_t addr, DWORD hmodule, uintptr_t start, uintptr_t end, bool reverse = false, BYTE movreg = 0); uintptr_t findiatcallormov(uintptr_t addr, DWORD hmodule, uintptr_t start, uintptr_t end, bool reverse = false, BYTE movreg = 0);
std::vector<uintptr_t> findiatcallormov_all(uintptr_t addr, DWORD hmodule, uintptr_t start, uintptr_t end, DWORD protect, BYTE movreg = 0); std::vector<uintptr_t> findiatcallormov_all(uintptr_t addr, DWORD hmodule, uintptr_t start, uintptr_t end, DWORD protect, BYTE movreg = 0);