Your GPA wouldn't necessarily keep you out of a 'good' program. If by 'good' you mean a top-10 school, then it will be difficult, but there are many good programs outside of the top 10, say top 20 or even top 50. That said, you seem to be unsure of what it is you want to do - that might cause you more problems than your lowish GPA. A PhD program will expect that you have well defined research interests and the adcomms may have questions about why you switched to do a law degree only to leave the law program. As for doing a Master's, if you want to do research and get a PhD ultimately, then apply straight for the PhD. You could hedge your bets and apply to a few Master's programs, but there isn't usually much funding available for Master's students. GRE scores aren't that important among all the things that make up your application (such as your SoP, and your letters), and the only part of the GRE likely to have much impact is your quantitative score. Many engineering applicants score a perfect 800 in the quantitative GRE, so the closer you can get to that, the better.