For the advanced security features you need to get 12.4(11)XW9 (c1841-advsecurityk9-mz.12.4-11.XW9) version of IOS from your Cisco reseller, which is the latest version with the advanced security feature set. First I would check that you have enough memory in the router, using a ‘show hard’ command. This release needs 192Mb of DRAM and 64Mb of Flash memory.
If you have less memory, then a slightly older version will probably do what you want, but fit in the available memory.
All versions have basic QoS features, it just depends on exactly what you are trying to implement, basic queueing, to very comprehensive filters and queues. There are advanced features, that again need a different feature set.
Your reseller should be able to advise. First decide exactly what you need the router to do, as all of this costs money !
The fact that this is out of maintenance is not relevent, as additional features are not covered by maintenance, only upgrades with the same features as you already have (bug fixes, additional depth to the config etc).
Uploading the IOS is easy. Put the new version on a TFTP server that can be acessed by the router, and use the ‘copy tftp flash’ command to copy it over. You may need to remove the existing version if you are short on flash memory, or buy an additional flash card for the new version, and keep the old one safe. If the upgrade fails for any reason, just put the old card back in, and reboot.
I hope this helps you ?