Some things to try;
sfc /scannow
dism /online /cleanup-image /restorehealth
or the manual steps here https://learn.microsoft.com/en-us/windows/deployment/update/windows-update-resources#reset-windows-update-components-manually
but the simpler / safer method may be to stand up a new one for replacement.
I'd use dcdiag / repadmin tools to verify health correcting all errors found
before starting any
operations. Then stand up the new 2012, patch it fully, license it, join existing domain, add active directory domain services, promote it also making it a GC (recommended), transfer FSMO roles over, transfer pdc emulator role, use dcdiag / repadmin tools to again verify health, when all is good you can decommission / demote old one.
--please don't forget to Accept as answer if the reply is helpful--