Have you checked the PC temperature before it turns off? To be honest, all your suggestions seem likely to me. I would not say it is a software/virus issue. Use Memory Diagnostic Tool to check the RAM's condition. I would say that the main issue comes from the CPU fan. It should be working automatically. Apply some thermal paste if needed. Remove the RAM No.2 and try the PC without it.
I would go for a PSU check if all other components are checked and working properly.
Hope this helps