LunaHook-mirror/LunaHook/engine32/HXP.cpp

17 lines
504 B
C++
Raw Normal View History

2024-02-07 20:59:24 +08:00
#include"HXP.h"
bool HXP::attach_function() {
//https://vndb.org/v172
//エクソダスギルティー・オルタナティブ
auto addr=MemDbg::findCallerAddress((DWORD)TextOutA, 0x01003d66,processStartAddress, processStopAddress);
if(addr==0)return false;
addr=MemDbg::findEnclosingAlignedFunction(addr);
if(addr==0)return false;
HookParam hp;
hp.address = (DWORD)addr;
hp.offset=get_stack(2);
hp.type = CODEC_ANSI_BE;
return NewHook(hp, "HXP");
}