diff --git a/Anti-Cheat_Driver/comm_dispatch.cpp b/Anti-Cheat_Driver/comm_dispatch.cpp index f59fd2f..b3e2d0f 100644 --- a/Anti-Cheat_Driver/comm_dispatch.cpp +++ b/Anti-Cheat_Driver/comm_dispatch.cpp @@ -3,6 +3,8 @@ #include "anit_screen_grap.h" #include "create_thread_callback.h" #include "mouse_keybord_hook.h" +#include "process_func.h" +#include "memory_protect.h" namespace comm_dispatch { @@ -80,6 +82,22 @@ namespace comm_dispatch status = mouse_keybord_hook::remove_mouse_keybord_hook(); break; } + case CMD::START_HANDLE_MONITOR: + { + status = process_function::start_process_handle_monitor(); + break; + } + case CMD::STOP_HANDLE_MONITOR: + { + status = process_function::stop_process_handle_monitor(); + break; + } + case CMD::VAD_PROTECT_MEMORY: + { + auto memory_protect_data = (IOCTL_PROTECT_MEMORY*)data->Buf; + status = memory_protect::ProtectUserRegionByPid(ULongToHandle((ULONG)memory_protect_data->Pid), memory_protect_data->Address); + break; + } default: break; } diff --git a/Anti-Cheat_Driver/comm_dispatch.h b/Anti-Cheat_Driver/comm_dispatch.h index ec0d79a..eafdda0 100644 --- a/Anti-Cheat_Driver/comm_dispatch.h +++ b/Anti-Cheat_Driver/comm_dispatch.h @@ -19,6 +19,13 @@ struct IOCTL_WINDOW DWORD64 HWND; DWORD64 Flags; }; + +struct IOCTL_PROTECT_MEMORY +{ + DWORD64 Pid; + DWORD64 Address; +}; + enum CMD { MSG_BASE = 0x10000, @@ -31,6 +38,9 @@ enum CMD PROTECT_THREAD_CONTRL, INSTALL_MOUSE_KEYBOARD, UNLOAD_MOUSE_KEYBOARD, + START_HANDLE_MONITOR, + STOP_HANDLE_MONITOR, + VAD_PROTECT_MEMORY, }; namespace comm_dispatch