Again, your best bet would be (a) formatting the hard-drive (thus eliminating any infections) and then (b) doing a clean install of Windows 8.1. Once you've Validated the clean install of Windows, you'll be able to upgrade to Windows 10.
You cannot upgrade a "Windows is not Genuine" install of any Windows version.
Tip: When you get to the "Buy Windows8.1" step, the Windows 8 Upgrade Assistant will point you to Windows 10, not Windows 8.1, now.
Tip: I would NOT recommend purchasing or downloading any software from or via bonanza.com, getintopc.com, eBay, craigslist.org, et alia. Try a legit site like tigerdirect.com or even microsoftstore.com.
Good luck!