How does this wall to usb supply work
Those are much nicer and clearer pictures than people usually provide ! :-).
You could work out the circuit by tracing out the design from the PCB.

It will be something like a "TOPSWITCH" which is one brand of highly integrated switching controllers allowing mains to low voltage conversion with minimal components- as you can see. Your description is probably essentially correct - rectified mains feeds a flyback converter which comnnects via an isolation transformer to low voltage output. It looks nicely done compared to some such.

TOPSWITCH product page here.  

Example application note and troubleshooting guide



Example of minimum parts count converter. Real world solutions end up with more parts than this - and end up looking like eg



More and more and more

Note that this is only one brand - there are similar IC's from a range of manufacturers - Asian sourced parts may be devices not normally sold in the West.