I was recently re-watching the 2007 Transformers movie and a particular scene caught my attention. In the scene where Megatron comes back from the cryogenic or cold state back to normal state in his NBE 1 hangar, he immediately comes under heavy fire and is seen transforming into sort of a fighter jet and flying out of the hangar.
Now, the doubt that I have is that Megatron had been inside that hangar and in cryogenic state since 1930s. So how did he know what to transform into? As far as I understand (based on the movies) Transformers transform into different things after they have scanned them (like Optimus transformed into red and blue truck and Bumblebee transformed into the Camaro). Since Megatron was in captivity I am sure it did not see any fighter jets to scan inside his hangar. So how did he transform into the fighter jet right after he came back to normal form?
PS: I haven't read the comics so I am not sure if there is some explanation there.