MiSectionDelete

VOID __stdcall MiSectionDelete(PVOID Object){
  unsigned int v2; 
  _CONTROL_AREA *v3; 
  __int64 v4; 
  __int64 v5; 
  int v6; 
  int v7; 
  _ETHREAD *CurrentThread; 
  v2 = *((_WORD *)Object + 29) & 1;
  v3 = MiSectionControlArea((_SECTION *)Object);
  if( *(_QWORD *)(v4 + 24) )
  {
    CurrentThread = (_ETHREAD *)KeGetCurrentThread();
    --*((_WORD *)CurrentThread + 243);
    ExAcquirePushLockExclusiveEx((UINT64)&qword_140C4C6D0, 0i64);
    RtlAvlRemoveNode((unsigned __int64 *)&qword_140C4C6C8, (__int64 *)Object);
    if( (_InterlockedExchangeAdd64((volatile signed __int64 *)&qword_140C4C6D0, 0xFFFFFFFFFFFFFFFFui64) & 6) == 2 )
      ExfTryToWakePushLock((volatile INT64 *)&qword_140C4C6D0);
    KeAbPostRelease(&qword_140C4C6D0);
    KiLeaveGuardedRegionUnsafe((__int64)CurrentThread);
  }
  v5 = *((_QWORD *)Object + 5);
  if( (v5 & 3) != 0 )
    HalPutDmaAdapter((PADAPTER_OBJECT)(v5 & 0xFFFFFFFFFFFFFFFCui64));
  v6 = *((_DWORD *)v3 + 14);
  if( (v6 & 0x20) == 0 && (*((_DWORD *)Object + 14) & 0x8000000) != 0 && *((_QWORD *)v3 + 8) )
  {
    _InterlockedAdd((volatile signed __int32 *)v3 + 23, 0xFFFFFFFF);
    v6 = *((_DWORD *)v3 + 14);
  }
  if( (v6 & 0x4000000) != 0 )
  {
    v7 = (*((_DWORD *)Object + 15) >> 12) & 0x7FFFF;
    if( v7 == 0x7FFFF )
      v7 = -1;
    MiDereferencePerSessionProtos((__int64 *)v3, v7);
  }
  MiDereferenceControlAreaBySection(v3, v2);
}

Referenced by:

No references.