In recent years there have been many attempts to characterize the occurrence of stellar, BD and planetary-mass companions to solar-type stars, with the aim of constraining formation mechanisms. From RV observations a dearth of companions with masses between 10-40 MJup has been noticed at close separations, suggesting the possibility of a distinct formation mechanism for objects above and below this range. We present a model for the substellar companion mass function (CMF). It consists of the superposition of the planet and BD companion mass distributions, assuming that we can extrapolate the RV measured companion mass function for planets to larger separations and the stellar companion mass-ratio distribution over all separations into the BD mass regime. By using both the results of the VLT/NaCo large program and the complementary archive datasets that probe the occurrence of planets and BDs on wide orbits around solar-type stars, we place some constraints on the planet and BD distributions. We developed a MC simulation tool to predict the outcome of a given survey, depending on the shape of the orbital parameter distributions. Comparing the predictions with the results of the observations, we calculate how likely different models are and which can be ruled out. Current observations are consistent with the proposed model for the CMF, as long as a sufficiently small outer truncation radius is introduced for the planet separation distribution. The results of the direct imaging surveys searching for substellar companions around Sun-like stars are consistent with a combined substellar mass spectrum of planets and BDs. This mass distribution has a minimum between 10 and 50 MJup, in agreement with RV measurements. The dearth of objects in this mass range would naturally arise from the shape of the mass distribution, without the introduction of any distinct formation mechanism for BDs.