So you need good knowledge regarding reverse engineering to do so. There is no AV in my experience that has done so, it woul either delete the file, or just quarantine it.
u're right..most AV's either delete or quarantine the infected file only, in some very rare instances have i come across a file being cleansed and not deleted or quarantined. it probably requires some very serious knowledge of programming to be able to do it.
In terms of malware, a virus refers to writing a sequence of code into the body of a file. This portion of the virus is then encrypted as to prevent the user from seeing the code inside and usually with a one-way key unlocker embedded on top of the code to decrypted the code for execution when the file is launched. On top of that, most viruses compress the files so that the added code does not make the file larger.
Can the disinfection process be done? It can though there are different viruses out there which require different and even more complex disinfection. The most deadly of all viruses are the polymorphic viruses which change the encryption and decryption key every time the virus writes itself to new files on your computer (which usually becomes way too much trouble to disinfect and should just be nuked and reformatted).
Of course Trojan Horses and Worms are much different than Viruses and these two cannot be disinfected (and those two are usually the ones that infect people). Worms are completely standalone programs that run without any user input required (this automation gives them their notorious ability to spread like wildfire). Trojan Horses are simply programs that were designed to maim and damage from the start. In this way, there really are no "files" to disinfect from these two because both were designed to bad things without any use for writing itself to other files (leaving the only choice to delete them).