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.
This commit is contained in:
ragnarok-clanker 2026-11-06 15:29:57 +00:00
commit 9efb55d6a4

View file

@ -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