It will depend how the wreck is branded. If it's "salvage", it's a write off. "Repairable", is just that.
In the event of a write off, the customer always has the option to buy the wreck, at a negotiated price from the ins company.
Here in Ontario, we can legally repair a write off and get it back on the road, after 2 inspections. Needs to pass a normal safety, and a "Structural Safety".
I bought a nearly new, full load '12 Accord with 600kms - repaired, but branded, "salvage", for 1/2 price. 2 yrs and 45k kms later, I sold it for more than I paid for it.
Buddy bought an 18 f150 Limited. It fell off the transporter, on the passenger side. Instant write off.
His cost was ~40% of new. Cost him $22k to get repaired and inspected. He made $10k selling it (under 300kms on it).
As for mods.....if it has anything to do with increasing oem h/p, the ins co needs to know about them, or they won't pay. Rims, stereos, and the like, you can claim.