Surface reconstruction of a two-band crystal: I. Green's function formalism