My only other question would be, do you have a buyer's agent? A buyer's agent should be able to advise you on the situation initially? If there is no buyer's agent representing you...then I would speak with an attorney.
If you don't want to buy the home and you are "out of contract", your agent should have you and your seller sign a deposit release. You should also consult an attorney if your earnest money isn't returned.