If the business is running at a loss (including legal fees) then yes that loss can be used to reduce the tax burden this year.
But since the loss burden is 100% [1],and the tax burden say 50% this is worse, not better. Sure the 5 million accumulated loss means 2.5 million less tax, but it also means 5 million gone to cover the losses..
[1] losses are funded from somewhere, and those funds typically have to be replaced sooner or later (or bankruptcy). Working capital, reserves, loans etc. Unless they're like listed on the stock exchange.