Hello and welcome do a system restore not a factory restore, when you do a system restore you don't lose any files, pictures etc. Here are you options System Restore - How to System Restore
Reading your post I am a little concerned about malware or virus. So I would want you to do the following first.
1. Run a full up-dated virus scan using your anti-virus software.
2. If you don't have malwarebytes then please download the free version and do a full scan of your system if those come back clean then do the system restore...Here is the link for malwarebytes. Malwarebytes