HalpPowerInitDiscard

NTSTATUS __stdcall HalpPowerInitDiscard(_LOADER_PARAMETER_BLOCK *LoaderBlock){
  __int64 ***v2; 
  __int64 **i; 
  unsigned __int64 v4; 
  __int64 v5; 
  UINT64 v6; 
  UINT64 v7; 
  HalpLowMemoryMap.SizeOfBitMap = 256;
  off_140C005A8[0] = (__int64(__fastcall *)())HaliLocateHiberRanges;
  HalpLowMemoryMapStack.SizeOfBitMap = 256;
  off_140C005D8 = (void(__fastcall __noreturn *)())HaliHaltSystem;
  off_140C00838[0] = (__int64(__fastcall *)())HalpPowerEarlyRestore;
  off_140C008A8[0] = (__int64(__fastcall *)())HalpPowerSetRebootHandler;
  HalpLowMemoryMap.Buffer = (unsigned int *)HalpLowMemoryMapBuffer;
  HalpLowMemoryMapStack.Buffer = (unsigned int *)HalpLowMemoryMapStackBuffer;
  RtlSetAllBits(&HalpLowMemoryMap);
  v2 = (__int64 ***)((char *)LoaderBlock + 32);
  for( i = *v2; i != (__int64 **)v2; i = (__int64 **)*i )
  {
    v4 = *((int *)i + 4);
    if( (unsigned int)v4 <= 0x23 )
    {
      v5 = 0xBC0400048i64;
      if( _bittest64(&v5, v4) )
        continue;
    }
    if( (unsigned __int64)i[3] < 0x100 )
    {
      v6 = *((unsigned int *)i + 6);
      v7 = (unsigned int)(256 - v6);
      if( v7 > (unsigned __int64)i[4] )
        v7 = *((unsigned int *)i + 8);
      RtlClearBits(&HalpLowMemoryMap, v6, v7);
    }
  }
  HalpPowerInitNvsRegionData();
  return 0;
}

Referenced by:

HalpPowerInitSystem