When I fix machines that are heavily infested, I see if the machine will boot in safe mode. If it succeeds, chances are it is salvageble, and if not, its generally never worth the trouble of repairing every single dependency to make sure the computer will never run into problems in the future.
So, pop in safe mode, if it errors out then you have your solution.
If not, pop in safe mode and run a scanner to see if it can identify the type of infection. You can then research that infection to see if there are special tools or tricks to clean it out or if it a format is recommended.
But seriously, unless there is data you cant recreate, just save the time and wipe that bitch new.