HalpMmReservePageTablePages

NTSTATUS __stdcall HalpMmReservePageTablePages(){
  NTSTATUS result; 
  __int64 v1; 
  unsigned __int64 v2; 
  char *v3; 
  unsigned __int64 v4; 

  result = HalpInterruptModel();
  if( result == 3 )
  {
    result = HalQueryMaximumProcessorCount();
    v1 = ((unsigned int)result + 16i64) << 18;
  }
  v2 = 0i64;
  v3 = (char *)VirtualAddress;
  v4 = (unsigned __int64)(v1 + (qword_140C4B760 << 12) + 0x1FFFFF) >> 21;
  if( v4 )
  {
    do
    {
      if( (unsigned __int64)v3 > qword_140C50668 )
        break;
      result = (unsigned int)HalpMmGetPteAddressSafe(v3);
      ++v2;
      v3 += 0x200000;
    }
    while( v2 < v4 );
  }
  return result;
}

Referenced by:

HalpMmInitSystem