You could put the Mac OS X 10.6 Snow Leopard Upgrade or grey Restore DVD into the Mac and reinstall Mac OS X, thus you get all the ****ed up things back, and your data will not be deleted, unless you tell the installer otherwise.
I guess you don't have any backups?