Hello,
1) The company has no authority to withhold it write off what it owes you. Send them a mail demanding payment of your full and final settlement. If possible speak to whoever is responsible for the settlement. The ompany cannot in any way hold you liable for your performance at work and and withhold payment due to you when you have complied with all you needed to.
2) In case they are still adamant on their stand you need help of a lawyer. Issue a legal notice demanding immediate payment.
3) If the company still refuses to settle your payment you will need to file a civil suit for recovery of your payment.