MmPerformMemoryListCommand

NTSTATUS __stdcall MmPerformMemoryListCommand(_SYSTEM_MEMORY_LIST_COMMAND Command){
  _EPROCESS *v1; 
  _MI_PARTITION *ProcessPartition; 
  int v3; 
  int v4; 
  UINT64 v5; 
  int v7; 
  int v8; 
  int v9; 
  UINT64 v10; 

  ProcessPartition = MiGetProcessPartition(KeGetCurrentThread()->ApcState.Process, v1);
  if( !v3 )
  {
    v5 = 0i64;
    goto LABEL_4;
  }
  v4 = v3 - 1;
  if( !v4 )
  {
    v5 = 1i64;
LABEL_4:
    MiCaptureAllWorkingSetAccessBits((UINT64)ProcessPartition, v5);
    return 0;
  }
  v7 = v4 - 1;
  if( !v7 )
  {
    MiEmptyAllWorkingSets(ProcessPartition);
    return 0;
  }
  v8 = v7 - 1;
  if( !v8 )
  {
    MiFlushAllPages(ProcessPartition, 0);
    return 0;
  }
  v9 = v8 - 1;
  if( !v9 )
  {
    v10 = 8i64;
    goto LABEL_14;
  }
  if( v9 == 1 )
  {
    v10 = 1i64;
LABEL_14:
    MiPurgePartitionStandby(ProcessPartition, v10);
    return 0;
  }
  return -1073741637;
}

Referenced by:

MmIssueMemoryListCommand
PfPowerActionNotify
PfpLogScenarioEvent
PfpPowerActionStartScenarioTracing
PopVerifierFlushMemoryBeforeSleep