Hmm, something has been changed at some stage.
All wires should be of same colour combo's.
Best guess is three wires from cdi go directly to magneto, whilst the fourth is for the coil. However your configuration suggest a different cdi unit is being used, the site below has a diagram of your bikes standard electrics, unfortunately not color coded.
Normally, it cannot be wired incorrectly as male/female and color wires determine correct connections. Find out the origins of the parts and seek the application for the color of each wire, ie: color wire for primary source, pulse coil, earth, etc. Transfer this info to the colors from your magneto, Goodluck and cheers.