CmDeleteDeviceContainer

NTSTATUS __stdcall CmDeleteDeviceContainer(
        HPNPCTX *hPnpCtx,
        WCHAR *DeviceContainerId,
        WCHAR *Flags,
        UINT64 a4,
        INT64 a5,
        UINT8 a6,
        INT64 a7,
        INT64 a8,
        UINT64 *a9){
  UINT64 v11; 
  __int64(__fastcall *v12)(HPNPCTX *, WCHAR *, __int64); 
  int v13; 
  NTSTATUS v14; 
  NTSTATUS v15; 
  int v17; 
  int v18; 
  NTSTATUS v19; 
  INT64 v20; 
  UINT8 *v21; 
  INT64 v22; 
  INT64 v23; 
  UINT8 v24[96]; 

  memset(v24, 0i64, 0x58u);
  v12 = (__int64(__fastcall *)(HPNPCTX *, WCHAR *, __int64))*((_QWORD *)hPnpCtx + 63);
  if( v12 )
  {
    v21 = v24;
    LODWORD(v20) = 1;
    v13 = v12(hPnpCtx, DeviceContainerId, 5i64);
    if( v13 == -1073741822 )
    {
      v12 = 0i64;
    }
    else
    {
      if( v13 == -1073741536 )
        return *(_DWORD *)v24;
      if( v13 )
        return -1073741595;
    }
  }
  v14 = CmDeleteDeviceContainerWorker(
          hPnpCtx,
          DeviceContainerId,
          (WCHAR *)*(unsigned int *)&v24[16],
          v11,
          v20,
          (UINT8)v21,
          v22,
          v23,
          *(UINT64 **)v24);
  v15 = v14;
  if( !v12 )
    return v15;
  *(_DWORD *)v24 = v14;
  v17 = v12(hPnpCtx, DeviceContainerId, 5i64);
  v18 = v17;
  if( v17 == -1073741822 )
    return v15;
  if( v17 == -1073741536 )
    return *(_DWORD *)v24;
  v19 = v15;
  if( v18 )
    return -1073741595;
  return v19;
}

Referenced by:

CmAddDeviceToContainerWorker
CmRemoveDeviceFromContainerWorker