| 75 | } |
| 76 | |
| 77 | bool kDbgUtil::UnhookDbgSys() { |
| 78 | NTSTATUS status = DetourDetach((PVOID*)&g_pNtCreateDebugObject, NtCreateDebugObject); |
| 79 | if (!NT_SUCCESS(status)) |
| 80 | return false; |
| 81 | |
| 82 | status = DetourTransactionCommit(); |
| 83 | if (!NT_SUCCESS(status)) |
| 84 | return false; |
| 85 | |
| 86 | status = DetourDetach((PVOID*)&g_pNtDebugActiveProcess, NtDebugActiveProcess); |
| 87 | if (!NT_SUCCESS(status)) |
| 88 | return false; |
| 89 | |
| 90 | status = DetourTransactionCommit(); |
| 91 | if (!NT_SUCCESS(status)) |
| 92 | return false; |
| 93 | return true; |
| 94 | } |
| 95 | |
| 96 | bool kDbgUtil::InitDbgSys(DbgSysCoreInfo* info) { |
| 97 | if (_first) { |
nothing calls this directly
no test coverage detected