MmGetSessionSchedulingGroupByProcess

_KSCHEDULING_GROUP *__stdcall MmGetSessionSchedulingGroupByProcess(_EPROCESS *Process){
  _MM_SESSION_SPACE *Session; 

  Session = Process->Session;
  if( !Session || (Process->Flags3 & 0x1000) != 0 )
    return 0i64;
  else
    return *(_KSCHEDULING_GROUP **)(*((_QWORD *)Session + 9) + 32i64);
}

Referenced by:

PsQueryCpuQuotaInformation
PspAllocateProcess
PspEstablishDfssHierarchy