MiQueueWorkingSetRequest

VOID __stdcall MiQueueWorkingSetRequest(_MI_PARTITION *Partition, UINT64 RequestFlags){
  int v2; 
  int v3; 
  __int64 v4; 
  UINT64 v5; 
  UINT8 v6; 
  UINT8 v7; 
  int v8; 
  IRP *v9; 
  struct _KLOCK_QUEUE_HANDLE LockHandle; 
  v2 = RequestFlags;
  v3 = *((_DWORD *)Partition + 1);
  memset(&LockHandle, 0, sizeof(LockHandle));
  if( (v3 & 0x20) == 0 )
  {
    v4 = *((_QWORD *)Partition + 856);
    if( v4 )
    {
      KeAcquireInStackQueuedSpinLock(&WorkerRoutine, &LockHandle);
      v8 = *(_DWORD *)(v4 + 40);
      if( !v8 )
      {
        KeResetEvent((VOID *)v4, v5, v6, v7, v9);
        v8 = *(_DWORD *)(v4 + 40);
      }
      *(_DWORD *)(v4 + 40) = v2 | v8;
      KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
      __writecr8(LockHandle.OldIrql);
      KeSetEvent((PRKEVENT)(v4 + 96), 0);
      KeWaitForSingleObject((PVOID)v4, WrVirtualMemory, 0, 0, 0i64);
    }
  }
}

Referenced by:

MiCaptureAllWorkingSetAccessBits
MiEmptyAllWorkingSets
MiFindContiguousPages
MmTrimFilePagesFromWorkingSets