The warm Neptune GJ436b was observed with HST/STIS at three different epochs in the stellar Ly-alpha line, showing deep, repeated transits caused by 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. Yet by itself it cannot explain the 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. Our simulations match the last two epochs well. The observed sharp early ingresses come from the abrasion of the planetary coma by the stellar wind. Spectra observed 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.5x10$^{8}$ g/s), the stellar photoionization rate (2x10$^{-5}$ /s), the stellar wind bulk velocity (85 km/s), and its kinetic dispersion velocity (10 km/s). We find high velocities for the escaping gas (50-60 km/s) that may indicate MHD waves that dissipate in the upper atmosphere and drive the planetary outflow. In the last epoch the high density of the stellar wind (3x10$^{3}$ /cm3) led to the formation of an exospheric tail mainly composed of neutralized protons. The observations of GJ436 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.