CmGetMatchingFilteredDeviceInterfaceList

NTSTATUS __stdcall CmGetMatchingFilteredDeviceInterfaceList(
        HPNPCTX *hPnpCtx,
        const WCHAR *ClassGuid,
        const WCHAR *DeviceInstanceId,
        INT64 FilterFlags,
        UINT8 *MatchCallbackRoutine,
        HPNPCTX *a6,
        const WCHAR *a7,
        _CM_OBJECT_TYPE a8,
        VOID *a9,
        VOID *MatchCallbackContext,
        WCHAR *Buffer,
        UINT64 BufferLength,
        UINT64 *RequiredLength,
        UINT64 Flags){
  int v16; 
  __int64(__fastcall *v17)(HPNPCTX *, _QWORD, __int64, __int64, int, UINT64 **); 
  HPNPCTX *v18; 
  int v19; 
  NTSTATUS v20; 
  __int64(__fastcall *v22)(HPNPCTX *, _QWORD, __int64, __int64, int, UINT64 **); 
  NTSTATUS MatchingFilteredDeviceInterfaceListWorker; 
  int v24; 
  int v25; 
  NTSTATUS v26; 
  VOID *v27; 
  UINT64 v29; 
  UINT64 *v30[12]; 

  v16 = FilterFlags;
  memset(v30, 0i64, 0x58u);
  v30[2] = (UINT64 *)ClassGuid;
  v30[3] = (UINT64 *)DeviceInstanceId;
  LODWORD(v30[4]) = v16;
  v17 = (__int64(__fastcall *)(HPNPCTX *, _QWORD, __int64, __int64, int, UINT64 **))*((_QWORD *)hPnpCtx + 63);
  LODWORD(v30[8]) = a8;
  v30[5] = (UINT64 *)MatchCallbackRoutine;
  v18 = hPnpCtx;
  v30[9] = (UINT64 *)a9;
  LODWORD(v30[10]) = (_DWORD)MatchCallbackContext;
  v29 = (UINT64)v17;
  v30[6] = (UINT64 *)a6;
  v30[7] = (UINT64 *)a7;
  if( v17 )
  {
    v19 = v17(hPnpCtx, 0i64, 3i64, 17i64, 1, v30);
    if( v19 == -1073741822 )
    {
      v22 = 0i64;
    }
    else
    {
      if( v19 == -1073741536 )
        return(NTSTATUS)v30[0];
      if( v19 )
        return -1073741595;
      v22 = (__int64(__fastcall *)(HPNPCTX *, _QWORD, __int64, __int64, int, UINT64 **))v29;
    }
  }
  else
  {
    v22 = 0i64;
  }
  LODWORD(v27) = v30[10];
  MatchingFilteredDeviceInterfaceListWorker = CmGetMatchingFilteredDeviceInterfaceListWorker(
                                                hPnpCtx,
                                                (const WCHAR *)v30[2],
                                                (const WCHAR *)v30[3],
                                                LODWORD(v30[4]),
                                                (UINT8 *)v30[5],
                                                (HPNPCTX *)v30[6],
                                                (const WCHAR *)v30[7],
                                                (_CM_OBJECT_TYPE)v30[8],
                                                v30[9],
                                                v27,
                                                (WCHAR *)hPnpCtx,
                                                v29,
                                                v30[0],
                                                (UINT64)v30[1]);
  v20 = MatchingFilteredDeviceInterfaceListWorker;
  if( v22 )
  {
    LODWORD(v30[0]) = MatchingFilteredDeviceInterfaceListWorker;
    v24 = v22(v18, 0i64, 3i64, 17i64, 2, v30);
    v25 = v24;
    if( v24 != -1073741822 )
    {
      if( v24 == -1073741536 )
        return(NTSTATUS)v30[0];
      v26 = v20;
      if( v25 )
        return -1073741595;
      return v26;
    }
  }
  return v20;
}

Referenced by:

CmDeleteDeviceWorker
CmDeleteInterfaceClassWorker
CmGetMatchingDeviceInterfaceList
IopGetDeviceInterfaces
PiDevCfgConfigureDeviceInterfaces
PnpDeleteDeviceInterfaces
PnpDeviceRaisePropertyChangeEventWorker
PnpDisableDeviceInterfaces