2024-11-02 15:49:09 +08:00
|
|
|
#include "Abalone.h"
|
2024-02-07 20:59:24 +08:00
|
|
|
|
2024-11-02 15:49:09 +08:00
|
|
|
bool AbaloneHook()
|
|
|
|
{
|
2024-02-07 20:59:24 +08:00
|
|
|
BYTE bytes[] = {
|
2024-11-02 15:49:09 +08:00
|
|
|
0x8B, 0x44, 0x24, XX,
|
|
|
|
0x80, 0x38, 0x00,
|
|
|
|
0x74};
|
2024-02-07 20:59:24 +08:00
|
|
|
auto addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
|
|
|
|
ConsoleOutput("AbaloneHook %p", addr);
|
2024-11-02 15:49:09 +08:00
|
|
|
if (addr == 0)
|
|
|
|
return false;
|
2024-02-07 20:59:24 +08:00
|
|
|
HookParam hp;
|
2024-11-02 15:49:09 +08:00
|
|
|
hp.address = addr + 4;
|
|
|
|
hp.offset = get_reg(regs::eax);
|
|
|
|
hp.type = DATA_INDIRECT;
|
2024-02-07 20:59:24 +08:00
|
|
|
hp.index = 0;
|
|
|
|
return NewHook(hp, "AbaloneHook");
|
2024-11-02 15:49:09 +08:00
|
|
|
}
|
|
|
|
bool Abalone::attach_function()
|
|
|
|
{
|
|
|
|
return AbaloneHook();
|
|
|
|
}
|