HalpMcaExtendedLogGetL1DirectoryBase

NTSTATUS __fastcall HalpMcaExtendedLogGetL1DirectoryBase(_QWORD *a1, __int64 a2, WCHAR a3){
  INT64 v4; 
  NTSTATUS result; 
  NTSTATUS v6; 
  INT64 Length; 
  UINT64 Lengtha; 
  UINT64 *ResultLength; 
  UINT64 v10; 
  VOID *KeyHandle; 
  _UNICODE_STRING DestinationString; 
  _UNICODE_STRING ValueName; 
  _OBJECT_ATTRIBUTES ObjectAttributes; 
  char KeyValueInformation[12]; 
  __int64 v16; 

  *a1 = 0i64;
  *(&ObjectAttributes.Length + 1) = 0;
  *(&ObjectAttributes.Attributes + 1) = 0;
  LODWORD(v10) = 0;
  DestinationString = 0i64;
  ValueName = 0i64;
  RtlInitUnicodeString(
    &DestinationString,
    L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\ACPI\\Parameters");
  ObjectAttributes.RootDirectory = 0i64;
  ObjectAttributes.ObjectName = &DestinationString;
  ObjectAttributes.Length = 48;
  ObjectAttributes.Attributes = 576;
  *(_OWORD *)&ObjectAttributes.SecurityDescriptor = 0i64;
  result = ZwOpenKey(&KeyHandle, 0x20019ui64, &ObjectAttributes, v4, Length, (INT64)ResultLength, v10, 0i64);
  if( result >= 0 )
  {
    RtlInitUnicodeString(&ValueName, L"EMcaL1DirectoryBase");
    LODWORD(Lengtha) = 23;
    v6 = ZwQueryValueKey(KeyHandle, &ValueName, KeyValuePartialInformation, KeyValueInformation, Lengtha, &v10);
    if( v6 >= 0 )
      *a1 = v16;
    ZwClose((_HANDLE)KeyHandle);
    return v6;
  }
  return result;
}

Referenced by:

HalpMcaExtendedLogInitialize