All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
First of all, you have to know, dear brother, that if the main purpose of this company is forbidden, like dealing with Ribaa (usury or interest) or producing forbidden goods, or trading in forbidden goods, then it is forbidden to invest in it, and the scholars do not differ in this issue. It is also not permissible to invest in this company if it sometimes deals with Ribaa in some of its transactions, or invests some of its money in banks which deal with Ribaa, or lends money with Ribaa. This is the most preponderant opinion and the one that Islamweb adopts. The Islamic Fiqh (Jurisprudence) Committee in his fourteenth conference held in Makkah issued the same ruling.
Therefore, it is not permissible to invest in the mentioned company which deals in such transactions. Moreover, it is an obligation to get rid of any profits obtained from this on the poor or in the general public interest of the Muslims. Also, it is not permissible for you to use the profit in your own interest like paying off a debt or paying school fees, unless you are a poor person - in which case you are only permitted to take your need, and it is not permissible to give this profit to your family unless they are poor.
Allaah Knows best.