1) Generate or increase revenue2) Reduce cost.3) Get alternative funding
While you are in a tough spot, you are thinking ahead which gives you a chance of avoiding unnecessary unpleasantness and an opportunity to learn and test yourself. The prospect of loss of your company is hard to contemplate but the key issue is why would your customers care and do they care enough to provide you funds for any reason such as consulting? Happens often if you are on the right track. If so preservation of IP and people skills with the intent to renew growth is an option on the table. Ask for support more often than not it will be forthcoming. If not then an orderly exit to limit the damage is likely to be your best option. Should you take this path, engage in some reflection of your own personal growth in skills and knowledge as a result of the time spent and what you have learned about yourself. Most often this provides comfort at a turbulent time.
Good luck with the transition.