The Companion Mass Function Across The Stellar And Substellar Regime