From 62de7c0564e0efe7c9a19075c175c0e585402edd Mon Sep 17 00:00:00 2001 From: momo5502 Date: Wed, 25 Dec 2024 14:44:05 +0100 Subject: [PATCH] Add token handler --- src/windows-emulator/syscalls.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index 104f500e..8fd84937 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -2343,6 +2343,21 @@ namespace return STATUS_SUCCESS; } + if (token_information_class == TokenStatistics) + { + constexpr auto required_size = sizeof(TOKEN_STATISTICS); + return_length.write(required_size); + + if (required_size > token_information_length) + { + return STATUS_BUFFER_TOO_SMALL; + } + + c.emu.write_memory(token_information, TOKEN_STATISTICS{}); + + return STATUS_SUCCESS; + } + if (token_information_class == TokenSecurityAttributes) { constexpr auto required_size = sizeof(TOKEN_SECURITY_ATTRIBUTES_INFORMATION);