it's probably the hard drive, BUT there's another possibility -

Your RAM.

Windows crapping out in the way it did points to HDD period. Hanging on format could point to either - I've seen it happen on one of my old boxes, replaced the hdd only to find it still having issues, then did ram and sure enough the fix was in.