HalGetMemoryCachingRequirements

INT64 __fastcall HalGetMemoryCachingRequirements(
        LARGE_INTEGER PhysicalAddress,
        UINT64 Length,
        MEMORY_CACHING_TYPE *CacheType){
  int v3; 
  unsigned int v5; 
  __int64 i; 
  LARGE_INTEGER v7; 
  LARGE_INTEGER v8; 
  v3 = 0;
  if( CacheType )
  {
    v5 = HalpCachingRequirementsEntryCount;
    *CacheType = MmNonCached;
    if( !v5 )
      return 3221225473i64;
    for( i = HalpCachingRequirements; ; i += 24i64 )
    {
      v7.QuadPart = *(_QWORD *)i << 12;
      if( PhysicalAddress.QuadPart >= (unsigned __int64)v7.QuadPart )
      {
        v8.QuadPart = v7.QuadPart + (*(_QWORD *)(i + 8) << 12);
        if( PhysicalAddress.QuadPart + Length <= v8.QuadPart )
        {
          *CacheType = *(MEMORY_CACHING_TYPE *)(i + 16);
          return 0i64;
        }
        if( PhysicalAddress.QuadPart < (unsigned __int64)v8.QuadPart )
          return 3221225485i64;
      }
      if( ++v3 >= v5 )
        return 3221225473i64;
    }
  }
  return 3221225485i64;
}

Referenced by:

HalpPowerInitFwPerformanceTableMappings
PopGetHwConfigurationSignature