Issue on buying a car on the register (write off register that is) was talked about recently. The only reason to take the 'I wouldn't touch it with a barge pole' is if you don't already know someone in the trade that you trust to put it right properly. If you think you can buy it cheap, buy a load of spares parts from German & Swedish or ECP, give them to a garage and say 'fix that', you're asking for a big bill and loads of grief. Walk away, because it could very well turn into a money pit. As said, once put back together, if done properly, you will have a perfectly good motor, probably better than something straight off a mass production line. But it won't be worth a car not on the register, maybe not even worth what its cost you.
On the other hand, if you know someone who's experienced, have a source of cheap (and ideally genuine parts), make sure you have it properly inspected and priced up so you know EXACTLY what needs doing, and fill your boots.
A friend of mine has done very well from buying smashed motors, then using the expert services of someone we know (Doug the Tug!) to put them right, and sell them on. And I mean properly, not ringing them!
But he got caught out about 6 months back buying a BMW 540i estate that had a heavy front end smash. Registered as Cat C, went to look at it, knew what he was getting into and bought it. But he forgot his own rule (i.e. to never assume anything, check it all over) - once it was on the jig to be pulled straight, they realised it had previously had a very heavy smash on a back quarter that had been badly repaired, so its cost him double what it should have done.
Good luck.