Fluxes and Nuclear Abundances of Cosmic Rays inside the Magnetosphere using a Transmission Function Approach