Sometimes the IMEI isn't corrupt—the modem partition is. Download the original stock ROM and use SP Flash Tool with "Firmware Upgrade" (not "Format All"). This often rebuilds the NVRAM from the secro partition.