Really loud exhaust only on cold startup

Depending on how much metal is left, it may be better to weld the flange to a coupling, then either clamp or weld the coupling to the rusted pipe.

Well, the steel on the pipe appears to be in very solid condition still.

The flang is the only part that seems to have broken down.