PpmHeteroDetectHgsCores
CHAR __fastcall PpmHeteroDetectHgsCores(INT64 a1){
CHAR v1;
unsigned __int8 v3;
char v4;
unsigned __int8 v5;
unsigned __int8 v6;
unsigned __int8 v7;
_BYTE *v8;
unsigned __int8 v9;
unsigned __int8 v10;
unsigned __int8 v11;
unsigned __int8 v12;
__int64 v13;
__int64 v14;
bool v15;
INT64 v16;
bool v17;
char v18;
unsigned __int8 v19;
unsigned __int8 v20;
__int64 v21;
_BYTE *v22;
INT64 v23;
INT64 *v24;
__int64 v25;
__int16 v26;
int v27;
__int16 v28;
UINT64 ProcessorNumber;
v1 = 0;
v27 = 0;
v28 = 0;
LODWORD(ProcessorNumber) = 0;
if( PpmHeteroHgsEnabled && PpmHeteroHgsHeteroCoreTypes )
{
v3 = 0;
v26 = 0;
v4 = 0;
v5 = 0;
v6 = 0;
v1 = 1;
v7 = -1;
v25 = qword_140C11268[0];
v24 = &PpmCheckRegistered;
while( !(unsigned int)KeEnumerateNextProcessor(&ProcessorNumber, (unsigned __int16 **)&v24) )
{
KeGetPrcb((unsigned int)ProcessorNumber);
v9 = v8[33279];
v10 = v9;
if( v9 <= v3 )
v10 = v3;
v3 = v10;
if( v9 >= v7 )
v9 = v7;
v7 = v9;
v11 = v8[33278];
v12 = v11;
if( v11 <= v5 )
v12 = v5;
v5 = v12;
if( v11 <= v6 )
v11 = v6;
v6 = v11;
if( v8[33276] )
v4 = 1;
}
if( PpmHeteroHgsPopulated )
{
v18 = (v4 != 0) + 1;
*(_BYTE *)(a1 + 4) = v18;
*(_BYTE *)(a1 + 5) = v18;
v19 = *(_BYTE *)(a1 + 4);
v26 = 0;
if( v19 >= v5 )
v19 = v5;
*(_BYTE *)(a1 + 4) = v19;
v20 = *(_BYTE *)(a1 + 5);
if( v20 >= v6 )
v20 = v6;
*(_BYTE *)(a1 + 5) = v20;
v25 = qword_140C11268[0];
v24 = &PpmCheckRegistered;
while( !(unsigned int)KeEnumerateNextProcessor(&ProcessorNumber, (unsigned __int16 **)&v24) )
{
KeGetPrcb((unsigned int)ProcessorNumber);
v21 = (unsigned int)ProcessorNumber + 2i64;
v23 = a1 + 2 * v21;
*(_BYTE *)(v21 + v23 + 2) = v22[33277];
*(_BYTE *)(v21 + v23 + 1) = v22[33278];
*(_BYTE *)(v21 + v23) = v22[33279] != v7;
}
}
else if( v3 != v7 )
{
*(_WORD *)(a1 + 4) = 257;
v25 = qword_140C11268[0];
v24 = &PpmCheckRegistered;
v26 = 0;
while( !(unsigned int)KeEnumerateNextProcessor(&ProcessorNumber, (unsigned __int16 **)&v24) )
{
KeGetPrcb((unsigned int)ProcessorNumber);
v13 = (unsigned int)ProcessorNumber + 2i64;
v15 = *(_BYTE *)(v14 + 33279) == v7;
v16 = a1 + 2 * v13;
v17 = *(_BYTE *)(v14 + 33279) != v7;
*(_BYTE *)(v13 + v16) = v17;
*(_BYTE *)(v13 + v16 + 2) = v17;
*(_BYTE *)(v13 + v16 + 1) = v15;
}
}
}
return v1;
}Referenced by:
PopInitializeHeteroProcessors