PnpRegistryValueExists

char __fastcall PnpRegistryValueExists(VOID *a1, _UNICODE_STRING *a2){
  char v2; 
  NTSTATUS v3; 
  UINT64 Length; 
  UINT64 ResultLength; 
  __int128 KeyValueInformation; 

  v2 = 0;
  LODWORD(Length) = 16;
  LODWORD(ResultLength) = 0;
  KeyValueInformation = 0i64;
  v3 = ZwQueryValueKey(a1, a2, KeyValueBasicInformation, &KeyValueInformation, Length, &ResultLength);
  if( (int)(v3 + 0x80000000) < 0 || v3 == -2147483643 )
    return 1;
  return v2;
}

Referenced by:

PiDevCfgCopyDeviceKey
PiDevCfgMigrateRootDevice
PiDevCfgQueryDriverNode