Every foreign corporation, as well as every foreign association, exercising any of the powers, franchises, or functions of a corporation in this state, violating any of the provisions of this subchapter, is denied the right and prohibited from doing any business in this state. It shall be the duty of the Attorney General to enforce this provision by bringing proper proceedings by injunction or otherwise. The Secretary of State shall be authorized to revoke the license of any such corporation or association authorized by him or her to do business in this state.