Yes, as long as the game is still installed on your computer the code you put in will be somewhere in the registry. If you uninstalled it, the code is most likely wiped.
The easiest way to search for various codes if you don't know where they are is to use Belarc Advisor (see link in top post), it finds everything in one go and is very easy to use. If you have a PC, that is.