We present a gauge-invariant and non-perturbative construction of the Glashow-Weinberg-Salam model on the lattice, based on the lattice Dirac operator satisfying the Ginsparg-Wilson relation. Our construction covers all SU(2) topological sectors with vanishing U(1) magnetic flux and would be usable for a description of the baryon number non-conservation. In infinite volume, it provides a gauge-invariant regularization of the electroweak theory to all orders of perturbation theory. First we formulate the reconstruction theorem which asserts that if there exists a set of local currents satisfying cetain properties, it is possible to reconstruct the fermion measure which depends smoothly on the gauge fields and fulfills the fundamental requirements such as locality, gauge-invariance and lattice symmetries. Then we give a closed formula of the local currents required for the reconstruction theorem.