Why would you want to go through so much pain?! I thought of doing this too in the first place. But then I noticed you can actually attribute an .ico file directly as an icon, without having to add the file to the dll (or icl).
That is, any image which has the extension .ico can be used as an icon. So you can build your own library of icons in any folder on your system (any image files can be converted to .ico with the right software; there's a couple of free online converters which work best; there are also a couple of free icon sites where you can download whole packs of icons in png or ico format). Then when wanting to change the icon of a folder just navigate to that folder where you store your icon files, instead of the imageres.dll or other dll file, and pick and chose!