No program can decide was it a flare or the wanted light from your target. Only a manual attack gives usable results.
I have cloned something believable into the areas that are fully overexposed, if possible. Often a big chunk of the sky has been repainted. Sometimes a light flare has been compensated by a carefully masked adjustment layer that reduces the brightness and increases the contrast or reduces one color. Here the big green flare in the middle reguires quite complex processing:
- add a hue & saturation adjustment layer
- select the adjusted color = green
- reduce the brightness and saturation, adjust the color limits until the result is usable on the flare, do not care the environment too much, but keep the color range as narrow as possible
- add total black layer mask
- paint carefully white onto the flare area with soft brush until the flare is gone.
- do not forget to readjust the hue & saturation layer parameters. With the mask you see better. (multiple iterations with different color settings are possible, in my example only a single processing cycle is done)
The result, only the big green flare is attacked:
Much complex work and often the result is not good. It really pays off to keep the direct sunlight out of your lens. The back to the sun is the best, but not allways possible. An umbrella is good because it can be held also by yourself if you're alone. The lens hood is of course connected all the time at least in the sunlight. (note: I know this all, but unfortunately the lazyness still rules)
ADDENDUM: The green flare masking is made more accurate and fixed also the left top corner:
BTW: If you had the RAW image, you could also adjust the building to have a good light and contrast. From JPG the result will be much less believable. But nothing prevents to try. Here's the result: