mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-12-30 23:14:12 +08:00
17 lines
504 B
C++
17 lines
504 B
C++
#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");
|
|
}
|