1 Star 1 Fork 1

Beqee/DnfDebug_old1

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
GameDebug.cpp 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
1114135188 提交于 2019-01-09 07:10 . R0 + R3 已经可以完全调试
#include "GameDebug.h"
NTSTATUS GameDebug::Start_GanmeDebug()
{
g_GameDebug = this;
m_Hook.Hook_Init();
NTSTATUS Status = R3_PassTp_Hook();
PassTp_DebugPort_Set_0();
return Status;
}
VOID GameDebug::Un_GanmeDebug()
{
PsRemoveCreateThreadNotifyRoutine(ThreadCallback);
if (m_IsHook) {
m_Hook.UnHookSSDT(361, m_OldTpVal);
}
}
NTSTATUS GameDebug::R3_PassTp_Hook()
{
return PsSetCreateThreadNotifyRoutine(ThreadCallback);
}
VOID GameDebug::PassTp_DebugPort_Set_0()
{
HOOK_NtRemoveProcessDebug();
}
VOID GameDebug::HOOK_NtRemoveProcessDebug()
{
m_Hook.HookSSDT(361, (ULONGLONG)Fake_NtRemoveProcessDebug,&m_OldTpVal, (PVOID *)&NtRemoveProcessDebug);
m_IsHook = TRUE;
}
NTSTATUS GameDebug::Fake_NtRemoveProcessDebug(IN HANDLE ProcessHandle, IN HANDLE DebugHandle)
{
if (_stricmp((char *)PsGetProcessImageFileName(IoGetCurrentProcess()), "System") ==0 &&
_stricmp(FastFunction::GetProcessNamebyHandle(ProcessHandle), "dnf.exe") == 0)
{
return STATUS_SUCCESS;
}
return NtRemoveProcessDebug(ProcessHandle, DebugHandle);
}
VOID GameDebug::ThreadCallback(IN HANDLE ProcessId, IN HANDLE ThreadId, IN BOOLEAN Create)
{
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Beqee/DnfDebug_old1.git
git@gitee.com:Beqee/DnfDebug_old1.git
Beqee
DnfDebug_old1
DnfDebug_old1
master

搜索帮助