Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebonosuWorks engine hook #1240

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions texthook/engine/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21728,6 +21728,37 @@ bool InsertNamcoPS2Hook()
}
#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

// EOF
Expand Down
1 change: 1 addition & 0 deletions texthook/engine/engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ bool InsertWillPlusHook(); // WillPlus: Rio.arc
bool InsertWolfHook(); // Wolf: Data.wolf
bool InsertYukaSystem2Hook(); // YukaSystem2: *.ykc
bool InsertYurisHook(); // YU-RIS: *.ypf
bool InsertDebonosuWorksHook(); // DebonosuWorks: resource string

void InsertBrunsHook(); // Bruns: bruns.exe
void InsertIronGameSystemHook();// IroneGameSystem: igs_sample.exe
Expand Down
4 changes: 4 additions & 0 deletions texthook/engine/match32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@ bool DetermineEngineByFile3()

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
//ConsoleOutput("vnreng: IGNORE EAGLS");
InsertEaglsHook();
Expand Down