PiInitCacheGroupInformation

NTSTATUS __stdcall PiInitCacheGroupInformation(){
  unsigned __int16 v0; 
  NTSTATUS result; 
  int RegistryValue; 
  void *v3; 
  _KEY_VALUE_FULL_INFORMATION *v4; 
  int v5; 
  _UNICODE_STRING KeyName; 
  unsigned int v7; 
  VOID *Handle; 
  _KEY_VALUE_FULL_INFORMATION *Information; 
  void *v10; 

  Information = 0i64;
  *(_DWORD *)(&KeyName.MaximumLength + 1) = 0;
  Handle = 0i64;
  v0 = 0;
  KeyName.Buffer = L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\ServiceGroupOrder";
  v7 = 0;
  *(_DWORD *)&KeyName.Length = 9044104;
  result = IopOpenRegistryKeyEx(&Handle, 0i64, &KeyName, 0x20019ui64);
  if( result >= 0 )
  {
    RegistryValue = IopGetRegistryValue(Handle, (PWCHAR)L"List", 0i64, &Information);
    ZwClose((_HANDLE)Handle);
    v3 = 0i64;
    v10 = 0i64;
    if( RegistryValue < 0 )
      return RegistryValue;
    v4 = Information;
    if( Information->Type == 7 && Information->DataLength )
    {
      v5 = PnpRegMultiSzToUnicodeStrings(Information, &v10, &v7);
      v3 = v10;
      RegistryValue = v5;
      v0 = v7;
    }
    else
    {
      RegistryValue = -1073741823;
    }
    ExFreePoolWithTag(v4, 0);
    if( RegistryValue < 0 )
    {
      return RegistryValue;
    }
    else
    {
      qword_140C50A38 = v3;
      result = 0;
      word_140C50A34[0] = v0;
    }
  }
  return result;
}

Referenced by:

IopInitializePlugPlayServices