CmGetMatchingFilteredDeviceList

__int64 __fastcall CmGetMatchingFilteredDeviceList(
        __int64 a1,
        __int64 a2,
        int a3,
        __int64 a4,
        __int64 a5,
        __int64 a6,
        int a7,
        __int64 a8){
  __int64(__fastcall *v12)(__int64, _QWORD, __int64, __int64, int, _DWORD *); 
  int v13; 
  unsigned int v14; 
  unsigned int MatchingFilteredDeviceListWorker; 
  int v17; 
  int v18; 
  unsigned int v19; 
  _DWORD result[4]; 
  const WCHAR *v22; 
  int v23; 
  char(__fastcall *v24)(__int64, const wchar_t *, unsigned int, __int64); 
  __int64 *v25; 
  _WORD *v26; 
  int v27; 
  unsigned int *v28; 
  int v29; 
  memset((INT64)result, 0i64);
  v12 = *(__int64(__fastcall **)(__int64, _QWORD, __int64, __int64, int, _DWORD *))(a1 + 504);
  v29 = 0;
  v22 = (const WCHAR *)a2;
  v23 = a3;
  v24 = (char(__fastcall *)(__int64, const wchar_t *, unsigned int, __int64))a4;
  v26 = (_WORD *)a6;
  v28 = (unsigned int *)a8;
  v25 = (__int64 *)a5;
  v27 = a7;
  if( v12 )
  {
    v13 = v12(a1, 0i64, 1i64, 16i64, 1, result);
    if( v13 == -1073741822 )
    {
      v12 = 0i64;
    }
    else
    {
      if( v13 == -1073741536 )
        return result[0];
      if( v13 )
        return(unsigned int)-1073741595;
    }
  }
  MatchingFilteredDeviceListWorker = CmGetMatchingFilteredDeviceListWorker(a1, v22, v23, v24, v25, v26, v27, v28, v29);
  v14 = MatchingFilteredDeviceListWorker;
  if( v12 )
  {
    result[0] = MatchingFilteredDeviceListWorker;
    v17 = v12(a1, 0i64, 1i64, 16i64, 2, result);
    v18 = v17;
    if( v17 != -1073741822 )
    {
      if( v17 == -1073741536 )
        return result[0];
      v19 = v14;
      if( v18 )
        return(unsigned int)-1073741595;
      return v19;
    }
  }
  return v14;
}

Referenced by:

CmDeleteInstallerClassWorker
IopGetRootDevices
PiCMGetDeviceIdList
PiDevCfgInitDriverDatabaseCallback
PipResetDevices