KeSetDisableQuantumProcess

UINT64 __stdcall KeSetDisableQuantumProcess(_EPROCESS *Process, UINT64 Disable){
  int v2; 
  unsigned __int8 CurrentIrql; 
  INT64 *v5; 
  signed __int8 v6; 
  volatile signed __int32 **v7; 
  unsigned int v8; 
  volatile signed __int32 *i; 
  v2 = Disable;
  CurrentIrql = KeGetCurrentIrql();
  __writecr8(2ui64);
  v5 = (INT64 *)((char *)Process + 64);
  ExAcquireSpinLockExclusiveAtDpcLevel((INT64 *)Process + 8);
  if( v2 )
    v6 = _interlockedbittestandset((volatile signed __int32 *)Process + 158, 2u);
  else
    v6 = _interlockedbittestandreset((volatile signed __int32 *)Process + 158, 2u);
  v7 = (volatile signed __int32 **)((char *)Process + 48);
  v8 = v6;
  for( i = *v7; i != (volatile signed __int32 *)v7; i = *(volatile signed __int32 **)i )
  {
    if( v2 )
      _interlockedbittestandset(i - 160, 8u);
    else
      _interlockedbittestandreset(i - 160, 8u);
  }
  ExReleaseSpinLockExclusiveFromDpcLevel(v5);
  __writecr8(CurrentIrql);
  return v8;
}

Referenced by:

PspApplyJobLimitsToProcess