On Windows, thumbnails are stored in a little, COM/ActiveX-based embedded database called "thumbs.db":
Gnome and KDE desktops have their own (much simpler!) methods for managing thumbnails.
But in your case - there's absolutely nothing "magic" about a thumbnail. It's just an image file (.png, .jpg, .png - whatever) that's downloaded, displayed, and saved in the Firefox cache like any other image file:
The some-id-no differs from user to user. For eg. on my a/c on my linux box, it is qknpyb7a now.
If I reinstall firefox, or I create a new profile, another id will be generated, etc.
On your system, the id may be something else.
I've heard that cache might be encrypted. I don't know whether or not that's true. If so, check out this link: