Completely reinstall everything on the Mac
You could get a brand new SSD disk and install OS X on it, carefully clean wipe the current one.

In addition you could get EFI and SMC firmware from Apple.

https://support.apple.com/en-gb/HT1557

https://support.apple.com/en-us/HT201518

The before you do anything (since the malware could creep right in again) install something like LittleSnich and block everything from to Network and only allow fully trusted stuff.