本帖最后由 wozzi 于 2019-3-3 00:23 编辑
这个函数不走64位的syscall 寻找方法可对sysenter下断eax==NtOpenThread索引 断下后看堆栈
[C++] 纯文本查看 复制代码 ULONG32 VMEntry_OpenThread = 0x01A0EAB7;
NAKED NgsNtOpenThread()
{
VMPBegin("NgsNtOpenThread");
__asm
{
test eax, eax;
jne Ngs_OpenThreadEnd;
pushad;
mov eax, dword ptr[ebp + 0x10];//Client->UniqueThread
cmp eax, GameThreadId;
jne Label_ThreadID;
mov eax, dword ptr[ebp - 0x08];
push eax;
call CloseHandle;
mov dword ptr[ebp - 0x08], 0x0;//清零
mov dword ptr[ebp + 0x10], 0x0;//清零
popad;
mov eax, 0xC0000022;//返回STATUS_ACCESS_DENIED
jmp dword ptr[VMEntry_OpenThread];
Label_ThreadID:;
popad;
Ngs_OpenThreadEnd:;
jmp dword ptr[VMEntry_OpenThread];
}
VMPEnd();
} |