MiReturnCrossPartitionControlAreaCharges

VOID __stdcall MiReturnCrossPartitionControlAreaCharges(INT64 a1){
  _BOOL8 v2; 
  unsigned __int64 v3; 
  UINT64 v4; 
  UINT64 v5; 

  v2 = *(_QWORD *)(a1 + 64) != 0i64;
  v3 = (unsigned __int8)ExAcquireSpinLockExclusive((INT64 *)(a1 + 72));
  LODWORD(v4) = MiDecrementSubsectionViewCount((_MSUBSECTION *)(a1 + 128));
  v5 = v4;
  ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)(a1 + 72));
  __writecr8(v3);
  if( v5 )
    MiReturnCrossPartitionSectionCharges(
      *(_MI_CROSS_PARTITION_CHARGES **)(*(&stru_140C4DB30 + 267) + 8i64 * (*(_WORD *)(a1 + 60) & 0x3FF)),
      v2,
      v5);
}

Referenced by:

MiApplyHotPatchToLoadedDriver
MiDeleteVad
MiMapImageInSystemSpace
MiMapViewOfImageSection
MiReleaseSessionDriverCharges
MiRemoveMappedPtes
MiSessionInsertImage
MiUnmapImageInSystemSpace
MmLoadSystemImageEx