BiGetObjectDescription

__int64 __fastcall BiGetObjectDescription(__int64 a1, _DWORD *a2){
  void *v3; 
  int v4; 
  VOID *v5; 
  int RegistryValue; 
  VOID *ParentHandle; 
  UINT64 Length; 
  VOID *Buffer; 
  ParentHandle = 0i64;
  v3 = 0i64;
  Buffer = 0i64;
  v4 = BiOpenKey((PVOID)a1, (WCHAR *)L"Description", 0x20019ui64, &ParentHandle);
  if( v4 >= 0 )
  {
    v5 = ParentHandle;
    LODWORD(Length) = 0;
    *a2 = 1;
    RegistryValue = BiGetRegistryValue(v5, (WCHAR *)L"Type", 0i64, 4ui64, &Buffer, &Length);
    v3 = Buffer;
    v4 = RegistryValue;
    if( RegistryValue >= 0 )
    {
      if( (_DWORD)Length == 4 )
        a2[1] = *(_DWORD *)Buffer;
      else
        v4 = -1073741788;
    }
  }
  if( ParentHandle )
    BiCloseKey(ParentHandle);
  if( v3 )
    ExFreePoolWithTag(v3, 0x4B444342u);
  return(unsigned int)v4;
}

Referenced by:

BcdEnumerateObjects
BcdQueryObject
BiBuildIdentifierList
BiIsLinkedToEfiVariable