For fixing WMI:
cd \windows\system32\wbem
REM you may need to enter the following line multiple times
net stop winmgmt
REM Why move instead of rd? In case this whole thing goes
REM sideways and we need a way to recover
move Repository Repository.old
REM Following line reboots the machine
shutdown /r /t 0
you may need to enter the third line there a few times.
As for Windows firewall:
You can re-register the dll by using the following commands -
regsvr32 /u %windowsfirewalldll%.dll
regsvr32 %windowsfirewalldll%.dll
For further diagnosis of Windows firewall your post lacks sufficient detail to say much, however, you may find the following links useful:
http://support.microsoft.com/kb/914230
http://support.microsoft.com/mats/windows_firewall_diagnostic/
http://support.microsoft.com/kb/920074
If all else fails: https://www.google.com/search?q=Repair+windows+firewall+XP&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a