I would imagine it’s the same as any other business. They declare bankruptcy, put the business into administration, appoint administrators who then determine how much the assets are worth and how to realise any value from those assets to pay off any creditors/shareholders/take their fee.
Realising value from the assets (both tangible and intangible) might be via selling the business or just a fire sale of what they can make a return on.
Source: owned an investment backed company that we put into administration after 8 years when something happened that we couldn’t trade through.