I don't know if this'll help, just personal experience. My computer kept shutting down in the restart mode, like you, I was almost ready to bin it, after taking advice from this site, which did no harm, it wasn't a virus, I paid a computer engineer to look at it, turned out that the fan blowing strong enough to circulate all round, and it was overheating.
Your problem may not be exactly the same, but it sounds as if its connected to the fan, if you can, i'd get an expert to look at it.