PiDevCfgOpenDriverConfiguration

NTSTATUS __stdcall PiDevCfgOpenDriverConfiguration(
        VOID *DriverPackageKeyHandle,
        WCHAR *ConfigurationId,
        VOID **ConfigurationKeyHandle,
        INT64 a4,
        INT64 a5,
        INT64 a6,
        INT64 a7,
        INT64 a8){
  int v10; 
  VOID *v11; 
  INT64 v12; 
  _UNICODE_STRING DestinationString; 
  _OBJECT_ATTRIBUTES ObjectAttributes; 
  VOID *KeyHandle; 

  memset(&ObjectAttributes.Attributes + 1, 0, 20);
  KeyHandle = 0i64;
  ObjectAttributes.ObjectName = &DestinationString;
  ObjectAttributes.Attributes = 576;
  v10 = ZwOpenKey(
          &KeyHandle,
          0x20019ui64,
          &ObjectAttributes,
          a4,
          1966108i64,
          (INT64)L"Configurations",
          48i64,
          (INT64)DriverPackageKeyHandle);
  if( v10 >= 0 )
  {
    RtlInitUnicodeString(&DestinationString, ConfigurationId);
    v11 = KeyHandle;
    *(&ObjectAttributes.Length + 1) = 0;
    *(&ObjectAttributes.Attributes + 1) = 0;
    *ConfigurationKeyHandle = 0i64;
    ObjectAttributes.ObjectName = &DestinationString;
    ObjectAttributes.Length = 48;
    ObjectAttributes.Attributes = 576;
    *(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
    v10 = ZwOpenKey(
            ConfigurationKeyHandle,
            0x20019ui64,
            &ObjectAttributes,
            v12,
            *(INT64 *)&DestinationString.Length,
            (INT64)DestinationString.Buffer,
            *(INT64 *)&ObjectAttributes.Length,
            (INT64)v11);
  }
  if( KeyHandle )
    ZwClose((_HANDLE)KeyHandle);
  return v10;
}

Referenced by:

PiDevCfgQueryDriverNode
PiDevCfgQueryIncludedDriverNode