If I understand the illinois gun law correctly, as an out of state permit holder I can pass through the state if my gun is in a case in the trunk with the magazines in the car. Am I right?
It is not Illinois law that allows that type of transport. It is a provision of the Federal Law, Firearm Owners Protection Act passed in 1986 which allows lawful transport through anti-gun states like Illinois. Make sure the container is locked and is of sturdy construction.