From e5df79f297e5b71199dfe7cdd993dfa44f0ef93d Mon Sep 17 00:00:00 2001 From: maowenrui <3505719167@qq.com> Date: Wed, 3 Jun 2026 14:10:48 +0800 Subject: [PATCH] fix is_protect_pid par --- Anti-Cheat_Driver/protect_filter.cpp | 16 +++++++++++++--- Anti-Cheat_Driver/protect_filter.h | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Anti-Cheat_Driver/protect_filter.cpp b/Anti-Cheat_Driver/protect_filter.cpp index b34cb77..6be5e23 100644 --- a/Anti-Cheat_Driver/protect_filter.cpp +++ b/Anti-Cheat_Driver/protect_filter.cpp @@ -36,7 +36,7 @@ namespace protect_filter return TRUE; } - auto is_protect_pid(ULONG Pid) -> BOOL + auto is_protect_pid(ULONG Pid, PEPROCESS Eprocess)->BOOL { UNREFERENCED_PARAMETER(Pid); if (IsListEmpty(&g_protect_list)) @@ -48,8 +48,18 @@ namespace protect_filter auto list_data = reinterpret_cast(CONTAINING_RECORD(list_head, FILTER, List)); list_head = list_head->Flink; - if (list_data->Pid == Pid) - return TRUE; + + if (Pid) + { + if (list_data->Pid == Pid) + return TRUE; + } + if (Eprocess) + { + if (list_data->Eprocess == Eprocess) + return TRUE; + } + //DbgPrintEx(77, 0, "[+] pid:%d | eproecss:%p\n", list_data->Pid, list_data->Eprocess); } diff --git a/Anti-Cheat_Driver/protect_filter.h b/Anti-Cheat_Driver/protect_filter.h index d84c12a..f3ee553 100644 --- a/Anti-Cheat_Driver/protect_filter.h +++ b/Anti-Cheat_Driver/protect_filter.h @@ -15,7 +15,7 @@ namespace protect_filter auto add_list(ULONG Pid, HWND hwnd)->BOOL; - auto is_protect_pid(ULONG Pid) -> BOOL; + auto is_protect_pid(ULONG Pid, PEPROCESS Eprocess) -> BOOL; auto remove_list(ULONG Pid, HWND hwnd)->BOOL; } \ No newline at end of file