Helping people with computers... one answer at a time.
Perhaps the single most under-appreciated component in your computer the power supply is not only responsible for providing the proper power to bring it all to life, but is also the source of various and perhaps not-so-obvious classes of failures.
The life of a battery can be increased by using the right power supply, but with a proper match, they can be interchanged.
Chargers and power supplies come in a wide variety of configurations. Choosing the right one is important. I'll look at a few of the parameters.
What matters is that the voltage and polarity of the power supply is a match. There is no substitution for that.
This does not sound like a malware issue at all. I think its something much more mundane, probably related to your power.
Computer power supplies can fail, and not always in sudden and obvious ways. Failures can be gradual, and can manifest in many different ways.
Problems with the power to your computer can translate into damage to your computer and data. I'll cover how much protection you might need.
Protecting equipment from power outages can be done with a large battery called an Uninterruptible Power Supply.
We're all told to shut down Windows before turning power off, but what if the power just goes out? If you're not protected, bad things can happen.
Replacing a power supply is reasonable common solution to some problems. Making sure you have the right wattage power supply is important. And bigger doesn't hurt.
Computer crashes and other difficulties can certainly be caused by a failing or overtaxed power supply, but there are other places to look first.