Embedded eigenvalues and resonances of a generalized Friedrichs model