Ballistic electrons in an open square geometry: Selective probing of resonant-energy states