First just store your wallet.dat file from your corrupt bitcoin core. If you're on Windows, it's installed by default in the AppData folder. I recommend saving the full data folder from the old installation.
After you've backed up everything, do a fresh re-install. Let the new installation finish syncing, then import your wallet using "importwallet" command in the bitcoin core console.