IoGetLegacyVetoList

INT64 __fastcall IoGetLegacyVetoList(WCHAR **VetoList, _PNP_VETO_TYPE *VetoType){
  bool v4; 
  INT64 result; 
  const void *v6[2]; 
  WCHAR **v7; 
  int v8; 
  int v9; 
  _PNP_VETO_TYPE *v10; 
  unsigned int *v11; 
  unsigned int v12; 
  v9 = 0;
  HIDWORD(v6[0]) = 0;
  if( VetoList )
    *VetoList = 0i64;
  v4 = PnPInitialized == 0;
  *VetoType = PNP_VetoTypeUnknown;
  v12 = 0;
  if( v4 )
    return 0i64;
  v7 = VetoList;
  v11 = &v12;
  v8 = 0;
  v10 = VetoType;
  IopGetLegacyVetoListDrivers((__int64)&v7);
  result = v12;
  if( (v12 & 0x80000000) != 0 )
    goto LABEL_14;
  if( *VetoType == PNP_VetoTypeUnknown )
  {
    PpDevNodeLockTree(0);
    IopGetLegacyVetoListDeviceNode((__int64)IopRootDeviceNode, (__int64)&v7);
    PpDevNodeUnlockTree(0);
    result = v12;
  }
  if( (int)result < 0 )
    goto LABEL_14;
  if( *VetoType && VetoList )
  {
    LODWORD(v6[0]) = 0x20000;
    v6[1] = &word_1407CF120;
    IopAppendLegacyVeto((const void ***)&v7, v6);
    result = v12;
  }
  if( (int)result < 0 )
  {
LABEL_14:
    if( VetoList )
    {
      if( *VetoList )
      {
        ExFreePoolWithTag(*VetoList, 0);
        result = v12;
        *VetoList = 0i64;
      }
    }
  }
  return result;
}

Referenced by:

ExpQueryLegacyDriverInformation
PnpProcessQueryRemoveAndEject
PnprLegacyDeviceDriversPresent
PopFilterCapabilities