If you've got your XP CD. Before you re-install windows, you could try the "System File Checker".
Uninstall avast! (yet again!) first.
Click "Start" > "Run" > type "CMD" and a DOS-like black dialog box will appear. Type "sfc /scanonce" (without quotes) and press enter. Then type "exit" and press enter again.
Now when the computer restarts (it may do so more than once) it will start checking the Windows System files (see screenshot) and prompt you for the XP CD if it needs to replace any. Any modifications or updates to these files (good or bad) since XP was first installed will be undone but this would happen anyway if you did an Windows "In-place Install" as MS calls it.