From 9efb55d6a42c797267145c81cb983dbc8d0c8bd4 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 15:29:57 +0000 Subject: [PATCH] Decompile fn_18152 (RegistryKey::Query) Batch #13394 by spider: 1 byte-identical, 0 confirmed by peer review. - fn_18152 RegistryKey::Query: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Utility/RegistryKey.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Utility/RegistryKey.cpp b/Source/Utility/RegistryKey.cpp index 8d919adf..2da5d58e 100644 --- a/Source/Utility/RegistryKey.cpp +++ b/Source/Utility/RegistryKey.cpp @@ -17,7 +17,10 @@ bool RegistryKey::Open(HKEY parent, const char* subKey) { // FUNCTION: fn_18152 bool RegistryKey::Query(const char* name, DWORD expectedType, BYTE* data, DWORD size) { DWORD type; - return this->handle != nullptr && RegQueryValueExA(this->handle, name, nullptr, &type, data, &size) == ERROR_SUCCESS && type == expectedType; + if (this->handle == nullptr || RegQueryValueExA(this->handle, name, nullptr, &type, data, &size) != ERROR_SUCCESS) { + return false; + } + return type == expectedType; } // OFFSET: 0x00AED0C0