CUSTODY AGREEMENT

This agreement (the “Agreement”) dated as of December 31, 2007 between MAIN STREET CAPITAL CORPORATION, a corporation organized and existing under the laws of the state of Maryland having a place of business located at 11300 Post Oak Boulevard, Suite 800, Houston, Texas 77056 (the “Fund”), and BRANCH BANKING AND TRUST COMPANY, a North Carolina banking corporation having a place of business at 223 West Nash Street, Wilson NC 27893 (the “Custodian”).

WITNESSETH:

That for and in consideration of the mutual promises hereinafter set forth the Fund and the Custodian hereby agree as follows:

ARTICLE 1
DEFINITIONS

Whenever used in this Agreement, the following words shall have the meanings set forth below:

1. “1940 Act” shall mean the Investment Company Act of 1940, as amended.

2. “Authorized Person” shall be any person, whether or not an officer or employee of the Fund, duly authorized according to a Certificate to give any Instruction with respect to one or more Account, such persons to be designated in the Certificate annexed hereto as Schedule 1 hereto or such other super-ceding Certificate as may be received by Custodian from time to time. Such persons so designated shall continue to be Authorized Persons until such time as Custodian receives a super-ceding Certificate from the Fund that any such person is no longer an Authorized Person.

3. “Book-Entry System” shall mean the Federal Reserve/Treasury book-entry system for receiving and delivering securities, its successors and nominees.

4. “Business Day” shall mean any day on which Custodian and relevant Depositories are open for business.

5. “Certificate” shall mean any written notice, signed by an officer of the Fund so authorized, which certifies to Custodian the names and signatures of those persons designated Authorized Persons, and the names of the members of the Fund’s Board of Directors, together with any changes which may occur from time to time.

6. “Depository” shall include (a) the Book-Entry System, (b) the Depository Trust Company, (c) any other clearing agency or securities depository registered with the Securities and Exchange Commission identified to the Fund from time to time, and (d) the respective successors and nominees of the foregoing.

7. “Instructions” shall mean the communications that contain all information reasonably requested by Custodian to enable Custodian to carry out Instructions which are actually received by Custodian by S.W.I.F.T., tested telex, letter, facsimile transmission, or other method or system specified by Custodian as available for use in connection with the services hereunder. Custodian shall act on Instructions only if Custodian reasonably believes in good faith that such Instructions have been given by an Authorized Person.

8. “Securities” shall include, without limitation, any common stock and other equity securities, U.S. Treasury Securities, bonds, rights, warrants, debentures and other debt securities, notes, mortgages or other obligations, and any instruments representing rights to receive, purchase, or subscribe for the same, or representing any rights or interests therein (whether represented by a certificate or held in a Depository).

ARTICLE II
APPOINTMENT OF CUSTODIAN; ACCOUNT;
REPRESENTATIONS, WARRANTIES AND COVENANTS

1. (a) The Fund hereby appoints Custodian to keep and maintain all Securities and cash at any time delivered to Custodian during the term of this Agreement. The Fund hereby authorizes Custodian to hold securities in registered form in its name or the name of its nominees or other form satisfactory to the Fund. Custodian hereby accepts such appointment. Custodian agrees to establish and maintain the following account, subject only to draft or order by Custodian acting pursuant to the terms of this Agreement:

(i) an account in the name of the Fund for Securities or cash received by or on behalf of Custodian for the account of the Fund (the “Control Account”).

Custodian shall maintain books and records regarding the Control Account in accordance with industry standards relating to custody account of the nature described herein.

(b) Custodian may from time to time establish on its books and records such sub-account within the Control Account as the Fund and the Custodian may agree (each a “Special Account”), and Custodian shall reflect therein such assets as the Fund may specify in Instructions.

2. The Fund hereby represents and warrants that:

(a) It is duly organized and existing under the laws of the jurisdiction of its organization, with full power to carry on its business as now conducted, to enter into this Agreement, and to perform its obligations hereunder;

(b) This Agreement has been duly authorized, executed and delivered by the Fund, approved by a resolution of its board, constitutes a valid and legally binding obligation of the Fund, enforceable in accordance with its terms, and there is no statute, regulation, rule, order or judgment binding on it, and no provision of its charter or by-laws or other contract binding on it which would prohibit its execution or performance of this Agreement;

(c) It is fully informed of the protections and risks associated with various methods of transmitting Instructions and delivering Certificates to Custodian and shall cause each Authorized Person to, safeguard and treat with extreme care any user authorization codes, passwords and/or authorization keys, understands that there may be more secure methods of transmitting or delivering the same than the methods selected by it, agrees that the security procedures (if any) to be followed in connection therewith provide a commercially reasonable degree of protection in light of its particular needs and circumstances;

(d) Its transmission or giving of, and Custodian acting upon and in reliance on, Certificates or Instructions pursuant to this Agreement shall at all times comply with the 40 Act;

3. The Fund hereby covenants that it shall from time to time complete and execute and deliver to Custodian upon Custodian’s request a Form FR U-1 (or successor thereto) whenever the Fund borrows from Custodian any money to be used for the purchase or carrying of margin stock as defined in Federal Reserve Regulation U.

4. Custodian represents and warrants that (i) assuming execution and delivery of this Agreement by the Fund, this Agreement is Custodian’s legal, valid and binding obligation, enforceable in accordance with its terms; (ii) it has full power and authority to enter into and has taken all necessary corporate action to authorize the execution of this Agreement and (iii) in the event that it becomes necessary to engage a foreign sub-custodian, any engagement of such will be in accordance with Rule 17f-5 of the 1940 Act.

ARTICLE III
CUSTODY AND RELATED SERVICES

1. Custodian shall hold in a separate account, and physically segregate at all times from those of any other persons, firms or corporations, pursuant to the provisions hereof, all Securities or cash received by it for or for the account of the Fund. All such Securities are to be held or disposed of by Custodian at all times pursuant to Instructions, pursuant to this Agreement. The Custodian shall have no power or authority to assign, hypothecate, pledge or otherwise dispose of any such securities or investments, except pursuant to the directive of the Fund and only for the account of the Fund as set forth otherwise in this Agreement.

(a) Custodian will identify in its records and hold and physically segregate, where Securities are issued in physical form, for the Fund all Securities to the Fund’s Account.

(b) Custodian is authorized, in its discretion to utilize Depositories. With respect to each Depository, Custodian (i) shall exercise due care in accordance with reasonable commercial standards in discharging it duties as a securities intermediary to obtain and thereafter maintain Securities or other financial assets deposited or held in such Depository, and (ii) will provide promptly upon request by the Fund, such reports as are available concerning the internal accounting controls and financial strength of the Custodian. Each Depository utilized by Custodian shall at all times comply with rule 17f-4 under the 1940 Act.

(c) It is not currently anticipated that Custodian will utilize a foreign securities depository (as that term is defined by Rule 17f-7 under the 1940 Act).

2. Custodian shall furnish the Fund with an advice of daily transactions (including a confirmation of each transfer of Securities) and a monthly summary of all transfers to or from the Account.

3. With respect to all Securities held hereunder, Custodian shall, unless otherwise instructed to the contrary:

(a) Receive all income and other payments and advise the Fund as promptly as practicable of any such amounts due but not paid;

(b) Present for payment and receive the amount paid upon all Securities which may mature and advise the Fund as promptly as practicable of any such amounts due but not paid, provided, however, Custodian shall have no obligation to collect any payments that may due pursuant to any Securities that are promissory notes extended by the Fund;

(c) Forward to the Fund copies of all information or documents that it may actually receive from an issuer of Securities which, in the opinion of Custodian, are intended for the beneficial owner of Securities;

(d) Execute, as custodian, any certificates of ownership, affidavits, declarations or other certificates under any tax laws now or hereafter in effect in connection with the collection of bond and note coupons;

(e) Hold directly or through a Depository all rights and similar Securities issued with respect to any Securities credited to an Account hereunder; and

(f) Endorse for collection checks, drafts or other negotiable instruments.

4. (a) Custodian shall notify the Fund of rights or discretionary actions with respect to Securities held hereunder, and of the date or dates by when such rights must be exercised or such action must be taken, provided that Custodian has actually received, from the Issuer or the relevant Depository or a nationally recognized bond or corporate action service to which Custodian subscribes, timely notice of such rights or discretionary corporate action or of the date or dates such rights must be exercised or such action must be taken. Absent actual receipt of such notice, Custodian shall have no liability for failing to so notify the Fund.

(b) Whenever Securities (including, but not limited to, warrants, options, tenders, options to tender or non-mandatory puts or calls) confer discretionary rights on the Fund or provide for discretionary action or alternative courses of action by the Fund, the Fund shall be responsible for making any decisions relating thereto and for directing Custodian to act. In order for Custodian to act, it must receive the Fund’s Certificate of Instructions at Custodian’s offices, addressed as Custodian may from time to time request, but not later than noon (Eastern time) at least two (2) Business Days prior to the last scheduled date to act with respect to such securities. Absent Custodian’s timely receipt of such Instructions, Custodian shall not be liable for failure to take any action relating to or to exercise any rights conferred by such Securities.

5. All voting rights with respect to Securities, however registered, shall be exercised by the Fund or its designee. Custodian will make available to the Fund proxy voting services upon the request of the Fund in accordance with terms and conditions to be mutually agreed upon by Custodian and the Fund.

6. Custodian shall promptly advise the Fund upon Custodian’s actual receipt of notification of the partial redemption, partial payment or other action affecting less than all Securities of the relevant class. If Custodian or any Depository holds any Securities in which the Fund has an interest as part of a fungible mass, Custodian or Depository may select the Securities to participate in such partial redemption, partial payment or other action in any non-discriminatory manner that it customarily uses to make such selection.

7. Custodian shall not under any circumstances accept bearer interest coupons which have been stripped from United States federal, state or local government or agency securities unless explicitly agreed to by Custodian in writing.

8. The Fund shall be liable for all taxes, assessments, duties and other governmental charges, including any interest or penalty with respect thereto (“Taxes”), with respect to any cash or Securities held on behalf of the Fund or any transaction related thereto. The Fund shall indemnify Custodian for any amount of Tax that Custodian or any other withholding agent is required under applicable laws (whether by assessment or otherwise) to pay on behalf of, or in respect of income earned by or payments or distributions made to or for the account of the Fund (including any payment of Tax required by reason of an earlier failure to withhold). Custodian shall, or instruct any applicable other withholding agent to, withhold the amount of any Tax which is required to be withheld under applicable law upon collection of any dividend, interest or other distribution made with respect to any Security and any proceeds or income from the sale, loan or other transfer of any Security. In the event that Custodian is required under applicable law to pay any Tax on behalf of the Fund, Custodian is hereby authorized to withdraw cash from any Control Account in the amount required to pay such Tax and to use such cash, or to remit such cash to another withholding agent, for the timely payment of such Tax in the manner required by applicable law. Custodian shall provide prior notice to the Fund before taking such action. If the aggregate amount of cash in all Control Account is not sufficient to pay such Tax, Custodian shall promptly notify the Fund of the additional amount of cash required, and the Fund shall directly deposit such additional amount in the appropriate Control Account promptly after receipt of such notice, for use by Custodian as specified herein.

9. (a) For the purpose of settling Securities transactions, the Fund shall provide Custodian with sufficient immediately available funds for all transactions by such time and date as conditions in the relevant market dictate. Custodian shall provide the Fund with immediately available funds each day which result from the actual settlement of all sale transactions, based upon advices received by Custodian from Depositories. Such funds shall be in U.S. dollars.

(b) To the extent that Custodian has agreed to provide pricing or other information services in connection with this Agreement, Custodian is authorized to utilize any vendor (including brokers and dealers in Securities) reasonably believed by Custodian to be reliable to provide such information. The Fund agrees that it will provide to the Custodian on a monthly basis the balance of all promissory notes held by Custodian. The Custodian shall have no duty to verify or in any manner confirm the information provided by the Fund to Custodian relating to the value or outstanding balance of any promissory note held by Custodian. The Fund acknowledges that Custodian shall use the information provided by the Fund to prepare the monthly statement information provided to the Fund by the Custodian.

10. Until such time as Custodian receives Instructions to the contrary with respect to a particular Security, Custodian may release the identity of the Fund to an issuer which requests such information pursuant to the Shareholder Communications Act of 1985 for the specific purpose of direct communications between such issuer and shareholder.

ARTICLE IV
PURCHASE AND SALE OF SECURITIES
CREDITS TO ACCOUNT

1. Promptly after each purchase or sale of Securities by the Fund, the Fund shall deliver to Custodian Instructions, specifying all information Custodian may reasonably request to settle such purchase or sale. Custodian shall account for all purchases and sales of Securities on the actual settlement date unless otherwise agreed by Custodian.

2. The Fund understands that when Custodian is instructed to deliver Securities against payment, delivery of such Securities and receipt of payment therefore may not be completed simultaneously. Notwithstanding any provision in this Agreement to the contrary, settlements, payments and delivery of Securities may be effected by Custodian in accordance with the customary or established securities trading or securities processing practices and procedures in the jurisdiction in which the transaction occurs, including, without limitation, delivery to a purchaser or dealer therefore (or agent) against receipt with the expectation of receiving later payment for such Securities. The Fund assumes full responsibility for all risks, including, without limitation, credit risks, involved in connection with such deliveries of Securities.

3. Custodian may, as a matter of bookkeeping convenience or by separate agreement with the Fund, credit the Control Account with the proceeds from any sale, redemption or other disposition of Securities or interest, dividends or other distributions payable on Securities prior to its actual receipt of final payment therefore. All such credits shall be conditional until Custodian’s actual receipt of final payment and may be reversed by Custodian to the extent that final payment is not received. Payment with respect to a transaction will not be considered final until Custodian shall have received immediately available funds, which under local applicable law, rule and/or practice are irreversible and not subject to any security interest, levy or other encumbrance, and which are specifically applicable to such transaction.

ARTICLE V
OVERDRAFTS AND INDEBTEDNESS

1. Fund will have sufficient immediately available funds each day in the Control Account (without regard to any Control Account investments) to pay for the settlement of all Financial Assets delivered to the Fund against payment by Fund and credited to the Securities Account. If a debit to the Control Account results (or will result) in a debit balance, the Custodian may, in its discretion, (i) advance an amount equal to the overdraft, (ii) refuse to settle in whole or in part the transaction causing such debit balance, or (iii) if any such transaction is posted to the Securities Account, reverse any such posting. If Custodian elects to make such advance, the advance will be deemed a loan to the Fund, payable on demand, bearing interest at the applicable rate charged by Custodian from time to time, for such overdrafts, from the date of such advance to the date of payment (both after as well as before judgment) and otherwise on the terms on which Custodian makes similar overdrafts available from time to time.

2. If the Custodian advances any amount to or for the benefit of the Fund, any assets held in the Securities Account shall be security for any amounts so advanced in an amount not to the exceed the amount of such an advance. If, after Custodian provides written notice to the Fund of any advance, the Fund fails to promptly repay the advance, the Custodian shall be entitled to use the Fund’s available cash to repay such amount.

3. If the Fund borrows money from any bank (including Custodian if the borrowing is pursuant to a separate agreement) using securities held by Custodian hereunder as collateral for such borrowings, the Fund shall deliver to Custodian Instructions specifying with respect to each such borrowing: (a) the name of the bank, (b) the amount of the borrowing, (c) the time and date, if known, on which the loan is to be entered into, (d) the total amount payable to the Fund on the borrowing date, (e) the Securities to be delivered as collateral for such loan, including the name of the issuer, the title and number of shares or the principal amount of any particular Securities, and (f) a statement specifying whether the loan is for investment purposes or for temporary or emergency purposes and that such loan is in conformance with the 40 Act and the Fund’s prospectus. Custodian shall deliver on the borrowing date specified in a Certificate the specified collateral against payment by the lending bank of the total amount of the loan payable, provided that the same conforms to the total amount payable as set forth in the Certificate. Custodian may, at the option of the lending bank, keep such collateral in its possession, but such collateral shall be subject to all rights therein given the lending bank by virtue of any promissory note or loan agreement. Upon Instructions of the Fund, Custodian shall deliver such Securities as additional collateral as may be specified in such Instructions to collateralize further any transaction described in this section. The Fund shall cause all Securities released from collateral status to be returned directly to Custodian, and Custodian shall receive from time to time such return of collateral as may be tendered to it. In the event the Fund fails to specify in Instructions, the name of the issuer, the title and number of shares or the principal amount of any particular Securities to be delivered as collateral by Custodian, Custodian shall not be under any obligation to deliver any Securities as collateral for borrowings.

ARTICLE VI
SALE AND REDEMPTION OF SHARES

1. Whenever the Fund shall sell any shares issued by the Fund (“Shares”) it shall deliver to Custodian a Certificate or Instructions specifying the amount of money and/or Securities to be received by Custodian for the sale of such Shares and specifically allocated to an Account.

2. Upon receipt of such money, Custodian shall credit such money to an Account as specified by the Fund.

3. Except as provided hereinafter, whenever the Fund desires Custodian to make payment out of the money held by Custodian hereunder in connection with a redemption of any Shares, it shall furnish to Custodian a Certificate of Instructions specifying the total amount to be paid for such Shares. Custodian shall make payment of such total amount to the transfer agent specified in such Certificate of Instructions out of the money held in the Account specified by the Fund.

ARTICLE VII
PAYMENT OF DIVIDENDS OR DISTRIBUTIONS

1. Whenever the Fund shall determine to pay a dividend or distribution on Shares it shall furnish to Custodian Instructions setting forth therein the declaration of such dividend or distribution, the total amount payable, and the payment date.

2. Upon the payment date specified in such Instructions , Custodian shall pay out of the money held, the total amount payable to the dividend agent of the Fund specified therein.

ARTICLE VII
CONCERNING THE CUSTODIAN

1. (a) Except as otherwise expressly provided herein, Custodian shall not be liable for any costs, expenses, damages, liabilities or claims, including attorneys’ and accountants’ fees (collectively, “Losses”), incurred by or asserted against the Fund, except those Losses arising out of Custodian’s own negligence or willful misconduct. Custodian shall have no liability whatsoever for the action or inaction of any Depositories except in each such case to the extent such action or inaction is a direct result of Custodian’s failure to fulfill its duties hereunder. In no event shall Custodian be liable to the Fund or any third party for special, indirect or consequential damages, or lost profits or loss of business, arising in connection with this Agreement, nor shall Custodian be liable: (i) for acting in accordance with any Certificate or Instructions actually received by Custodian and reasonably believed by Custodian to be given by an Authorized Person; (ii) for conclusively presuming that all disbursements of cash directed by the Fund, whether by a Certificate or an Instruction, are in accordance with Section 2(h) of Article II hereof; (iii) for any Losses due to forces beyond the control of Custodian, including without limitation strikes, work stoppages, acts of war or terrorism, insurrection, revolution, nuclear or natural catastrophes or acts of God, or interruptions, loss or malfunctions or utilities, communications or computer (software and hardware) services; or (iv) for any Losses arising from the applicability of any law or regulation now or hereafter in effect.

(b) Custodian may enter into subcontracts, agreements and understandings with other parties whenever and on such terms and conditions as it deems necessary or appropriate to perform its services hereunder. No such subcontract, agreement or understanding shall discharge Custodian from its obligations hereunder.

(c) The Fund agrees to indemnify Custodian and hold Custodian harmless from and against any and all Losses sustained or incurred by or asserted against Custodian by reason of any action or inaction, or arising out of Custodian’s performance hereunder, including reasonable fees and expenses of counsel incurred by Custodian, provided however, that the Fund shall not indemnify Custodian for those Losses arising out of Custodian’s own negligence or willful misconduct. This indemnity shall be a continuing obligation of the Fund, its successors and assigns, notwithstanding the termination of this Agreement.

2. Without limiting the generality of the foregoing, Custodian shall be under no obligation to inquire into, and shall not be liable for:

(a) Any Losses incurred by the Fund or any other person as a result of the receipt or acceptance of fraudulent, forged or invalid Securities which are otherwise not freely transferable without encumbrance in any relevant market;

(b) The validity of the issue of any Securities purchased, sold, or written by or for the Fund, the legality of the purchase, sale or writing thereof, or the propriety of the amount paid or received therefore;

(c) The legality of the sale or redemption of any Shares, or the propriety of the amount received of paid therefore;

(d) The legality of the declaration or payment of any dividend or distribution by the Fund;

(e) The legality of any borrowing by the Fund;

(f) The legality of any loan of portfolio Securities, nor shall Custodian be under any duty or obligation to see to it that any cash or collateral delivered to it by a broker, dealer or financial institution or held by it at any time as a result of such loan or portfolio Securities is adequate security for the Fund against any loss it might sustain as a result of

such loan, which duty or obligation shall be the sole responsibility of the Fund. In addition, Custodian shall be under no obligation or duty to see that any broker, dealer or financial institution to which portfolio Securities of the Fund are lent makes payment to it of any dividends or interest which are payable to or for the account of the Fund during the period of such loan or at the termination of such loan, provided, however that Custodian shall promptly notify the Fund in the event that such dividends or interest are not paid and received when due.

3. Custodian will be entitled to rely on, and may act upon the advice of professional advisers in relation to matters of law, regulation or market practice (which may be the professional advisers to the Fund) and will not be liable to the Fund for any action taken or omitted pursuant to such advice provided that the Custodian exercised reasonable care in the selection of such professional advisers and acts reasonably in reliance on such advice. Notwithstanding the foregoing, such reliance shall not effect the Custodian’s liability with respect to its responsibilities under the terms of this Agreement and the 1940 Act

4. Custodian shall be under no obligation to take any action to collect any amount payable on Securities in default, or if payment is refused after due demand and presentment.

5. Custodian shall have no duty or responsibility to inquire into, make recommendations, supervise, or determine the suitability of any transaction affecting any Account.

6. The Fund shall pay to Custodian the fees and charges as may be specifically agreed upon from time to time and such other fees and charges at Custodian’s standard rates for such services as may be applicable. The Fund shall reimburse Custodian for all costs associated with the conversion of the Fund’s Securities hereunder and the transfer of Securities and records kept in connection with this Agreement. The Fund shall also reimburse Custodian for out-of-pocket expenses which are a normal incident of the services provided hereunder.

7. Custodian has the right to debit any Control Account for any amount payable by the Fund in connection with any and all obligations of the Fund to Custodian.

8. If the Fund elects to transmit Instructions through an on-line communications system offered by Custodian, the Fund’s use thereof shall be subject to any terms and conditions that may be imposed by Custodian. If Custodian receives Instructions which appear on their face to have been transmitted by an Authorized Person via (i) computer facsimile, email, the Internet or other insecure electronic method, or (ii) secure electronic transmission containing applicable authorization cods, passwords and/or authentication keys, the Fund understands and agrees that Custodian cannot determine the identity of the actual sender of such Instructions and that Custodian shall conclusively presume that such Instructions have been sent by an Authorized Person, and the Fund shall be responsible for ensuring that only Authorized Persons transmit such Instructions to Custodian. If the Fund elects (with Custodian’s prior consent) to transmit Instructions through an on-line communications service owned or operated by a third party, the Fund agrees that Custodian shall not be responsible for the reliability or availability of such service.

9. The Custodian shall create and maintain all records relating to its activities and obligations under this Agreement in such manner as will meet the obligations of the Fund under the 1940 Act, with particular attention to Section 31 thereof and Rules 31a-1 and 31a-2 thereunder. To the extent that the Custodian is able to do so, the Custodian shall provide assistance to the Fund (at the Fund’s reasonable request) providing sub-certifications regarding certain of its services performed hereunder to the Fund in connection with the Fund’s Sarbanes-Oxley Act of 2002 certification requirements. The books and records pertaining to the Fund which are in possession of Custodian shall be the property of the Fund. Such books and records shall be prepared and maintained as required by the 40 Act and the rules thereunder. The Fund, or its authorized representatives, shall have access to such books and records maintained by Custodian hereunder upon reasonable prior notice to Custodian during Custodian’s normal business hours.

10. It is understood that Custodian is authorized to supply any information regarding the Account which is required by any law, regulation or rule now or hereafter in effect. The Custodian shall provide the Fund with any report obtained or required to be obtained by the Custodian on the system of internal accounting control of a Depository.

11. Custodian shall have no duties or responsibilities whatsoever except such duties and responsibilities as are specifically set forth in this Agreement, and no covenant or obligation shall be implied against Custodian in connection with this Agreement.

ARTICLE IX
TERMINATION

1. Either of the parties hereto may terminate this Agreement by giving to the other party a notice in writing specifying the date of such termination, which shall be not less than sixty (60) days after the date of giving such notice. In the event such notice is given by the Fund, it shall be accompanied by a copy of a resolution of the board of the Fund, certified by the Secretary or any Assistant Secretary, electing to terminate this Agreement and designating a successor custodian or custodians, each of which shall be a bank or trust company having not less than $50,000,000 aggregate capital, surplus and undivided profits (or such amount as may be required by the 1940 Act). In the event such notice is given by Custodian, the Fund shall, on or before the termination date, deliver to Custodian a copy of a resolution of the board of the Fund, certified by the Secretary or any Assistant Secretary, designating a successor custodian or custodians. In the absence of such designation by the Fund, Custodian may designate a successor custodian, which shall be a bank or trust company having not less than $50,000,000 aggregate capital, surplus and undivided profits (or such amount as may be required by the 1940 Act). Upon the date set forth in such notice this Agreement shall terminate, and Custodian shall upon receipt of a notice of acceptance by the successor custodian on that date deliver directly to the successor custodian all Securities and money then owned by the Fund and held by it as Custodian, after deducting all fees, expenses and other amounts for the payment or reimbursement of which it shall be entitled.

2. If a successor custodian is not designated by the Fund or Custodian in accordance with the preceding Section, the Fund shall upon the date specified in the notice of termination of this Agreement and upon delivery by Custodian of all Securities (other than Securities which cannot be delivered to the Fund) and money then owned by the Fund be deemed to be its own custodian and Custodian shall thereby be relieved of all duties and responsibilities pursuant to this Agreement, other than the duty with respect to Securities which cannot be delivered to the Fund to hold such Securities hereunder in accordance with this Agreement.

ARTICLE X
MISCELLANEOUS

1. The Fund agrees to furnish to Custodian a new Certificate of Authorized Persons in the event of any change in the then present Authorized Persons. Until such new Certificate is received, Custodian shall be fully protected in acting upon Certificates of Instructions of such present Authorized Persons.

2. Any notice or other instrument in writing, authorized or required by this Agreement to be given to Custodian, shall be sufficiently addressed to Custodian and received by it at its offices at 223 West Nash Street, Wilson NC 27893, or at such other place as Custodian may from time to time designate in writing.

3. Any notice or other instrument in writing, authorized or required by this Agreement to be given to the Fund shall be sufficiently given if addressed to the Fund and received by it at its offices as indicated above, or at such other place as the Fund may from time to time designate in writing.

4. Each and every right granted to either party hereunder or under any other document delivered hereunder or in connection herewith, or allowed it by law or in equity, shall be cumulative and may be exercised from time to time. No failure on the part of either party to exercise, and no delay in exercising, any right will operate as a waiver thereof, nor will any single or partial exercise by either party of any right preclude any other or future exercise thereof or the exercise of any other right.

5. In case any provision in any obligation under this Agreement shall be invalid, illegal or unenforceable in any exclusive jurisdiction, the validity, legality and enforceability of the remaining provisions shall not in any way be affected thereby. This Agreement may not be amended or modified in any manner except by a written agreement executed by both parties. This Agreement shall extend to and shall be binding upon the parties hereto and their respective successors and assigns; provided, however, that this Agreement shall not be assignable by either party without the written consent of the other.

6. This Agreement shall be construed in accordance with the substantive laws of the State of North Carolina, without regard to conflicts of laws principles thereof. In the event of a conflict with applicable laws of the State of North Carolina, or any provision herein, and the 1940 Act, the 1940 Act shall control. The Fund and Custodian hereby consent to the jurisdiction of a state or federal court situated in North Carolina in connection with any dispute arising hereunder. The Fund hereby irrevocably waives, to the fullest extent permitted by applicable law, any objection which it may now or hereafter have to the laying of venue of any such proceeding brought in such a court and claim that such proceeding brought in such a court has been brought in an inconvenient forum. The Fund and Custodian each hereby irrevocably waives any rights to trial by jury in any legal proceeding arising out of or relating to this Agreement.

7. The Fund hereby acknowledges that Custodian is subject to federal laws, including its Customer Identification Program (“CIP”) requirements under the USA PATRIOT Act and its implementing regulations, pursuant to which Custodian must obtain, verify and record information that allows Custodian to identify the Fund. Accordingly, prior to opening an Account hereunder Custodian will ask the Fund to provide certain information including, but not limited to, the Fund’s name, physical address, tax identification number and other information that will help Custodian to identify and verify the Fund’s identity such as organizational documents, certificate of good standing, license to do business, or other pertinent identifying information. The Fund agrees that Custodian cannot open an Account hereunder unless and until Custodian verifies the Funds identity in accordance with its CIP.

8. Reference is hereby made to that certain Control Agreement of even date herewith by and between the Fund, the Custodian and Branch Banking and Trust Company as Administrative Agent (“Control Agreement”). Should any of the terms of this Agreement conflict with the Control Agreement, the Control Agreement will control.

9. This Agreement may be executed in any number of counterparts, each of which shall be deemed to be an original, but such counterparts shall, together, constitute only one instrument.

[signature page follows]

1

IN WITNESS WHEREOF, the Fund and Custodian have caused this Agreement to be executed by their
respective officers, thereunto duly authorized, as of the day and year first above written.

MAIN STREET CAPITAL CORPORATION

     
By:
Name:
Title:
  /s/ Todd A. Reppert
Todd A. Reppert
President

BRANCH BANKING AND TRUST COMPANY

By: /s/ Maura S. Pope

Name: Maura S. Pope Title: Vice President Name: Maura S. Pope
     
     
    Title:     Vice President

2