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.
What you mentioned does not affect your salary if it is in return for a lawful job or a permissible service that you carry out in that company. It is the person who takes ill-gotten money who is sinful, but what he spends the money on is not forbidden. Therefore, you are not sinful for working in that company if your job is lawful and not doubtful. Thus, you are permitted to benefit from your salary that is given to you (from this company).
Allaah Knows best.