This is a typical switchmode power supply.
The 8 pin chip on is a UC3843 pwm controller
http://www.alldatasheet.com/datasheet-pdf/pdf/25562/STMICROELECTRONICS/UC3843.htmlThe 4 pin chip beside the yellow transformer is an optocoupler
The in and out labels you drew on the foil side picture are reversed.
Think of the board divided into two isolated regions with the yellow transformer and opto-coupler separating the high voltage/low current side ( larger area with more parts ) from the low voltage/high current side ( smaller area with fewer parts ).
The high voltage side rectifies ( likely mains voltage 50/60 Hz ) AC and chops it up into pulses with the IRF9952 under control of the UC3843.
The high frequency pulses are transformed to a lower voltage/higher current by the transformer. These low voltage pulses are rectified by the large diode and smoothed by the small electrolytic. The TL431 monitors this voltage and drives the "send" side of the opto-coupler. The "receive" side of the opto-coupler is used by the UC3843 to adjust the pulse width of the high voltage pulses.
When the output voltage is too low, the pulses are widened, which in turn raises the output voltage.
When the output voltage is too high, the pulses are narrowed, which in turn lowers the output voltage.