What is this transformer/choke?
Based on where you put the dots indicating the winding direction, and the connected circuitry, It's a differential choke, to block the pulses from being absorbed by the capacitor

If that capacitor before the 7805 is small, and those dots were not determined by observation, it could be a common-mode choke. And they're just relying on headroom and power-supply rejection in the 7805  to prevent the 20Khz from being eaten up.  its purpose then would be to prevent common-mode interference from flowing on the power lines, but I can't see if in or out.

However looking at the bobbin pictured it appears that the core window area is smaller than the core cross-section, this design suggests that it was used differential mode, common-mode chokes usually have the window larger than the core, as in common-mode the only source of amp-turns is unbalanced current. but high differential mode currents may flow without magnetizing the core, so lots of copper is needed to carry these currents .

In differential mode the DC current magnetizes the core, so more core bulk is needed with respect to coil bulk to avoid saturation.