Would someone mind taking a look and maybe explaining this piece of code?

I was making a plugin for a couple projects i was working on and i had the code i was posting above i just didn’t understand it very well. But after about an hour i got the whole thing through my head thanks to @Caleb.

–SonicX278