PiDmaGuardProcessPreAddDevice

__int64 __fastcall PiDmaGuardProcessPreAddDevice(INT64 **a1, INT64 a2){
  INT64 *v2; 
  __int64 result; 
  INT64 v5; 
  int DeviceDmarPolicy; 

  v2 = *a1;
  result = 0i64;
  v5 = (*a1)[90];
  if( v5 )
  {
    if( (*(_BYTE *)(v5 + 16) & 0x10) != 0 )
    {
      DeviceDmarPolicy = 1;
    }
    else if( (v2[70] & 0x100000) != 0 )
    {
      DeviceDmarPolicy = 2;
    }
    else
    {
      DeviceDmarPolicy = PipDmgGetDeviceDmarPolicy(a1);
    }
    return PipDmgSaveDeviceDmarPolicy((__int64)v2, a2, DeviceDmarPolicy);
  }
  return result;
}

Referenced by:

PipCallDriverAddDevice