MiFreePartitionPageRun

VOID __stdcall MiFreePartitionPageRun(
        _MI_PARTITION *TargetPartition,
        UINT64 BasePage,
        UINT64 PageCount,
        UINT64 EntireRangeIsZeroed){
  int v5; 
  INT64 v8; 
  UINT64 i; 
  UINT64 v10; 
  v5 = EntireRangeIsZeroed;
  if( (unsigned int)MiIsPfn(BasePage) )
  {
    v10 = MiFreeMdlPageRun(BasePage, PageCount, v5 == 1);
    if( v10 && TargetPartition == (_MI_PARTITION *)&MiSystemPartition )
      _InterlockedExchangeAdd64(&qword_140C4ECF8, -(__int64)v10);
  }
  else
  {
    v8 = (BasePage >> 18) & 0x3FFFF;
    for( i = PageCount >> 18; i; --i )
    {
      MiInsertHugeRangeInList(v8, v5 == 1, 0i64);
      v8 = ((unsigned int)v8 ^ ((_DWORD)v8 + 1)) & 0x3FFFF ^ (unsigned __int64)v8;
    }
  }
}

Referenced by:

MiActOnPartitionNodePages