EM78P156 pins description? How does it work?
The EM78P156 is a microcontroller made by Elan Microelectronics Corporation. From the datasheet I could find, I am not convinced about the reverse-engineered schematic you kindly included (e.g. the blue ceramic oscillator should be connected to the pins you called A3 and A4, really pins 15 &amp; 16, so I doubt those are used as signal inputs; also based on the datasheet, I doubt that 12 V should be applied to any pin e.g. you showed 12 V on pin A2, really pin 17).
However the answers to your questions are quite clear:


What controls the delay time about 2 seconds or about 5 seconds of the outputs between 2 output pins?


The program in the MCU decides this behaviour.


What controls the output or routine to repeat itself again when output reached by pin?


The program in the MCU also decides this behaviour.