MiAttemptPageFileReduction

INT64 __fastcall MiAttemptPageFileReduction(INT64 a1){
  INT64 v2; 
  __int64 v3; 
  KIRQL v4; 
  unsigned __int64 v5; 
  INT64 v6; 
  char *v7; 
  __int64 *v8; 
  __int64 v9; 
  INT64 FileInformation[2]; 
  KAPC result; 
  _BYTE Object[4]; 
  int v13; 
  __int64 v14[3]; 
  int v15; 
  int v16; 
  char v17; 
  FileInformation[0] = 0i64;
  memset((INT64)&result, 0i64);
  memset((INT64)Object, 0i64);
  v13 = 0;
  v2 = *(_QWORD *)(a1 + 24);
  v3 = 16i64;
  v14[1] = (__int64)v14;
  v14[0] = (__int64)v14;
  Object[2] = 6;
  v14[2] = v2;
  if( (*(_BYTE *)(a1 + 79) & 0x10) != 0 )
  {
    v4 = ExAcquireSpinLockExclusive((PEX_SPIN_LOCK)(v2 + 1344));
    *(_QWORD *)(a1 + 32) = 0i64;
    v5 = v4;
    ExReleaseSpinLockExclusiveFromDpcLevel((INT64 *)(v2 + 1344));
    __writecr8(v5);
    v6 = MiOkToShrinkPageFiles(*(_QWORD *)(v2 + 7464), *(_QWORD *)(v2 + 7592));
    if( !(_DWORD)v6 )
      return v6;
    v15 = 16;
  }
  else
  {
    v15 = *(unsigned __int8 *)(a1 + 76);
    v16 = *(_DWORD *)(a1 + 40);
  }
  MiQueueSyncModifiedWriterApc(v2, &result, (INT64)MiAttemptPageFileReductionApc, (INT64)Object, Object);
  v7 = &v17;
  v8 = (__int64 *)(v2 + 6944);
  do
  {
    v6 = *(unsigned int *)v7;
    if( (_DWORD)v6 )
    {
      v9 = *v8;
      FileInformation[0] = v6 << 12;
      v6 = IoSetInformation(*(FILE_OBJECT **)(v9 + 56), FileAllocationInformation, 8ui64, FileInformation);
    }
    ++v8;
    v7 += 4;
    --v3;
  }
  while( v3 );
  return v6;
}

Referenced by:

MiProcessDereferenceList