Kiss engine hook
This commit is contained in:
parent
f3fbe04409
commit
63324fe728
@ -21728,6 +21728,42 @@ bool InsertNamcoPS2Hook()
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
bool InsertKissHook() {
|
||||
//by Blu3train
|
||||
/*
|
||||
* Sample games:
|
||||
* https://vndb.org/v1767
|
||||
*/
|
||||
const BYTE bytes[] = {
|
||||
0xC1, 0xE9, 0x02, // shr ecx,02 <- hook here
|
||||
0xF3, 0xA5, // repe movsd
|
||||
0x8B, 0xCA, // mov ecx,edx
|
||||
0x55, // push ebp
|
||||
0x83, 0xE1, 0x03, // and ecx,03
|
||||
0xF3, 0xA4, // repe movsb
|
||||
0x8D, 0x4C, 0x24, 0x18, // lea ecx,[esp+18]
|
||||
0xE8, XX4, // call kano.exe+6310
|
||||
0x8B, 0x0D, XX4 // mov ecx,[kano.exe+211F8C]
|
||||
};
|
||||
|
||||
ULONG range = min(processStopAddress - processStartAddress, MAX_REL_ADDR);
|
||||
ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStartAddress + range);
|
||||
if (!addr) {
|
||||
ConsoleOutput("vnreng:Kiss: pattern not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
HookParam hp = {};
|
||||
hp.address = addr;
|
||||
hp.offset = pusha_esi_off -4;
|
||||
hp.index = 0;
|
||||
hp.type = USING_STRING | NO_CONTEXT;
|
||||
ConsoleOutput("vnreng: INSERT Kiss");
|
||||
NewHook(hp, "Kiss");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace Engine
|
||||
|
||||
// EOF
|
||||
|
@ -156,6 +156,7 @@ bool InsertWillPlusHook(); // WillPlus: Rio.arc
|
||||
bool InsertWolfHook(); // Wolf: Data.wolf
|
||||
bool InsertYukaSystem2Hook(); // YukaSystem2: *.ykc
|
||||
bool InsertYurisHook(); // YU-RIS: *.ypf
|
||||
bool InsertKissHook(); // Kiss: GameData/*.arc
|
||||
|
||||
void InsertBrunsHook(); // Bruns: bruns.exe
|
||||
void InsertIronGameSystemHook();// IroneGameSystem: igs_sample.exe
|
||||
|
@ -370,6 +370,10 @@ bool DetermineEngineByFile3()
|
||||
|
||||
bool DetermineEngineByFile4()
|
||||
{
|
||||
if (Util::CheckFile(L"GameData/*.arc")) {
|
||||
if (InsertKissHook())
|
||||
return true;
|
||||
}
|
||||
if (Util::CheckFile(L"EAGLS.dll")) { // jichi 3/24/2014: E.A.G.L.S
|
||||
//ConsoleOutput("vnreng: IGNORE EAGLS");
|
||||
InsertEaglsHook();
|
||||
|
Loading…
Reference in New Issue
Block a user