I am sorry you are having so much trouble with the sale of your home, this can be a stressful process.
In the state of Illinois, if the seller or buyer wants to cancel a contract (w/ valid reason) the attorney writes a letter to the other party in the transaction stating that the transaction is canceled. The Realtor (in Illinois) can provide a cancellation form, however this is used only when both sides agree to cancellation, mostly this is used when buyer fails to obtain financing. This form is signed by both parties and the earnest money is returned/distributed.
Your situation sound rather simple to me, the buyer will not be able to provide you with the commitment for a loan, if I am understanding your situation correctly. If the lender requires repairs (I assume it's FHA financing) and if those repairs were not completed, the buyer will fail to obtain mortgage. It would be the buyer's obligation to cancel the contract. It's not so easy for the seller to withdraw from the transaction without a risk of getting sued. As I am not a licensed attorney I will advise you to consult with yours, and also suggest to ask friends and family if they know of an attorney they could recommend. Call someone else and see if it's possible to switch representation. Or use a different attorney for a future transaction if you are looking to keep your property on the market....and you may call that attorney to introduce yourself and ask opinion on your current dilemma. If you are having difficulties with your agent, then my suggestion is to deal directly with the managing broker of that real estate office, that broker could also assign a different agent to continue representing you with the sale of your home.
Good luck, Anna