Arduino Nano as a 4 channel Square Wave generator

This any better for you?

The code is written in unfamiliar way

You are wanting to do something that involves using timers so it will not look like conventional C code. This is because in order for it to work you have to tap into the hardware resources of your chip and do things like direct port access, bit manipulation and accessing machine registers. All of which take some learning.