Reinstall WordPress Without Losing Data

I would suggest using Tools -> Export to save your posts and pages. Then you could reinstall your WordPress, upload your theme and Import your content back.

This can fix corrupted WordPress core or theme files but you would have to setup your theme options and settings again.