SdbpCheckMatchingRegistryEntry
NTSTATUS __stdcall SdbpCheckMatchingRegistryEntry(
PWCHAR pwszKeyPath,
PWCHAR pwszValueNameDb,
UINT64 ulValueTypeDb,
PWCHAR pwszValueDataDb,
UINT64 dwValueDataDb,
UINT64 qwValueDataDb,
UINT8 *pValueDataDb,
UINT64 pValueDataSize,
INT64 *bEntryMatchedOut){
unsigned int v10;
NTSTATUS v12;
WCHAR v13;
int v14;
int v15;
INT64 a5;
void *KeyHandle;
struct _OBJECT_ATTRIBUTES ObjectAttributes;
struct _UNICODE_STRING DestinationString;
__int64 SystemInformation;
int v22;
wchar_t pszDest[264];
pszDest[0] = 0;
KeyHandle = 0i64;
SystemInformation = 0i64;
v10 = ulValueTypeDb;
*(_DWORD *)bEntryMatchedOut = 0;
v22 = 0;
v12 = 0;
DestinationString = 0i64;
memset(&ObjectAttributes, 0, sizeof(ObjectAttributes));
RtlStringCchPrintfW(pszDest, 0x104ui64, (WCHAR *)L"\\REGISTRY\\MACHINE\\%s");
if( v14 < 0 )
{
AslLogCallPrintf(1ui64, "SdbpCheckMatchingRegistryEntry", 0x4E4ui64, "Failed to construct full key path");
goto LABEL_10;
}
RtlInitUnicodeString(&DestinationString, pszDest, v13);
ObjectAttributes.Length = 48;
ObjectAttributes.ObjectName = &DestinationString;
ObjectAttributes.RootDirectory = 0i64;
ObjectAttributes.Attributes = 576;
*(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
if( ZwOpenKey(&KeyHandle, 0x20019u, &ObjectAttributes) >= 0 )
goto LABEL_9;
v15 = ZwQuerySystemInformation();
if( v15 < 0 )
{
AslLogCallPrintf(
1ui64,
"SdbpCheckMatchingRegistryEntry",
0x507ui64,
"Failed to get processor architecture [%x]",
v15);
goto LABEL_10;
}
if( (_WORD)SystemInformation == 9 && ZwOpenKey(&KeyHandle, 0x20219u, &ObjectAttributes) >= 0 )
{
LABEL_9:
LODWORD(a5) = dwValueDataDb;
v12 = SdbpCheckMatchingRegistryValue(
KeyHandle,
pwszValueNameDb,
v10,
pwszValueDataDb,
a5,
qwValueDataDb,
pValueDataDb,
pValueDataSize,
(INT64)bEntryMatchedOut);
}
else
{
v12 = 1;
}
LABEL_10:
if( KeyHandle )
ZwClose(KeyHandle);
return v12;
}Referenced by:
SdbpCheckMatchingRegistry