In the year 2017 or maybe 2018, I had an install similar to yours and my CDs were put away somewhere in storage. Then, my Patch 1.27 installation upgraded to Patch 1.28 when Activision's Classic Games team created the Patch 1.28 to prepare for Reforged. Because they were trying to figure out how they were going to handle CD keys on Reforged, and trying to see if they could standardize the MPQs to be the same for all users and eventually replace with the newer Activision CASC storage format, during the upgrade from Patch 1.27 they moved the files you are referring to so that instead of being in font/whatever
inside the War3.mpq (RoC) and War3x.mpq (TFT), now the files were instead in plain text files in the install folder. [Yes, the 2002 Blizzard game stored the CD keys in the folder named font
because they knew that fonts are boring and users are unlikely to review the contents of this folder.] So, after the 2017 Activision patch version 1.28,roc.key
contained the literal full text of my CD key at the time, which concerned me slightly for security, and tft.key
contained the full text of the Frozen Throne CD key likewise.
Later on, in patch 1.29 and beyond I think these files moved to other hidden folders on the computer such as somewhere deep in ProgramData, but when 1.28 was live as I recall they were literally sitting in the game installation directory.
This suggests that if you could run the same computer program that Activision was using, such as the exact 1.27 to 1.28 updater program, it would decrypt out your CD keys and put them into your Warcraft III installation directory.
However, all of the Activision updater programs like that, for the most part, were self-updating programs and if you run them today they will replace your game installation with Reforged instead of 1.28. So I am unsure if it is actually possible to run the official Activision program to do what you are asking. But I am fairly confident that the software to do what you are asking does exist somewhere on Planet Earth, and was used by Activision for the purpose described above in the 2017 to 2018 years.
[Edit: Note that if you run a program on your computer which erases your Warcraft III installation and replaces it with Reforged, in the current situation you describe, you would most likely lose your CD keys for good.]
All of the experiences described above entail using the official Activision game version, and my official and legally purchased CD keys. Increasing user knowledge and understanding on this topic is in no way any attempt on my part to condone piracy. My aim is that people have a handle on how their computers work and can keep their computers working.
Edit 2:
On the topic of piracy, I might warn you about something, to further discourage piracy. In the year 2014 I downloaded a Warcraft 3 mod from the internet where the user had created custom techtrees ingame. He uploaded his entire War3.mpq and War3x.mpq with modifications as the means to distribute the mod, and so he inadvertently shared his CD keys. Curiosity got the better of me at the time, and using my understanding of the game as a modder, I pulled out his CD keys into a standard version of the game in case they might be useful to me for multiboxing. I know that what I am saying is not ethical, and this may cause you to believe I am not a good person, but I am sharing what happened.
As it turned out, the moment that I connected to Battle.net using that other person's CD keys in 2014
I got banned from Battle.net multiplayer. [Including my original CD key.]
It turns out, if your CD key is not your own, then it might be from a bad actor. And CD keys from bad actors, although they can launch the game are on a list of CD keys from bad actors.
When I reached out to Blizzard and explained how dumb I had been and asked for unban so that I could continue to live as one of the scarce few folks in 2014 who play Warcraft III, and then play with my friends
The Activision help ticket GM replied to me by lying to my face and saying that they do not ban anyone, because that would make people feel bad.
When I replied to him like that Ron Swonsan scene in the department store, where someone tries to help him and Ron says, "I know more than you," and discredits what the "official" person is saying, they sent me a new person and a new GM replied. The new person said:
Yes, sorry, please disregard what the other person said. You are banned as you suspected, and these bans are controlled by machines, and the humans do not control the machines. So there is no human or process with the power to unban you.
And thus, I would remind you again, do not engage in piracy, even as a joke or prank against someone you know who accidentally shares their CD keys.
Because once you're in the hole, Activision will have no patience for you and will happily lie to your face.