First thing I would do is to copy the site down to a development environment. Now make a backup of that, so that you can restore to that anytime you need to. Also at this point I would put the live site on code lockdown. No more changes to the code unless absolutely necessary (and if there are changes, you will have to duplicate them on the new development environment)
Now that you have a safe copy of the website available to you to play with, now the fun begins.
First thing I would do is pull down a copy of the stock version of Magento that you are running. Do a diff on /app/code/core between the stock version and what you currently have. This will tell you what your differences are. I would try to maintain all the functionality you currently have, while getting core back in order.
Hopefully at this point you have a pretty clean installation of Magento. You could consider pushing this back to the live server, but I have a feeling that you may have had to do a lot of monkeying around to get this far so it may not be a viable option.
Now I would make a separate backup of the development site so you can go back to this point if you need to.
Now, I would attempt the upgrade on the development site. Hopefully it all works out and you have no problems with the upgrade. If you do not, then make the corrections you need to and go on from there.
At this point you should have a code base that is stable with the upgrade. Backup live again (just to be safe), push the new code up, and hope that everything works out.