Merge remote-tracking branch 'Blu3train/TrianglePixHook'
This commit is contained in:
commit
83cdcb2516
@ -23655,6 +23655,42 @@ bool InsertNamcoPS2Hook()
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
bool InsertTrianglePixHook()
|
||||
{
|
||||
//by Blu3train
|
||||
/*
|
||||
* Sample games:
|
||||
* https://vndb.org/v38070
|
||||
* https://vndb.org/v42090
|
||||
* https://vndb.org/v41025
|
||||
*/
|
||||
const BYTE bytes[] = {
|
||||
0x50, // push eax << hook here
|
||||
0xE8, XX4, // call FinalIgnition.exe+4DE10
|
||||
0x8B, 0x83, XX4, // mov eax,[ebx+0000DCA0]
|
||||
0x8D, 0x8D, XX4, // lea ecx,[ebp-0000022C]
|
||||
0x83, 0x7D, 0x44, 0x10, // cmp dword ptr [ebp+44],10
|
||||
0xFF, 0x75, 0x40 // push [ebp+40]
|
||||
};
|
||||
|
||||
ULONG range = min(processStopAddress - processStartAddress, MAX_REL_ADDR);
|
||||
ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStartAddress + range);
|
||||
if (!addr) {
|
||||
ConsoleOutput("vnreng:TrianglePix: pattern not found");
|
||||
return false;
|
||||
}
|
||||
|
||||
HookParam hp = {};
|
||||
hp.address = addr;
|
||||
hp.offset = pusha_eax_off -4;
|
||||
hp.index = 0;
|
||||
hp.type = USING_UTF8 | USING_STRING | NO_CONTEXT;
|
||||
hp.filter_fun = NewLineCharToSpaceFilter;
|
||||
ConsoleOutput("vnreng: INSERT TrianglePix");
|
||||
NewHook(hp, "TrianglePix");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InsertSekaiProject1Hook()
|
||||
{
|
||||
//by Blu3train
|
||||
|
@ -156,6 +156,7 @@ bool InsertWillPlusHook(); // WillPlus: Rio.arc
|
||||
bool InsertWolfHook(); // Wolf: Data.wolf
|
||||
bool InsertYukaSystemHooks(); // YukaSystem2: *.ykc
|
||||
bool InsertYurisHook(); // YU-RIS: *.ypf
|
||||
bool InsertTrianglePixHook(); // Triangle Pix: pix.bin
|
||||
bool InsertOtomeHook(); // Otome: fsroot*
|
||||
bool InsertYaneSDKHook(); // YaneSDK: arc/evimage.dat
|
||||
bool InsertBishopHook(); // Bishop: *.bsa
|
||||
|
@ -380,6 +380,10 @@ bool DetermineEngineByFile3()
|
||||
|
||||
bool DetermineEngineByFile4()
|
||||
{
|
||||
if (Util::CheckFile(L"pix.bin")) {
|
||||
if (InsertTrianglePixHook())
|
||||
return true;
|
||||
}
|
||||
if (Util::CheckFile(L"Packs/*.GPK")) {
|
||||
if (InsertSekaiProjectHooks())
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user