Separating money and its profits from its interest
If the case is truly as you mentioned, then receive the initial capital and all its profits and you will take the capital and the profits with the exception of
the usurious interest. You can give this interest for the interests to the poor and not benefit personally from it. You can know the percentage of profit gained through usury from the company's total profits. If it is not easy to know, ask an expert to estimate it for you.
May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.