Substellar mass function and maximum baryonic mass in the halo of the Galaxy