The stator on that machine is divided into two generators.
One for electrical acc. (lights, hot grips, etc.) and one for ignition system only and are not connected in any way. When you pull the cord and the lights light up it only means the lighting section of the stator assy is working and will not verify that the ignition coils on the stator are working.
Unplug the harness down by the recoil and do the following tests with an OHM meter on the engine side of the harness.
Charge coil #1
Red lead to Black/Red wire, Black lead to Green/Red wire = 12 to 18 OHMS
Charge coil #2
Red lead to Brown/White wire, Black lead to Green/Red wire = 12 to 18 OHMS
Trigger coil or Timing sensor
Red lead to Green/White wire, Black lead to Brown wire = 80.8 to 121.2 OHMS
That machine is a ground to run system and WILL NOT have spark if you unplug the harness from the chassis to the engine. You can unplug the harness and hot wire it (unplug only the the four wire plug, should be 2 yellow a black and a brown and leave CDI plugged in) put a jumper wire between the black and the brown and try it. If you then have spark the problem is on the chassis side of the wiring harness and probably just a switch. If still no spark you will know that the problem is in one of the ignition components or it's wiring.
Thank You for your time.