All the steps must be completed before arriving in Malaysia. Gaining permanent residence in Malaysia may be an arduous undertaking, but ultimately fulfilling. Some will permit you to stay for as many as 3 days if you don't mean to spend the initiation from the Guru.