The simplest way to create an antivirus software is by making a program that checks the paths to all running applications, hashes the .exes, and compares the hash to hashes from a database. All you have to do is find copies of viruses, hash them, and upload their hash to the database. What most antivirus softwares do, is they look at the files for malicious code, and kills the application from running when malicious code is found. I do not know how to do this, nor do I have any code for you to do it.