I think it easier to study if we have it decrypted. So, here I made it.
However, I made also a quick fix on a thread creation so that it will not give corruption errors. The disadvantage is that the program cannot be closed. You have to close it with task manager.
Thanks to Hmily[LCG] for a smart idea that I adopted.