You need to talk to an accountant.
The company hasn't been wound up firstly.
Secondly you can only use a write off against capital gains. Not income tax for example.
If you had a 400k capital gain and then claimed a 400k loss your tax bill will not be zero.
Seek advice.