You buy a piece of software. The company folds, but its assets aren’t sold to anyone. Who owns the copyright to the software and for how long?
I think this part is very unlikely. I don’t know about US law specifically, but the way I understand it, whatever is left is used to pay the creditors, either directly, or it is auctioned off. Whatever is left (not so likely to begin with if the company folded) is distributed among shareholders. While it is possible that nobody feels responsible for the rights or even knows about them, that doesn’t mean that nobody holds them legally.
How would you find out who owns the rights to the software? Let’s say it’s an extremely limited company - maybe releasing a couple of titles.