and since it is you initiating the move to terminate the contract, the consequence now is somehow "against" you. But since you are locally hired, it should be less problematic. If you don't have any bank obligation, then you can get all the clearance you need and the company will be obligated to accept your resignation (with the notice period). And hey need to follow the specifics of your contract regarding your travel back to home country (if included).
and since it is you initiating the move to terminate the contract, the consequence now is somehow "against" you. But since you are locally hired, it should be less problematic. If you don't have any bank obligation, then you can get all the clearance you need and the company will be obligated to accept your resignation (with the notice period). And hey need to follow the specifics of your contract regarding your travel back to home country (if included).