If you consider that hideous, then either you live in a bubble or you are very, very strict. (Don't get me wrong, it has significant design issues, and it uses some pretty MS-ended stuff, but that's about it.) It is well-formated and very readable, at least.
I wish I still had access to the most hideous code I've ever seen. It was some twenty years or so ago. I had obtained some example code to do hidden-line removal (for 3D stuff) in one of the old BASIC dialects (it needed very little massaging to work with GW-BASIC).
However, on inspection, it was clear that the author was a "Real Programmer" -- it was near impossible to analyze its workings without more effort than it was worth. It was also the best example I have ever seen of true "spaghetti code" -- something many of you young ones talk about but have never actually seen.
A good description would be something like: a long list of short, random BASIC commands, without any commentary, liberally interspersed with GOTOs whose targets were bound to (apparently) uninitialized variable values.
What was amazing is that the program worked very well, producing the same, correct output every time.
I wish I could abuse the author by name, but he's probably rearranging the furniture in his nursing home or sleeping right now, so I'll accept that as proper punishment. Just thinking about it now gives me the willies (honest!), so I'm just going to recommend some of the stuff you find at
Coding Horror and the occasional true horror found over at
The Daily WTF.
This is cute too:
http://codinghorrors.com/?c=c&id=1296