HalpQueryIommuReservedRegionInformation

INT64 __fastcall HalpQueryIommuReservedRegionInformation(INT64 a1, UINT64 a2){
  _DEVICE_OBJECT *v3; 
  int DeviceId; 
  __int64(__fastcall *v6)(_QWORD); 
  INT64 v7; 
  if( (unsigned int)a2 < 0x10 )
    return 3221225485i64;
  v3 = *(_DEVICE_OBJECT **)a1;
  v7 = 0i64;
  DeviceId = HalpIommuGetDeviceId(v3);
  if( DeviceId >= 0 )
  {
    DeviceId = HalpIommuLocateFromDevice(0i64, &v7, 0i64);
    if( DeviceId >= 0 )
    {
      if( v7 )
      {
        v6 = *(__int64(__fastcall **)(_QWORD))(v7 + 296);
        if( v6 )
          *(_BYTE *)(a1 + 8) = v6(0i64);
        else
          return(unsigned int)-1073741595;
      }
      else
      {
        return(unsigned int)-1073741810;
      }
    }
  }
  return(unsigned int)DeviceId;
}

Referenced by:

HaliQuerySystemInformation