Read the terms of your contract and then act accordingly. If your contract has been registered at the Labor Office, it has legal value and will support you. You can resign as per the terms of the contract giving the company the required notice period. Make sure you do it in writing or send them an email and keep a copy with you. If you follow your terms of your contract, you will get all your benefits. If the company does not pay you appeal to Human Rights and take your case to the Labor Office and they will help you out.