ok sounds like one of 3 things,ill list them in order of probability,
1, the piston has had a slight seizure and this will cause the backfiring and bad running,basically the piston needs to have good compression to burn the fuel/air mix and to transfer the fuel air mix through the transfer ports using the downward stroke of the piston if its damaged the fuel air mix fills the exhaust and ignites once a succesful fire is reached in the combustion chamber.
2,the magneto/flywheel/rotor whatever you want to call it has sheared the wood ruff key and the igntion timing is incorrect
3,the cdi immobiliser has decfided that its capicitors want to discharge earlier or later then they should.
god luck any other probs just send us a Q.
adam bike doctor, February 2010