MiUnlockVadShared

INT64 __fastcall MiUnlockVadShared(INT64 a1, INT64 a2){
  void *v2; 
  *(_BYTE *)(a1 + 1305) &= ~0x40u;
  v2 = (void *)(a2 + 40);
  if( _InterlockedCompareExchange64((volatile signed __int64 *)(a2 + 40), 0i64, 17i64) != 17 )
    ExfReleasePushLockShared((INT64 *)(a2 + 40));
  KeAbPostRelease(v2);
  return KiLeaveGuardedRegionUnsafe(a1);
}

Referenced by:

MiHotPatchImage
MiHotPatchProcess
MiObtainReferencedVadEx
MiReferenceCfgVad
MiScrubProcessLargePages
MmEnumerateAddressSpaceAndReferenceImages
MmIsFileMapped
MmQueryVirtualMemory
NtAreMappedFilesTheSame