RohanTool already has an extract function. When you open a gem, right click its name at the top of the explorer and you'll get an unpack all option. It extracts images in their native format (tga for icons and dds for textures).
Icon names are linked to the bins. Itemetc, itemarmor, itemweapon and so on all contain a column for the name of the icon used.
There is a naming convention for some things like weapons. They always start with a w followed by 3 letters for the type it is then a letter for which one or which grade. I can tell you straight off the top of my head that the icon name for the Kayra's sword is w_osw_ac_d.gtx