The infections are not stopping Windows from shutting down, and I have seen this happen on normal systems with no infections.
What happens during shutdown is Windows is shutting down all the services and loaded drivers. If a service or driver doesn't respond and never closes Windows just sits there waiting for it.
Instead you can put in a registry key in Windows to auto kill hung programs and services during shutdown. My Simple System Tweaker has that in there.
That will normally help the problem, unless it is a deep hardware driver doing it, but I would try the reg fix first.
There is no program I could make that could doing anything to help that as Windows is is total control so you have to use the reg tweaks for it.
Shane