MmFreeContiguousMemory

VOID __stdcall MmFreeContiguousMemory(VOID *BaseAddress){
  NTSTATUS SystemRegionType; 
  int v3; 
  UINT64 v4; 
  UINT64 v5[2]; 
  __int128 v6; 
  UINT64 v7; 
  UINT64 NumberOfBytes; 

  NumberOfBytes = 0i64;
  *(_OWORD *)v5 = 0i64;
  v6 = 0i64;
  SystemRegionType = MiGetSystemRegionType((UINT64)BaseAddress);
  if( SystemRegionType != 5 )
  {
    if( SystemRegionType )
    {
      MiFillPteHierarchy((UINT64)BaseAddress, v5);
      v3 = 4;
      do
      {
        LODWORD(v4) = MI_READ_PTE_LOCK_FREE(v5[--v3]);
        v7 = v4;
      }
      while( (v4 & 0x80u) == 0i64 && v3 );
      if( ((unsigned __int16)BaseAddress & 0xFFF) == 0 )
      {
        ExRemovePoolTag(BaseAddress);
        KeBugCheckEx(0xC2u, (PVOID)0x60, BaseAddress, (PVOID)NumberOfBytes, 0i64);
      }
      KeBugCheckEx(0xC2u, (PVOID)0x61, BaseAddress, 0i64, 0i64);
    }
    KeBugCheckEx(0xC2u, (PVOID)0x62, BaseAddress, 0i64, 0i64);
  }
  ExFreePoolWithTag(BaseAddress, 0);
}

Referenced by:

ExtEnvAllocatePhysicalMemory
ExtEnvFreePhysicalMemory
HalFreeCommonBuffer
HalFreeCommonBufferV3
HalpAllocateDomainCommonBufferInternal
HalpDmaAllocateLocalContiguousPool
HalpDmaAllocateMapRegisters
HalpDmaFreeChildAdapter
HalpDmaGrowContiguousMapBuffers
HvlSetupPhysicalFaultNotificationQueue
HvlpFreeOverlayPages
IommupHvInitializeLibrary
IopInitializeInMemoryDumpData
ViReleaseDmaAdapter