Whenever it shall appear to the attorney general, either upon complaint or otherwise, that any person or persons, partnership, corporation, company, trust or association shall have engaged in or engages in or is about to engage in any act or practice by this article prohibited or declared to be illegal, or that any person, persons, partnership, corporation, company, trust or association has assisted or participated in any plan, scheme, agreement or combination of the nature described herein, or whenever he believes it to be in the public interest that an investigation be made, he may in his discretion either require or permit such person, persons, partnership, corporation, company, trust or association to file with him a statement in writing under oath or otherwise as to all the facts and circumstances concerning the subject matter which he believes is to be to the public interest to investigate. The attorney general may also require such other data and information as he may deem relevant and may make such special and independent investigations as he may deem necessary in connection with the matter. The attorney general, his deputy, assistant, or other officer designated by him, is empowered to subpoena witnesses, compel their attendance, examine them under oath before himself or a magistrate, a court of record or a judge or justice thereof, and require the production of any books or papers which he deems relevant or material to the inquiry. Any person, persons, partnership, corporation, company, trust or association subject to service of a summons within or without the state pursuant to article three of the civil practice law and rules shall be subject to the service of a subpoena properly issued pursuant to this section. Any subpoena served hereunder without the state shall be issued on an ex-parte order of the court based upon a showing that the information or testimony sought bears a reasonable relationship to the subject matter under investigation. All papers filed in connection with the obtaining of said order may be maintained under seal by the clerk of the court upon application of the attorney general to the court. Any person, persons, partnership, corporation, company, trust, or association, who has been served with subpoena pursuant to this section may make a motion, pursuant to Civil Practice Law & Rules Law § 2304 (Motion to quash, fix conditions or modify)section twenty-three hundred four of the civil practice law and rules, to quash, fix conditions, or modify such subpoena. Any and all papers previously sealed by the court may be made available to the person making such motion. Such power of subpoena and examination shall not abate or terminate by reason of any action or proceeding brought by the attorney general under this article. No person shall be excused from attending such inquiry in pursuance to the mandates of a subpoena, or from producing a paper or book, document or any other record, or from being examined or required to answer questions on the ground of failure to tender or pay a witness fee or mileage unless demand therefor is made at the time testimony is about to be taken and as a condition precedent to offering such production or testimony and unless payment thereof be not thereupon made. The provisions for payment of witness fee and/or mileage do not apply to any officer, director or person in the employ of any person, partnership, company, corporation, trust or association whose conduct or practices are being investigated. If a person subpoenaed to attend such inquiry fails to obey the command of the subpoena without good cause, or if a person in attendance upon such inquiry shall without reasonable cause refuse to be sworn or to answer a question or to produce a book, paper, document or other record when ordered to do so by the officer conducting such inquiry, or if a person, partnership, corporation, company, trust or association fails to perform any act hereunder required to be performed, he shall be guilty of a misdemeanor. The foregoing shall not prevent the attorney general from instituting civil contempt proceedings under section twenty-three hundred eight (b) of the civil practice law and rules against any person who violates any of the above provisions. It shall be the duty of all public officers, their deputies, assistants, clerks, subordinates or employees, and all other persons to render and furnish to the attorney general, his deputy or other designated representative, when so requested, all information and assistance in their possession or within their power. Any officer participating in such inquiry and any person examined as a witness upon such inquiry who shall disclose to any person other than the attorney general the name of any witness examined or any other information obtained upon such inquiry, except as so directed by the attorney general shall be guilty of a misdemeanor. Such inquiry may upon written authorization of the attorney general be made public. The misdemeanors provided in this section shall be punishable by a fine of not more than one thousand dollars or imprisonment for not more than one year, or both.