We analyse cosmological hydrodynamic simulations that include observationally-constrained prescriptions for galactic outflows. If these simulated winds accurately represent winds in the real Universe, then material previously ejected in winds provides the dominant source of gas infall for new star formation at redshifts z<1. This recycled wind accretion, or wind mode, provides a third physically distinct accretion channel in addition to the "hot" and "cold" modes emphasised in recent theoretical studies. Because of the interaction between outflows and gas in and around halos, the recycling timescale of wind material (t_rec) is shorter in higher-mass systems, which reside in denser gaseous environments. In these simulations, this differential recycling plays a central role in shaping the present-day galaxy stellar mass function (GSMF). If we remove all particles that were ever ejected in a wind, then the predicted GSMFs are much steeper than observed; galaxy masses are suppressed both by the direct removal of gas and by the hydrodynamic heating of their surroundings, which reduces subsequent infall. With wind recycling included, the simulation that incorporates our favoured momentum-driven wind scalings reproduces the observed GSMF for stellar masses 10^9 < M < 5x10^10 Msolar. At higher masses, wind recycling leads to excessive galaxy masses and excessive star formation rates relative to observations. In these massive systems, some quenching mechanism must suppress the re-accretion of gas ejected from star-forming galaxies. In short, as has long been anticipated, the form of the GSMF is governed by outflows; the unexpected twist here for our simulated winds is that it is not primarily the ejection of material but how the ejected material is re-accreted that governs the GSMF.