HalpProcGetFeatureBits

BOOL __fastcall HalpProcGetFeatureBits(){
  CHAR CpuInfo; 
  unsigned __int32 v1; 
  int v2; 
  int v3; 
  int v4; 
  int v5; 
  char v7[72]; 
  v7[0] = 0;
  if( !*((_BYTE *)KeGetCurrentPrcb() + 65) )
    return 2;
  CpuInfo = HalpGetCpuInfo(0i64, 0i64, 0i64, (UINT8 *)v7);
  v1 = EDX(__cpuid(1, 0));
  v2 = (v1 >> 12) & 4 | 8;
  if( (v1 & 0x80u) == 0 )
    v2 = (v1 >> 12) & 4;
  v3 = v2 | 0x10;
  if( (v1 & 2) == 0 )
    v3 = v2;
  v4 = v3 | 0x20;
  if( (v1 & 0x4000000) == 0 )
    v4 = v3;
  v5 = v4 | 1;
  if( (v7[0] & (unsigned __int8)-(CpuInfo != 0)) == 2
    && (unsigned int)EAX(__cpuid(0, 0)) >= 0x14
    && ((EBX(__cpuid(7, 0)) & 0x2000000) != 0 || HalpIsHvIptSupported())
    && (ECX(__cpuid(20, 0)) & 1) != 0 )
  {
    return v5 | 0x40;
  }
  return v5;
}

Referenced by:

HalpProcInitDiscard
HalpProcInitSystem