decherta.jpg
1900 K Street, NW
Washington, DC 20006-1110
+1 202 261 3300 Main
+1 202 261 3333 Fax
www.dechert.com
Exhibit 5.2
March 4, 2025
Main Street Capital Corporation
1300 Post Oak Boulevard, 8th Floor
Houston, TX 77056
Ladies and Gentlemen:
We have acted as counsel to Main Street Capital Corporation, a Maryland corporation (the “Company”), in connection with the preparation and filing of a registration statement on Form N-2 (File No. 333-285405) filed by the Company with the Securities and Exchange Commission (the “Commission”) under the Securities Act of 1933, as amended (the “Securities Act”), on February 28, 2025 (the “Registration Statement”), relating to the public offering of securities of the Company that may be offered by the Company from time to time as set forth in the prospectus dated February 28, 2025, which was included in the Registration Statement, and which forms a part of the Registration Statement (the “Prospectus”), and as may be set forth from time to time in one or more supplements to the Prospectus.
This opinion letter is rendered in connection with the issuance and sale from time to time of up to 1,000,000 shares of the Company’s common stock, par value $0.01 per share (the “Shares”), as described in the prospectus supplement, dated March 4, 2025, filed with the Commission pursuant to Rule 424(b)(2) under the Securities Act (the “Prospectus Supplement”). The Shares are to be sold by the Company pursuant to the direct stock purchase feature of the Company’s Dividend Reinvestment and Direct Stock Purchase Plan (the “Plan”).
In rendering the opinion expressed below, we have examined and relied on originals or copies, certified or otherwise identified to our satisfaction, of such documents, corporate records and other instruments and such agreements, certificates and receipts of public officials, certificates of officers or other representatives of the Company and others, and such other documents as we have deemed necessary or appropriate as a basis for rendering the opinion set forth below, including the following documents:
(i)the Registration Statement;
(ii)the Plan;
(iii)the Articles of Amendment and Restatement of the Company, certified as of the date hereof by an officer of the Company;
(iv)the Amended and Restated Bylaws of the Company, certified as of the date hereof by an officer of the Company;
(v)a Certificate of Good Standing with respect to the Company issued by the State Department of Assessments and Taxation of the State of Maryland as of a recent date; and
(vi)the resolutions of the board of directors of the Company relating to, among other things, (a) the authorization and approval of the preparation and filing of the Registration Statement, and (b) the authorization, issuance, offer and sale of the Shares pursuant to the Plan, the Registration Statement, the Prospectus and the Prospectus Supplement, certified as of the date hereof by an officer of the Company.
As to the facts upon which this opinion is based, we have relied, to the extent we deem proper, upon certificates of public officials (which we have assumed remain accurate as of the date of this opinion letter) and certificates and written statements of agents, officers, directors and representatives of the Company. We have not independently established the facts or, in the case of certificates of public officials, the other statements so relied upon.


Main Street Capital
Corporation
March 4, 2025
Page 2
With respect to such examination and our opinion expressed herein, we have assumed, without any independent investigation or verification, (i) the genuineness of all signatures on all documents submitted to us for examination, (ii) the legal capacity of all natural persons and the legal power and authority of all persons signing on behalf of the parties to such documents (other than the Company), (iii) the authenticity of all documents submitted to us as originals, (iv) the conformity to original documents of all documents submitted to us as conformed or reproduced copies and the authenticity of the originals of such copied documents, and (v) that all certificates issued by public officials or Company officers have been properly issued and that such certificates remain accurate on the date of this letter. We also have assumed without independent investigation or verification the accuracy and completeness of all corporate records made available to us by the Company and that there has been no oral modification of, or amendment or supplement (including any express or implied waiver, however arising) to, any of the agreements, documents or instruments used by us to form the basis of the opinion expressed below.
This opinion letter is limited to the effect of the General Corporation Law of the State of Maryland, as in effect on the date hereof, and we express no opinion as to the applicability or effect of any other laws of such jurisdiction or the laws of any other jurisdictions. Without limiting the preceding sentence, we express no opinion as to any state securities or broker dealer laws or regulations thereunder relating to the offer, issuance and sale of the Shares. This opinion letter has been prepared, and should be interpreted, in accordance with customary practice followed in the preparation of opinion letters by lawyers who regularly give, and such customary practice followed by lawyers who on behalf of their clients regularly advise opinion recipients regarding, opinion letters of this kind.
Based upon and subject to the limitations, exceptions, qualifications and assumptions set forth in this opinion letter, we are of the opinion that the issuance of the Shares has been duly authorized and when the Shares are (i) issued and delivered against receipt by the Company of payment therefor as specified in the Registration Statement, the Prospectus Supplement and in accordance with the terms of the Plan and (ii) if applicable, countersigned by the transfer agent, the Shares will be validly issued, fully paid and nonassessable.
The opinions expressed in this opinion letter (i) are strictly limited to the matters stated in this opinion letter, and without limiting the foregoing, no other opinions are to be implied and (ii) are only as of the date of this opinion letter, and we are under no obligation, and do not undertake, to advise the addressee of this opinion letter or any other person or entity either of any change of law or fact that occurs, or of any fact that comes to our attention, after the date of this opinion letter, even though such change or such fact may affect the legal analysis or a legal conclusion in this opinion letter.
We hereby consent to the filing of this opinion letter as an exhibit to the Company’s Current Report on Form 8-K filed with the Commission on March 4, 2025 and its incorporation by reference into the Registration Statement and further consent to the reference to our firm in the “Legal Matters” section in the Prospectus Supplement. We do not admit by giving this consent that we are in the category of persons whose consent is required under Section 7 of the Securities Act or the rules and regulations of the Commission thereunder.

Very truly yours,
/s/ Dechert LLP