MiObtainFreePages

VOID __stdcall MiObtainFreePages(_MI_PARTITION *Partition){
  __int64 v1; 
  INT64 v3; 
  unsigned __int64 v4; 
  v1 = *((_QWORD *)Partition + 856);
  if( v1 && *(_BYTE *)(v1 + 52) != 1 )
  {
    v3 = *((_QWORD *)Partition + 22);
    if( PsReferencePartitionSafe(v3) )
    {
      CcNotifyWriteBehindEx(1, v3);
      PsDereferencePartition(v3);
    }
    v4 = *((_QWORD *)Partition + 950);
    if( *((_QWORD *)Partition + 936) - v4 >= 0x10 )
    {
      KeSetEvent((PRKEVENT)Partition + 33, 0);
      v4 = *((_QWORD *)Partition + 950);
    }
    if( v4 >= 0x10 )
      MiWakeModifiedPageWriter(Partition, 0xFFFFFFFFFFFFFFFFui64);
    if( *(_BYTE *)(v1 + 98) )
      KeSetEvent((PRKEVENT)(v1 + 96), 0);
  }
}

Referenced by:

MiDecreaseAvailablePages
MiUnlinkFreeOrZeroedPage
MiUnlinkPageFromList
MiWaitForFreePage