The problem you might have is that when bright lights are present, the camera will be using a fast shutter speed to keep the image from saturating too much. All the detail you are interested in is in the bottom few bits of the data.
So even if you remove the glare and then try and pull the rest of the image up in level, it's very noisy. For example, if you take your image and play with the levels to pull up the darker sections and just allow the glare to clip, this is the result:
If that's OK for onward processing (I don't know what you have in mind) then you could maybe remove the glare by looking at distributions of saturated pixels, and expand into the "glow" around them.
A better solution (if you have the option) can be to use a high-dynamic range camera which has an non-linear response in the pixels, and also often 10 or 12 bits per pixel of usable resolution, which means you can keep 7-8 bits for the darker sections.