concat files

This commit is contained in:
恍兮惚兮 2024-02-09 01:18:25 +08:00
parent 9f093281d8
commit d0d348e4f8
6 changed files with 68 additions and 70 deletions

View File

@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(enginepath "engine64")
set(collector "enginecollection64.cpp")
else()
set(enginessrc 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 UnisonShift2 Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT)
set(enginessrc 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

@ -19,4 +19,61 @@ bool InsertUnisonShiftHook() {
}
bool UnisonShift::attach_function() {
return InsertUnisonShiftHook();
}
bool InsertUnisonShift2Hook() {
BYTE bytes[] = {
//80 FB A0 cmp bl, 0A0h
0x80,0xfb,0xa0
};
auto addr1 = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
if (addr1 == 0)return false;
ConsoleOutput("UnisonShift2 %p", addr1);
BYTE start[] = { 0x83 ,0xEC ,0x08 };
addr1 = reverseFindBytes(start, sizeof(start), addr1 - 0x100, addr1);
if (addr1 == 0)return false;
HookParam hp;
hp.address = addr1;
hp.offset=get_reg(regs::eax);
hp.type = DATA_INDIRECT;
hp.index = 0;
return NewHook(hp, "UnisonShift2");
}
bool InsertUnisonShift3Hook() {
BYTE bytes2[] = {
0x80,0xF9,XX
};
auto addrs=Util::SearchMemory(bytes2,sizeof(bytes2),PAGE_EXECUTE, processStartAddress, processStopAddress);
BYTE moveaxoffset[] = { 0xb8 ,XX,XX,XX, 0x00 };
auto succ=false;
for (auto addr : addrs) {
ConsoleOutput("UnisonShift3 %p", addr);
addr = (DWORD)((BYTE*)addr -5);
int x = -1;
for (int i = 0; i < 0x20; i++) {
if (*((BYTE*)addr-i) == 0xb8 && *((BYTE*)(addr)+4-i) == 0) {
x = i; break;
}
}
if (x == -1)continue;
ConsoleOutput("UnisonShift3 found %p", addr-x);
addr = (DWORD)((BYTE*)addr + 1-x);
auto raddr = *(int*)addr;
ConsoleOutput("UnisonShift3 raddr %p", raddr);
HookParam hp;
hp.address = raddr;
hp.type = DIRECT_READ;
succ|=NewHook(hp, "UnisonShift3");
}
return succ;
}
bool UnisonShift2::attach_function() {
bool b1=InsertUnisonShift2Hook();
bool b2=InsertUnisonShift3Hook();
return b1||b2;
}

View File

@ -9,4 +9,14 @@ class UnisonShift:public ENGINE{
is_engine_certain=false;
};
bool attach_function();
};
class UnisonShift2:public ENGINE{
public:
UnisonShift2(){
check_by=CHECK_BY::FILE_ALL;
check_by_target=check_by_list{L"PIC.*",L"TP.*",L"GR.*",L"BGM.*"};
};
bool attach_function();
};

View File

@ -1,57 +0,0 @@
#include"UnisonShift2.h"
bool InsertUnisonShift2Hook() {
BYTE bytes[] = {
//80 FB A0 cmp bl, 0A0h
0x80,0xfb,0xa0
};
auto addr1 = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
if (addr1 == 0)return false;
ConsoleOutput("UnisonShift2 %p", addr1);
BYTE start[] = { 0x83 ,0xEC ,0x08 };
addr1 = reverseFindBytes(start, sizeof(start), addr1 - 0x100, addr1);
if (addr1 == 0)return false;
HookParam hp;
hp.address = addr1;
hp.offset=get_reg(regs::eax);
hp.type = DATA_INDIRECT;
hp.index = 0;
return NewHook(hp, "UnisonShift2");
}
bool InsertUnisonShift3Hook() {
BYTE bytes2[] = {
0x80,0xF9,XX
};
auto addrs=Util::SearchMemory(bytes2,sizeof(bytes2),PAGE_EXECUTE, processStartAddress, processStopAddress);
BYTE moveaxoffset[] = { 0xb8 ,XX,XX,XX, 0x00 };
auto succ=false;
for (auto addr : addrs) {
ConsoleOutput("UnisonShift3 %p", addr);
addr = (DWORD)((BYTE*)addr -5);
int x = -1;
for (int i = 0; i < 0x20; i++) {
if (*((BYTE*)addr-i) == 0xb8 && *((BYTE*)(addr)+4-i) == 0) {
x = i; break;
}
}
if (x == -1)continue;
ConsoleOutput("UnisonShift3 found %p", addr-x);
addr = (DWORD)((BYTE*)addr + 1-x);
auto raddr = *(int*)addr;
ConsoleOutput("UnisonShift3 raddr %p", raddr);
HookParam hp;
hp.address = raddr;
hp.type = DIRECT_READ;
succ|=NewHook(hp, "UnisonShift3");
}
return succ;
}
bool UnisonShift2::attach_function() {
bool b1=InsertUnisonShift2Hook();
bool b2=InsertUnisonShift3Hook();
return b1||b2;
}

View File

@ -1,11 +0,0 @@
#include"engine.h"
class UnisonShift2:public ENGINE{
public:
UnisonShift2(){
check_by=CHECK_BY::FILE_ALL;
check_by_target=check_by_list{L"PIC.*",L"TP.*",L"GR.*",L"BGM.*"};
};
bool attach_function();
};

View File

@ -93,7 +93,6 @@
#include"engine32/ApricoT.h"
#include"engine32/Triangle.h"
#include"engine32/AB2Try.h"
#include"engine32/UnisonShift2.h"
#include"engine32/GameMaker.h"
#include"engine32/DxLib.h"
#include"engine32/CodeX.h"