Every foreign corporation or association, exercising any of the powers, franchises or functions of a corporation in this state, which violates this chapter, is subject to revocation of those powers, franchises or functions and upon such revocation is prohibited from doing any business in this state. The Attorney General, or a district attorney of a county where the offense or any part thereof is committed, may enforce this provision by bringing proper proceedings by injunction or otherwise. Upon receipt of a certified copy of the judgment and decree of any court of competent jurisdiction finding any foreign corporation or association guilty of violating this chapter and ordering a revocation of its powers, franchises or functions of a corporation in this state, the Secretary of State shall revoke the license of any such corporation or association heretofore authorized to do business in this state.