Faulty Fans, Dust and Grime build up on the Heatsink restricting air flow. I would give the inside of the case a blowout with compressed air. When blowing air through the fans make sure that you physically stop them from spinning, as they may generate power and blow something up. Remembering to ground yourself by placing the back of your hand on the Power Supply Unit and not moving your feet. By not taking this precaution it is possible that you could inadvertantly cause damage to the PC from an electrostatic discharge. Then remove the Heatsink, giving it a thorough clean and reseat the CPU applying new CPU grease. If the Fans spin freely when you give them a spin they are probably OK. If there is resistance replace them.
Clean the golden edge of each memory stick with a soft rubber/eraser, remembering not to touch the golden edge of the memory stick. Check with one stick at a time, remembering to disconnect the power from the PC.
Test the memory.
You can test the memory by running Windows Memory Diagnostic that can be downloaded from http://oca.microsoft.com/en/windiag.asp. If problems are found check the steps below.
Also check Capacitors around the CPU for swelling or bulging.
Test the Power Supply Unit and the CPU.
Download Prime95.
http://www.mersenne.org/freesoft.htm
Prime95 is used to put your system at full load. Prime95 - When run for the first time, it is necessary to click on Advanced, then click on Round off checking so that errors caused by instabilities will be flagged as they occur. Also go to Options and run the Torture Test. Run the Inplace FFTs (Max Power, Heat and some Ram). Prime95 will automatically thread all Cores, and will expose insufficient CPU cooling and computer case cooling, or excessive Vcore and overclock. At no other time will a CPU be as heavily loaded, or display higher temperatures, even when OC'd during worst-case loads such as gaming or video editing. Prime95 can be used with SpeedFan to observe CPU temps, while stress testing for system stability. During single threaded gaming and applications, Core 0 typically carries heavier loads and higher temps than other Cores.
You want your system at full load when checking your voltages to ensure your PSU is up to spec.
If your PC restarts during this test you have a faulty Power Supply (PSU) and it will need replacing.
Download SpeedFan and check the Voltages and Temps while Prime95 is running.
http://www.almico.com/sfdownload.php
You will want your 12-volt rail to be within 11.52 to 12.48 during load. This means when you are running your cpu at 100% you do not want to drop below 11.52 or you may experience stability problems including but not limited to system restarts and Windows crashes. For the 5-volt rail, you want it to be within 4.8 to 5.2 to be within the 4% range. As for the 3.3 volt rail, you want it to be within 3.17 to 3.43
Video Memory Stress Test 1.4
http://www.majorgeeks.com/Video_Memory_Stress_Test__d5896.html
Note: A damaged or insufficiently charged internal battery can corrupt CMOS or BIOS settings. It can also cause all sorts of wierd things to happen.
Keep us informed as to your progress if you require further assistance.
If you think that any of the posts that have been made by all TR Members, have solved or contributed to solving the problem, please Mark them as Helpful so that others may benefit from the outcome. ;)