My husband ran into a ransomware virus from a visit to Reddit. So beware that site! He got this window that said the FBI had locked the computer because he was viewing kiddie porn which was, of course, preposterous. The computer was completely locked, but I was able to restart it in safe mode and looked online for a solution.
The best thing we found to do was to do a system restore. Fortunately, there was a restore point set the day before, so we went to that point. I had to do it in a DOS sort of command in safe mode, but it worked!
Then we ran every antivirus program on the face of the earth along with malware programs. After that, I had one of my tech head buddies go in and find every trace of it and delete it. What a pain in the neck! He said the ransomware virus was a type of source code, which is what made it so hard to defeat. It was a mess.