MiDeleteControlAreaList

void __fastcall MiDeleteControlAreaList(__int64 a1){
  volatile LONG *v2; 
  KIRQL v3; 
  _CONTROL_AREA *v4; 
  unsigned __int64 v5; 
  v2 = (volatile LONG *)(a1 + 1344);
  while( 1 )
  {
    v3 = ExAcquireSpinLockExclusive(v2);
    v4 = *(_CONTROL_AREA **)(a1 + 1776);
    v5 = v3;
    if( v4 )
      *(_QWORD *)(a1 + 1776) = *(_QWORD *)v4;
    ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)v2);
    __writecr8(v5);
    if( !v4 )
      break;
    MiDeleteControlArea(v4);
  }
}

Referenced by:

MiDereferenceSegmentThread