KeAndAffinityEx
NTSTATUS __fastcall KeAndAffinityEx(UINT16 *a1, UINT16 *a2, INT8 *a3){
INT8 *v6;
UINT16 v7;
NTSTATUS v8;
unsigned __int16 v9;
__int64 v10;
bool v11;
__int64 v12;
char v14[176];
memset(v14, 0i64, 0xA8u);
v6 = v14;
v7 = *a2;
if( a3 )
v6 = a3;
v8 = 0;
v9 = 0;
if( *a1 < v7 )
v7 = *a1;
*(_WORD *)v6 = v7;
if( v7 )
{
do
{
v10 = 4i64 * v9;
v11 = (*(_QWORD *)&a2[v10 + 4] & *(_QWORD *)&a1[v10 + 4]) == 0i64;
*(_QWORD *)&v6[v10 * 2 + 8] = *(_QWORD *)&a2[v10 + 4] & *(_QWORD *)&a1[v10 + 4];
if( !v11 )
v8 = 1;
++v9;
}
while( v9 < *(_WORD *)v6 );
}
if( v6 != v14 )
{
*((_DWORD *)v6 + 1) = 0;
*((_WORD *)v6 + 1) = 20;
if( v9 < 0x14u )
{
do
{
v12 = v9++;
*(_QWORD *)&v6[8 * v12 + 8] = 0i64;
}
while( v9 < *((_WORD *)v6 + 1) );
}
}
return v8;
}Referenced by:
KeInitializeProfile
KeIsSubsetAffinityEx
KeQueryLogicalProcessorRelationship
KiGetDeepIdleProcessors
PpmParkReportParkedCores
PpmParkSteerInterrupts
PspSetEffectiveJobLimits