PspSetProcessSchedulingGroup

INT64 __fastcall PspSetProcessSchedulingGroup(INT64 a1, INT64 a2){
  int v4; 
  INT64 result; 
  v4 = *(_DWORD *)(a1 + 1124) & 8;
  if( !v4 || !a2 )
    KeSetProcessSchedulingGroup((_KPROCESS *)a1, (_KSCHEDULING_GROUP *)a2);
  result = *(_DWORD *)(a1 + 1124) & 8;
  if( v4 != (_DWORD)result )
  {
    if( a2 )
      return(INT64)KeSetProcessSchedulingGroup((_KPROCESS *)a1, 0i64);
  }
  return result;
}

Referenced by:

PspApplyJobChainLimitsToProcess
PspSetCpuRateControlJobPostCallback