KeFlushProcessWriteBuffers

VOID __stdcall KeFlushProcessWriteBuffers(UINT8 AllProcessors){
  unsigned __int8 CurrentIrql; 
  struct _KPRCB *CurrentPrcb; 
  unsigned int v3; 
  UINT16 *v4; 
  int v5; 
  CurrentIrql = KeGetCurrentIrql();
  __writecr8(0xCui64);
  CurrentPrcb = KeGetCurrentPrcb();
  v3 = 0;
  v4 = (UINT16 *)((char *)CurrentPrcb + 11704);
  if( AllProcessors )
  {
    v5 = KeNumberProcessors_0 - 1;
    v4 = 0i64;
    v3 = 1;
  }
  else
  {
    KeCopyAffinityEx(
      (__int64)CurrentPrcb + 11704,
      (unsigned __int16 *)(*(_QWORD *)(*((_QWORD *)CurrentPrcb + 1) + 184i64) + 368i64));
    KeRemoveProcessorAffinityEx((unsigned __int16 *)CurrentPrcb + 5852, *((_DWORD *)CurrentPrcb + 9));
    v5 = KeCountSetBitsAffinityEx((_KAFFINITY_EX *)((char *)CurrentPrcb + 11704));
  }
  if( v5 )
  {
    KiIpiSendPacket(v3, v4, (INT64)xHalTimerWatchdogStop, 0i64, 0i64, 0i64);
    while( *((_DWORD *)CurrentPrcb + 2912) )
      _mm_pause();
  }
  __writecr8(CurrentIrql);
}

Referenced by:

ExpGetProcessInformation
ExpQuerySystemInformation
KeFlushMultipleRangeTb
KeFlushTb
KeQueryTotalCycleTimeThread
KeSetPriorityAndQuantumProcess
NtFlushProcessWriteBuffers
PoFxSendSystemLatencyUpdate
PpmClearExitLatencySamplingPercentage
PpmSetExitLatencySamplingPercentage
PsQueryTotalCycleTimeProcess
PspTerminateAllThreads