If you are in attorney review, but the review process was not concluded, it is a simple process to terminate a contract. It's important to understand that only an attorney can terminate that contract for you. However, before AR is concluded, it's a simple and straight forward process.
If you have concluded attorney review and learned after the fact that the seller does not have funds to close, you will need an attorney to guide you through your options. It becomes more complicated once you have completed AR. The options depend upon the terms of the contract and what information became known when. An attorney consult is necessary to provide you advice.
Your attorney is your best guidance at this point.
One would think that the seller knew this before he accepted your offer. Any good agent will do a sellers' net to help an owner see exactly what he is getting at the closing table.