MiGetPageSlist

NTSTATUS __stdcall MiGetPageSlist(_MI_PARTITION *Partition, UINT64 Color, INT16 a3){
  int v3; 
  __int64 *v4; 
  int v5; 
  unsigned int v7; 
  int v8; 
  __int64 v9; 

  v3 = *(&stru_140C4DB30 + 66);
  v4 = &MiZeroThenZero;
  v5 = Color;
  v7 = Color;
  v8 = (a3 & 0x4000) != 0 ? 16 : 1;
  if( (a3 & 2) == 0 )
    v4 = (__int64 *)&MiFreeThenFree;
  while( 1 )
  {
    LODWORD(v9) = MiSlistGetFreePage(Partition, (_MMLISTS)v4, v7);
    if( v9 )
      break;
    v7 = v7 & ~v3 | v3 & (v8 + v7);
    if( v7 == v5 )
    {
      LODWORD(v9) = 0;
      return v9;
    }
  }
  return v9;
}

Referenced by:

MiGetFreeOrZeroPageAnyColor