Hi Adscan,
Insurance companies will usually sell the car back to you, after adding a percentage for themselves, but it's best to speak to your insurance company directly. When you buy it back, it can also affect the amount an insurer is willing to pay out in the event of another crash, if it becomes road worthy again. It will also affect future resale value if it is categorized as a write off. You should still get the market value of your car back to you unless you agree to lose some in exchange for the car.
Good luck!
Bills Comparison.