PpmGetIdleConstrainedMask

UINT8 __stdcall PpmGetIdleConstrainedMask(_KAFFINITY_EX *IdleConstrainedMask){
  UINT8 v2; 
  __int64 *v3; 
  __int64 v4; 
  __int64 v5; 
  __int64 v6; 
  __int64 v7; 

  *(_QWORD *)&IdleConstrainedMask->Count = 1310721i64;
  v2 = 0;
  memset(IdleConstrainedMask->Bitmap, 0i64, sizeof(IdleConstrainedMask->Bitmap));
  if( KeNumberNodes )
  {
    v3 = KeNodeBlock;
    v4 = (unsigned __int16)KeNumberNodes;
    do
    {
      v5 = *v3;
      v6 = *(unsigned __int16 *)(*v3 + 144);
      v7 = *(_QWORD *)(*v3 + 72);
      if( IdleConstrainedMask->Count <= (unsigned __int16)v6 )
        IdleConstrainedMask->Count = v6 + 1;
      IdleConstrainedMask->Bitmap[v6] |= v7;
      if( *(_QWORD *)(v5 + 72) )
        v2 = 1;
      ++v3;
      --v4;
    }
    while( v4 );
  }
  return v2;
}

Referenced by:

PoExecuteIdleCheck
PpmEstimateIdleDuration
PpmIdlePrepare