我拥有游戏中反作弊程序的所有 SSDT 挂钩地址(来自内核侦探)。但我的代码似乎无法更改地址十六进制内容。请帮忙。谢谢。
上钩地址:
Address : 0x805D2C44
Location : ntkrnlpa.exe [PAGE]
Len : 5
State : Relative Call :: call 0x8931C5B0
Current Value : E8 67 99 D4 08
Original Value : E8 95 88 FE FF
Destination Module : 0x8931C5B0 :: -
代码:
#define NTKRNLPA01 0x805D2C44
...
MemRelace((void *)(NTKRNLPA01), (void *)"\xE8\x95\x88\xFE\xFF", 5)
内存替换功能:
bool MemReplace(VOID *lpMem, VOID *lpSrc, DWORD len)
{
DWORD lpflOldProtect, flNewProtect = PAGE_READWRITE;
unsigned char *pDst = (unsigned char *)lpMem,
*pSrc = (unsigned char *)lpSrc;
if (VirtualProtect(lpMem,len,flNewProtect,&lpflOldProtect))
{
while(len-- >0) *pDst++ = *pSrc++;
VirtualProtect(lpMem,len, lpflOldProtect,&lpflOldProtect);
FlushInstructionCache(GetCurrentProcess(), lpMem, len);
return 1;
}
return 0;
}