issues/43

This commit is contained in:
恍兮惚兮 2024-05-25 23:39:31 +08:00
parent dde85d0a1c
commit ab8f670f4d
4 changed files with 57 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 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 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,42 @@
#include "CoffeeMaker.h"
bool CoffeeMaker::attach_function()
{
// https://vndb.org/v4025
// こころナビ
const BYTE bytes[] = {
0x81,0xF9,0xD4,0x2B,0x00,0x00,
0x7F,XX,
0xB8,0x5D,0x41,0x4C,0xAE,
};
auto addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
if (!addr)
return false;
addr = MemDbg::findEnclosingAlignedFunction(addr, 0x10);
if (!addr)
return false;
auto addrs = findxref_reverse_checkcallop(addr, addr - 0x1000, addr + 0x1000, 0xe8);
if (addrs.size() != 1)
return false;
auto addr2 = addrs[0];
addr2 = MemDbg::findEnclosingAlignedFunction(addr2, 0x40);
if (!addr2)
return false;
HookParam hp;
hp.address = addr2;
hp.type = USING_CHAR | CODEC_ANSI_BE | NO_CONTEXT;
hp.user_value = addr;
hp.text_fun = [](hook_stack *stack, HookParam *hp, uintptr_t *data, uintptr_t *split, size_t *len)
{
auto a2 = stack->stack[1];
if (a2 > 0x2bd4)
return;
auto sub_429050 = (int(__stdcall *)(signed int a1))hp->user_value;
*data = sub_429050(a2);
static int idx = 0;
*len = 2 * (idx % 2);
idx += 1;
};
return NewHook(hp, "CoffeeMaker");
}

View File

@ -0,0 +1,11 @@
class CoffeeMaker:public ENGINE{
public:
CoffeeMaker(){
check_by=CHECK_BY::FILE_ALL;
check_by_target=check_by_list{L"VIC.EPK",L"MUS.EPK",L"SE.EPK",L"CG.EPK",L"SCR.EPK"};
};
bool attach_function();
};

View File

@ -10,6 +10,7 @@
#include"engine32/sakanagl.h"
#include"engine32/LCScript.h"
#include"engine32/ONScripterru.h"
#include"engine32/CoffeeMaker.h"
#include"engine32/splushwave.h"
#include"engine32/FrontWing.h"
#include"engine32/GSX.h"
@ -328,7 +329,8 @@ std::vector<ENGINE*> check_engines(){
new tamasoft,
new CisLugI,
new mirage,
new VALKYRIA
new VALKYRIA,
new CoffeeMaker
};
}