First of all, please understand that EM3581 is an obsolete SoC that is End of Life (EOL), and that is propbably just one of reasons why no one in this community has posted previous attempts on building Zigbee Router firmware for and old Zigbee gateway appliance based on the old EM3581 chip. At least I am pretty sure that you can not find someone here that already tried tro do so, and I strongly doubt you find anyone else to build Zigbee Router firmware for EM358x based Zigbee gateway appliance products today when they is older than ever before.
Anyway, to answer you questions: Maybe you can convert the existing firmware on it to a Zigbee Router without flashing different custom firmware for it though personally I doubt that, but yes if you are looking for a personal challenge for yourself then it is technically possible for you to build and compile such a custom firmware, however, note that it is not supported in the newer SDK versions from Silicon Labs so you need to find and use old Silabs SDK that supported, and to legally get access to that you need to buy Silicon Labs development kit hardware. Then even if you do build a firmware for it you very likely then to flash it with a compatible JTAG debug and possible solder to attatch it.
Even so, you still need to understand that EM3581 SoC is so very old it IMHO would not be worth building a custom firmware for that today even if it was used in a less niche product that more people as it would not make a good router.
The hard cold fact is simply that the old chip with old firmware would just not make a very good Zigbee Router, epecially not when you can instead either buy a cheap commercial Zigbee Router product (like the IKEA Trådfri Signal Repeater for ~$13) or make your own DIY Zigbee Router (based on for example Sonoff ZBDongle-E or ZBDDonge-P for ~$20) that will have a much new SoC and new firmware so will empirically be much better Zigbee Router devices. See → Zigbee networks: how to guide for avoiding interference + optimizing using Zigbee Router devices (repeaters/extenders) to get best possible range and coverage
Hence I think you will be alone on converting that specific product into a Zigbee Router.
Perhaps have convincing arguments why doing this on obsolete hardware would be time well spent?
Idiom that comes to mind is Flogging a dead horse (or beating a dead horse in American English)