yup.
what country do u live in? (OP)...
if its america, probs not that much...they will most likely seize the gun and hold it until you get it registered (i think?)...or worst case scenario they destroy it and you get something like unregistered firearm, holding a concealed weapon, etc.
the main thing you need to worry about is when they find an unregistered gun in your car, they are going to want to see what else you have at your house. by law, then can then come to your house and search the premises to see if there is anything else unregistered/illegal.