You gotta read the fine print--its probably designed to protect agent, seller and buyer in that order.
Assume that NOBODY has an incentive to help you---you need independent legal counsel.
P & S may contain words to effect that seller is entitled to abate problems found. You need pay particular attention to every word in the clause as to home inspection.
I would not touch a home with termite damage , water damage and rusted electric box unles it was with a 10 ft pole , a significant price reduction, blessing of my attorney and sold cost estimates from my contractor.
How big of a deposit do they hold? If its tiny it may not be cost effective to do anything than just walk way--with a clean break--in writing.
As an aside-once I walked away I would in writing notify both the seller and the agent of all problems found----why--because I would send same to next buyer later and ask him or her if seller disclosed same..just in case seller "forgot."