MiDrainControlAreaWrites

VOID __stdcall MiDrainControlAreaWrites(_CONTROL_AREA *ControlArea, UINT8 OldIrql){
  bool v3; 
  __int64 v5; 
  int v6; 
  int v7; 
  __int16 PcValue; 
  char v9; 
  char v10; 
  int v11; 
  __int64 v12[3]; 
  v7 = 0;
  v3 = *((_DWORD *)ControlArea + 19) == 0;
  v10 = 0;
  if( !v3 )
  {
    do
    {
      v11 = 0;
      v12[1] = (__int64)v12;
      v6 = 8;
      v12[0] = (__int64)v12;
      v5 = *((_QWORD *)ControlArea + 10);
      *((_QWORD *)ControlArea + 10) = &v5;
      PcValue = 263;
      v9 = 6;
      ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)ControlArea + 9);
      __writecr8(OldIrql);
      KeWaitForGate(&PcValue, 18);
      OldIrql = ExAcquireSpinLockExclusive((PEX_SPIN_LOCK)ControlArea + 18);
    }
    while( *((_DWORD *)ControlArea + 19) );
  }
}

Referenced by:

MiDestroySection
MiPrepareSegmentForDeletion