Observations of the warm Neptune GJ 436 b were performed with HST/STIS at three different epochs (2012, 2013, 2014) in the stellar Lyman-α line. They showed deep, repeated transits that were attributed to a giant exosphere of neutral hydrogen. The low radiation pressure from the M-dwarf host star was shown to play a major role in the dynamics of the escaping gas and its dispersion within a large volume around the planet. Yet by itself it cannot explain the specific time-variable spectral features detected in each transit. Here we investigate the combined role of radiative braking and stellar wind interactions using numerical simulations with the EVaporating Exoplanet code (EVE) and we derive atmospheric and stellar properties through the direct comparison of simulated and observed spectra. The first epoch of observations is difficult to interpret because of the lack of out-of-transit data. In contrast, the results of our simulations match the observations obtained in 2013 and 2014 well. The sharp early ingresses observed in these epochs come from the abrasion of the planetary coma by the stellar wind. Spectra observed at later times during the transit can be produced by a dual exosphere of planetary neutrals (escaped from the upper atmosphere of the planet) and neutralized protons (created by charge-exchange with the stellar wind). We find similar properties at both epochs for the planetary escape rate (∼2.5 × 10 8 g s −1 ), the stellar photoionization rate (∼2 × 10 −5 s −1 ), the stellar wind bulk velocity (∼85 km s −1 ), and its kinetic dispersion velocity (∼10 km s −1 , corresponding to a kinetic temperature of 12 000 K). We also find high velocities for the escaping gas (∼50−60 km s −1 ) that may indicate magnetohydrodynamic (MHD) waves that dissipate in the upper atmosphere and drive the planetary outflow. In 2014 the high density of the stellar wind (∼3 × 10 3 cm −3 ) led to the formation of an exospheric tail that was mainly composed of neutralized protons and produced a stable absorption signature during and after the transit. The observations of GJ 436 b allow for the first time to clearly separate the contributions of radiation pressure and stellar wind and to probe the regions of the exosphere shaped by each mechanism. The overall shape of the cloud, which is constant over time, is caused by the stability of the stellar emission and the planetary mass loss, while the local changes in the cloud structure can be interpreted as variations in the density of the stellar wind.