I'm not an attorney, but I don't see any legal issues as long as all parties are in agreement to the arrangement. If it's a short sale, then the lender may not participate, but if the home is free & clear or has a balance which can be paid off with the proceeds I can't imagine why it would be a legal matter.
Now there are going to be tax issues with a large gift, early access of retirement funds and possible transfer taxes etc, so you'll need both legal and tax advice for the best way to do this.
Whether this is a wise thing to do is another question. Buying a home with substantial known issues, let alone the ones unknown may be another issue. Draining your retirement account and all that that entails is another question which needs to be seriously considered.
Ask yourself if spending the $100,000 on this house, to stay in an area where you anticipate unemployment is the best use of the money? What if you decided to relocate to another area where you could obtain a new, better job for example? Consider all your alternatives before you get committed to this option.