CmGetMatchingDeviceList

__int64 __fastcall CmGetMatchingDeviceList(__int64 a1, __int64 a2, __int64 a3, __int64 a4, int a5, __int64 a6, int a7){
  __int64(__fastcall *v11)(__int64, _QWORD, __int64, __int64, int, unsigned int *); 
  int v12; 
  unsigned int MatchingDeviceListForSubkey; 
  int v15; 
  unsigned int v16; 
  unsigned int result[4]; 
  __int64 v18; 
  __int64 v19; 
  _WORD *v20; 
  int v21; 
  unsigned int *v22; 
  int v23; 
  memset((INT64)result, 0i64);
  v11 = *(__int64(__fastcall **)(__int64, _QWORD, __int64, __int64, int, unsigned int *))(a1 + 504);
  v19 = a3;
  v21 = a5;
  v18 = a2;
  v20 = (_WORD *)a4;
  v22 = (unsigned int *)a6;
  v23 = a7;
  if( v11 )
  {
    v12 = v11(a1, 0i64, 1i64, 4i64, 1, result);
    if( v12 == -1073741822 )
    {
      v11 = 0i64;
    }
    else
    {
      if( v12 == -1073741536 )
        return result[0];
      if( v12 )
        return(unsigned int)-1073741595;
    }
  }
  if( (_WORD)v23 )
    MatchingDeviceListForSubkey = -1073741811;
  else
    MatchingDeviceListForSubkey = CmGetMatchingDeviceListForSubkey(a1, 0i64, 0, v18, v19, v20, v21, v22);
  if( !v11 )
    return MatchingDeviceListForSubkey;
  result[0] = MatchingDeviceListForSubkey;
  v15 = v11(a1, 0i64, 1i64, 4i64, 2, result);
  if( v15 == -1073741822 )
    return MatchingDeviceListForSubkey;
  if( v15 == -1073741536 )
    return result[0];
  v16 = MatchingDeviceListForSubkey;
  if( v15 )
    return(unsigned int)-1073741595;
  return v16;
}

Referenced by:

CmDeleteDeviceWorker
PipMigratePnpState
PnpDispatchDevice