HalpApicIsCmciImplemented

BOOL __fastcall HalpApicIsCmciImplemented(INT64 *a1, INT64 *a2){
  __int64 v4; 
  int v5; 
  char v6; 
  int v7; 
  bool v8; 
  unsigned __int64 v9; 
  char v11; 
  v11 = 0;
  LOBYTE(v4) = HalpApicGetCpuInfo(0i64, 0i64, 0i64, (INT64)&v11);
  v5 = 0;
  v6 = (_BYTE)v4 != 0 ? v11 : 0;
  v7 = 0;
  v8 = 0;
  v11 = v6;
  if( v6 == 2 )
  {
    v9 = __readmsr(0x179u);
    LODWORD(v9) = v9 & 0x400;
    v8 = (_DWORD)v9 != 0;
    v4 = -(__int64)(unsigned int)v9;
    v5 = v4 != 0 ? 0x2F0 : 0;
  }
  else if( v6 == 1 )
  {
    LODWORD(v4) = ((__int64(__fastcall *)(__int64))HalpApicRead)(48i64);
    if( (int)v4 < 0 )
    {
      LODWORD(v4) = ((__int64(__fastcall *)(__int64))HalpApicRead)(1024i64) & 0xFF0000;
      v5 = (unsigned int)v4 > 0x10000 ? 0x510 : 0;
      v8 = (unsigned int)v4 > 0x10000;
      if( (unsigned int)v4 > 0x20000 )
        v7 = 1312;
    }
  }
  if( a1 && v8 )
    *(_DWORD *)a1 = v5;
  if( a2 )
    *(_DWORD *)a2 = v7;
  LOBYTE(v4) = v8;
  return v4;
}

Referenced by:

HalpApicInitializeLocalUnit