MiDeletePagingFiles

NTSTATUS __stdcall MiDeletePagingFiles(_MI_PARTITION *Partition){
  volatile unsigned int NumberOfPagingFiles; 
  UINT64 v2; 
  __int64 v3; 
  _MMPAGING_FILE **PagingFile; 
  __int64 v6; 
  _MMPAGING_FILE *v7; 

  NumberOfPagingFiles = Partition->Vp.NumberOfPagingFiles;
  v2 = 0i64;
  v3 = 0i64;
  if( NumberOfPagingFiles )
  {
    PagingFile = Partition->Vp.PagingFile;
    v6 = NumberOfPagingFiles;
    do
    {
      v7 = *PagingFile;
      if( *PagingFile )
      {
        if( (v7->_bf_cc & 0x50) == 0 )
        {
          v3 += v7->Size;
          v2 += 2i64;
        }
        MiDeletePagefile(v7, 1ui64);
      }
      ++PagingFile;
      --v6;
    }
    while( v6 );
    if( v2 )
      MiReturnCommit(Partition, v2);
  }
  return v3;
}

Referenced by:

MiDeletePartitionResources
MiShutdownSystem