Well to start with when avast detects it in the kernel32.dll / winsock.dll / wsock32.dll files, there should be an option to Repair hopefully if you select that it may be able to repair them.
The reason I say that is if you look in the avast chest System Files, it has back-up copies of these important system files. Me I can see absolutely no reason to have kept copies of these files if they aren't used to repair infected copies of them, I would like some input from Alwil to say how we would go about this.
Does it have them ?
If so right click on them and select scan to make sure that they aren't infected ?