Explain Shadows/Highlights to me please

I undestand what the tool does, but I’d like to know how it does it.

Can someone explain to me what technique the tool uses to raise shadows and lower highlights?
Or point me to some literature?

Thanks

Edited original post

They are sliders to manipulate curves for shadow and highlight regions.

Thanks and sorry I clarify my question:
I do know what they are doing. I’d like to know how?

Edited my original post.

Here are some links to the code:

Building the Shadows/Highlights map.
Applying the Shadows/Highlights map.

Sorry @heckflosse late reply. Thank you for the links.

Though I did some very basic hardware programming in delphi in the past, this is very hard to read for me. :sweat:
Any easier explanation available, or some literature after which this is modelled?