DebonosuWorks engine hook

This commit is contained in:
Blu3train 2024-01-29 18:47:51 +01:00
parent f3fbe04409
commit 94a48e2e39
3 changed files with 36 additions and 0 deletions

View File

@ -21728,6 +21728,37 @@ bool InsertNamcoPS2Hook()
} }
#endif // 0 #endif // 0
bool InsertDebonosuWorksHook() {
//by Blu3train
/*
* Sample games:
* https://vndb.org/v47955
*/
const BYTE bytes[] = {
0xCC, // int 3
0x53, // push ebx <- hook here
0x56, // push esi
0x57, // push edi
0x8B, 0xF9, // mov edi,ecx
0xC6, 0x05, XX4, 0x00 // mov byte ptr ["Kagura Genesis.exe"+DCB170],00
};
ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
if (!addr) {
ConsoleOutput("vnreng:DebonosuWorks: pattern not found");
return false;
}
HookParam hp = {};
hp.address = addr + 1;
hp.offset = pusha_eax_off -4;
hp.index = 0;
hp.type = USING_STRING;
ConsoleOutput("vnreng: INSERT DebonosuWorks");
NewHook(hp, "DebonosuWorks");
return true;
}
} // namespace Engine } // namespace Engine
// EOF // EOF

View File

@ -156,6 +156,7 @@ bool InsertWillPlusHook(); // WillPlus: Rio.arc
bool InsertWolfHook(); // Wolf: Data.wolf bool InsertWolfHook(); // Wolf: Data.wolf
bool InsertYukaSystem2Hook(); // YukaSystem2: *.ykc bool InsertYukaSystem2Hook(); // YukaSystem2: *.ykc
bool InsertYurisHook(); // YU-RIS: *.ypf bool InsertYurisHook(); // YU-RIS: *.ypf
bool InsertDebonosuWorksHook(); // DebonosuWorks: resource string
void InsertBrunsHook(); // Bruns: bruns.exe void InsertBrunsHook(); // Bruns: bruns.exe
void InsertIronGameSystemHook();// IroneGameSystem: igs_sample.exe void InsertIronGameSystemHook();// IroneGameSystem: igs_sample.exe

View File

@ -370,6 +370,10 @@ bool DetermineEngineByFile3()
bool DetermineEngineByFile4() bool DetermineEngineByFile4()
{ {
if (Util::SearchResourceString(L"でぼの巣製作所")) {
if (InsertDebonosuWorksHook())
return true;
}
if (Util::CheckFile(L"EAGLS.dll")) { // jichi 3/24/2014: E.A.G.L.S if (Util::CheckFile(L"EAGLS.dll")) { // jichi 3/24/2014: E.A.G.L.S
//ConsoleOutput("vnreng: IGNORE EAGLS"); //ConsoleOutput("vnreng: IGNORE EAGLS");
InsertEaglsHook(); InsertEaglsHook();