Passing through immigration with proper documentation doesn’t necessarily mean you’ve entered the country legally. You’re only legal if your passport has been stamped, and it’s up to you to make sure the immigration official has done so, according to Malaysia’s Immigration Department. Entering “illegally” could pose problems for you when you attempt to leave.