Here is how a LMP calculation works at the average doctor's office. We will use your girlfriend as the subject in the scenario.
Ok your girlfriend has her last menstrual period in July, on the 25th. Now, you have to add two weeks to that (assuming her cycle is regular). That would make the ovulation date August 8th. This means that between the 6-10th of August were the most likely conception dates. So, looks to me that you are not the daddy. Now with that being said, do not take the ultrasound too much to heart. Ultrasounds can be off by 1-2 weeks. Yes, I know that makes it possible that you could be the father, but I highly doubt it. She is not as far along in her pregnancy where the ultrasound would measure so off. That usually happens around the 7th month, where things get crowded and harder to measure. The ultrasound at 4-5 months is usually off by a few days, a week at most. If I were you, I would request a paternity test.