EASY fix ..
Luckily the installer was not a mechanic as he /she only bent the lead over the brass flange so it is easy to pry the lead up off the flange and remove the old brass one
Now get a drill and wire wheel wear gigglers and gloves and face mask and clean the lead as shinny as possible
Get a new brass floor flange use emery cloth and shine it up as much as possible
With the outside of the lead pipe shinny you can now flux the flange and flange and using a SMALL ball peen hammer or wooden or rubber mallet set the flange so with the Johnni bolts and measure to make sure they are equally off the wall normally 12"
Make sure you have a little of the lead bend just slightly inside the flange and tap it tightly against the fluxed flange and fluxed pipe
With a small flame or soldering copper heat the brass flange playing the flame so your not over heating one spot using either
40 /60 or 50 /50 bar solder you can solder the lead to the brass flange .
just make sure not to melt the actual lead pipe if you do then you will need either a deeper floor flange or make a cup joint