ntdll-ThreadHideFromDebugger: Add patch.

This commit is contained in:
Zebediah Figura 2019-11-20 18:54:23 -06:00
parent 1f5394ae51
commit 29cc042257
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 39813f58fc654ecd12f9ce5cf0d6e356e2e81697 Mon Sep 17 00:00:00 2001
From: David Torok <dt@zeroitlab.com>
Date: Tue, 19 Nov 2019 23:01:46 +0100
Subject: [PATCH] ntdll: Stub NtQueryInformationThread(ThreadHideFromDebugger).
---
dlls/ntdll/thread.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 621aaddfe..512b4814e 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -1115,6 +1115,11 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
*(BOOL*)data = FALSE;
if (ret_len) *ret_len = sizeof(BOOL);
return STATUS_SUCCESS;
+ case ThreadHideFromDebugger:
+ if (length != sizeof(char)) return STATUS_INFO_LENGTH_MISMATCH;
+ *(BOOLEAN *)data = TRUE;
+ if (ret_len) *ret_len = sizeof(BOOLEAN);
+ return STATUS_SUCCESS;
case ThreadPriority:
case ThreadBasePriority:
case ThreadImpersonationToken:
--
2.23.0

View File

@ -0,0 +1 @@
Fixes: [48138] League of Legends 9.23: Crash after champ select

View File

@ -218,6 +218,7 @@ patch_enable_all ()
enable_ntdll_SystemInterruptInformation="$1"
enable_ntdll_SystemModuleInformation="$1"
enable_ntdll_SystemRoot_Symlink="$1"
enable_ntdll_ThreadHideFromDebugger="$1"
enable_ntdll_ThreadTime="$1"
enable_ntdll_Threading="$1"
enable_ntdll_User_Shared_Data="$1"
@ -776,6 +777,9 @@ patch_enable ()
ntdll-SystemRoot_Symlink)
enable_ntdll_SystemRoot_Symlink="$2"
;;
ntdll-ThreadHideFromDebugger)
enable_ntdll_ThreadHideFromDebugger="$2"
;;
ntdll-ThreadTime)
enable_ntdll_ThreadTime="$2"
;;
@ -5098,6 +5102,21 @@ if test "$enable_ntdll_SystemModuleInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-ThreadHideFromDebugger
# |
# | This patchset fixes the following Wine bugs:
# | * [#48138] League of Legends 9.23: Crash after champ select
# |
# | Modified files:
# | * dlls/ntdll/thread.c
# |
if test "$enable_ntdll_ThreadHideFromDebugger" -eq 1; then
patch_apply ntdll-ThreadHideFromDebugger/0001-ntdll-Stub-NtQueryInformationThread-ThreadHideFromDe.patch
(
printf '%s\n' '+ { "David Torok", "ntdll: Stub NtQueryInformationThread(ThreadHideFromDebugger).", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Zero_mod_name
# |
# | Modified files: