I recently had to update my graphics card as well to make GTA4 playable. Before I had a 320mb 8800gts and i recently upgraded to a 1gb radeon 4850. The game plays about as well as my processor allows, though I wish I coulda got a 4870 instead (i had psu limitations). Actually my situation is very similar to yours, I bought an HP and then I upgraded the parts over time to make it actually a decent gaming machine. I'm still not comfortable enough with motherboards and processors to build my own, maybe next time. Here is what I learned from upgrading for this game:
1) For GTA4 you need 1gb of memory of your card. Do not get a 512mb card.
2) Your HP came with a weak power supply. In order to get a current gen card you will have to buy a new power supply. I would suggest a Corsair 550VX. A 550W psu will let you buy a 4870 or equivalent NVIDIA card. I only had a 450VX which limited my graphics card choices alot.
3) I would suggest a 1gb 4870 card. My 4850 gets the job done, but for a little more ($20) you can get a card which will let you play games at high details for a couple of years. Whereas the 4850 is probably going to have to go down to medium setting in less than 2 years.
4) Don't be afraid of installing a new psu and graphics card. I had never done it before but it was simple. Just make sure you remember/write down everything that was plugged in. If you haven't installed a graphics card before don't worry, it is even easier than a psu.
5) These new cards are big!!! Look at the dimensions online and make sure they will fit in your case. Your 8400 is gonna look puny compared to whatever you buy.
Your computer with a 1gb 4870 will be a pretty sick computer, better than 95% of comps out there. You won't need anymore upgrades for awhile.
Since you need both psu and card its gonna be $200. But really, you're not gonna need to upgrade the computer for 2+ years after that. Which is probably the life of the computer anyway.