Trojans active on your PC can use practically any port. Here's one list of ports and known Trojans that use them:
Don't confuse this with ports that require closing, which are very few in number.
Don't actually do this, but if you were to do a fresh install of Windows and go to a port scanning site, you wouldn't see the ports you mention as "open". They would be "closed", meaning there is no service holding them open to inbound traffic. The ports you would see open would be the ones I mention and deal with in my article. You only have to close this small handful of ports in order to have all 64,000 + ports closed to inbound probes and requests for service.
A software firewall will block incoming on all ports not being used, and thus mask the situation. All ports will test as either blocked or "stealthed" at port scanning sites rather than either closed or open. This is due to the lack of a normal response from your IP address.
I hope this simple explanation helps. It is a very complex subject.
Art