It looks like the flange on the post cat pipe broke or rusted to hell. You should be able to get away with buying a cat back.
Take those bolts apart (or cut them if you have to) and see what's left of the flange on the cat. hopefully it's still good. If it is good, it's time for a new cat back.
I have a tanabe super medallion for my 02 you can buy. It's stupid loud, but some people are into that sort of thing. PM me if interested