How redirect_cc works?

Hi guys,
I want to understand how redirect_cc works. I’m still trying to understand the source code. Could anyone explain for me?
Thanks a lot!

Sincerely,
Walter