| 1008 | } |
| 1009 | |
| 1010 | VOID DbgkUnMapViewOfSection( |
| 1011 | _In_ PEPROCESS Process, |
| 1012 | _In_ PVOID BaseAddress |
| 1013 | ) { |
| 1014 | //PTEB Teb; |
| 1015 | DBGKM_APIMSG ApiMsg; |
| 1016 | PEPROCESS CurrentProcess; |
| 1017 | PETHREAD CurrentThread; |
| 1018 | |
| 1019 | CurrentProcess = PsGetCurrentProcess(); |
| 1020 | CurrentThread = PsGetCurrentThread(); |
| 1021 | |
| 1022 | /*if (ExGetPreviousMode() == KernelMode || |
| 1023 | (CurrentThread->CrossThreadFlags & PS_CROSS_THREAD_FLAGS_HIDEFROMDBG)) { |
| 1024 | return; |
| 1025 | }*/ |
| 1026 | |
| 1027 | /*if (CurrentThread->Tcb.ApcStateIndex != 0x1) { |
| 1028 | Teb = (PTEB)CurrentThread->Tcb.Teb; |
| 1029 | } |
| 1030 | else { |
| 1031 | Teb = nullptr; |
| 1032 | }*/ |
| 1033 | |
| 1034 | //if (Teb != nullptr && Process == (PEPROCESS)CurrentProcess) { |
| 1035 | // if (!DbgkpSuppressDbgMsg(Teb)) { |
| 1036 | |
| 1037 | // } |
| 1038 | // else { |
| 1039 | // return; |
| 1040 | // } |
| 1041 | //} |
| 1042 | |
| 1043 | ApiMsg.u.UnloadDll.BaseAddress = BaseAddress; |
| 1044 | DBGKM_FORMAT_API_MSG(ApiMsg, DbgKmUnloadDllApi, sizeof(DBGKM_UNLOAD_DLL)); |
| 1045 | DbgkpSendApiMessage(0x1, &ApiMsg); |
| 1046 | } |
| 1047 | |
| 1048 | PEPROCESS PsGetCurrentProcessByThread(PETHREAD Thread) { |
| 1049 | //return Thread->Tcb.Process; |
nothing calls this directly
no test coverage detected