What happens to annoying burdensome assets during a company's liquidation?

Perhaps a company owns [a mine filled with deadly arsenic trioxide](https://en.wikipedia.org/wiki/Giant_Mine)  waiting to break out into the environment, or something more boring like a [useless grade A listed building](https://en.wikipedia.org/wiki/St_Peter%27s_Seminary,_Cardross) that must be maintained.

These aren't just debts that be cancelled. So what's meant to happen?