There is no unemployment insurance or unemployment assistance system dedicated to helping the unemployed in Malaysia.
If you're living in Malaysia under a professional pass or work permit, you must be employed with the company that employed you. However, it can be waved with your current employer signs a release letter. If the worst case scenario does happen, you may leave the country and apply for a job or visa again.
Most international companies offer expats an exit package, but if your employer does not initially offer you an exit package, you may decide to ask for terms.