Document:

EX-10.3

CONTROL AGREEMENT

THIS CONTROL AGREEMENT, dated as of December 31, 2007 (as the same may be amended, restated,
modified and/or supplemented from time to time, this “Agreement”) is by and among MAIN
STREET CAPITAL CORPORATION, a Maryland corporation (the “Customer”), BRANCH BANKING AND
TRUST COMPANY, a North Carolina banking corporation, acting by and through its Corporate Trust
Services Department, as account holder (in such capacity, the “Custodian”), and BRANCH
BANKING AND TRUST COMPANY, as Administrative Agent for itself and the other Secured Parties (as
defined below) (in such capacity, the “Administrative Agent”).

W I T N E S S E T H:

WHEREAS, the Administrative Agent and the Lenders (as defined in the Credit Agreement defined
below) have agreed to extend credit to the Borrower (as defined in the Credit Agreement) pursuant
to the terms of that certain Treasury Secured Revolving Credit Agreement of even date herewith (as
amended, restated, or otherwise modified from time to time, the “Credit Agreement”) among
the Customer, the initial guarantor party thereto, the Administrative Agent and the Lenders
signatory thereto;

WHEREAS, as a condition of the obligations of Administrative Agent and the Lenders to extend
credit under the Credit Agreement and the other Loan Documents (as defined in the Credit
Agreement), the Customer and the Administrative Agent have entered into a Security Agreement of
even date (as the same may be amended, modified, restated and/or supplemented from time to time,
the “Security Agreement”) in order to secure the payment of all of the Obligations (as
defined in the Security Agreement), pursuant to which the Customer has granted the Administrative
Agent, for the benefit of itself and the other Secured Parties (as defined in the Security
Agreement), a security interest in all right, title and interest of the Customer in and to the
Collateral (as defined in the Security Agreement), including, without limitation, all right, title
and interest of the Customer in and to Account No.      established and maintained by the
Custodian in the name of Customer, and any sub-accounts related thereto (the “Custodian
Securities Account”) and all Pledged Assets (as defined below) from time to time on deposit
therein; and

WHEREAS, the Customer and the Administrative Agent desire to enter into this Agreement in
order to, inter alia, ensure that the security interests of Administrative Agent in the Pledged
Assets and the Custodian Securities Account under the Security Agreement (the “Security
Interests”) are and remain perfected under the UCC;

NOW THEREFORE, in consideration of the premises, the mutual promises contained herein, and for
other valuable consideration, the receipt and sufficiency of which are hereby acknowledged, and in
order to ensure that all of the Security Interests remain perfected under the UCC, the parties
hereto hereby agree as follows:

SECTION 1. Definitions; Exhibits.

The following capitalized terms used herein shall have the definitions specified below:

“Adverse Claim” has the meaning given such term in Section 8-102(a)(1) of the UCC.

“Clearing Corporation” has the meaning given such term in Section 8-102(a)(5) of the
UCC.

“Entitlement Holder” has the meaning given such term in Section 8-102(a)(7) of the
UCC.

“Entitlement Order” has the meaning given such term in Section 8-102(a)(8) of the UCC.

“Event of Default” has the meaning provided in the Security Agreement.

“Financial Asset” has the meaning given such term in Section 8-102(a)(9) of the UCC.

“Indemnitees” has the meaning set forth in Section 12 hereof.

“Investment Property” has the meaning given such term in Section 9-102(a)(49) of the
UCC.

“Notice of Adverse Claim” has the meaning given such term in Section 8-105 of the UCC.

“Notice of Event of Default” has the meaning set forth in Section 4 hereof.

“Person” shall mean any individual, partnership, joint venture, firm, corporation,
association, trust or other enterprise or any government or political subdivision or any agency,
department or instrumentality thereof.

“Pledged Assets” means (i) the Custodian Securities Account and any and all assets and
other property, tangible or intangible, now existing or hereafter arising, maintained in, credited
to or recorded in the Custodian Securities Account, including without limitation any and all
Investment Property, Treasury Securities, securities and other financial assets maintained in,
recorded in, credited to or contained therein (including, without limitation, the Cash Collateral);
(ii) any and all Security Entitlements with respect to the financial assets maintained in, recorded
in or credited to the Custodian Securities Account; (iii) any and all other Investment Property or
assets from time to time maintained in, credited to or recorded in the Custodian Securities
Account; (iv) any and all cash and cash equivalents from time to time maintained in, credited to or
recorded in the Custodian Securities Account; (v) all Supporting Obligations which relate to, arise
from or are in connection with the assets maintained in, credited to or recorded in the Custodian
Securities Account; (vi) all replacements or substitutions for any of the foregoing; and (vii) all
proceeds and products of any of the foregoing and the proceeds and products of other proceeds and
products..

“Proceeds” has the meaning given such term in Section 9-102(a)(64) of the UCC.

“Securities Account” has the meaning given such term in Section 8-501(a) of the UCC.

“Securities Intermediary” has the meaning given to such term in Section 8- 102(a)(14)
of the UCC.

“Security” and “Securities” has the meaning given such term in Section
8-102(a)(15) of the UCC.

“Security Entitlement” has the meaning given such term in Section 8-102(a)(17) of the
UCC.

“Supporting Obligation” has the meaning given such term in Section 9-102(a)(80) of the
UCC.

“Treasury Securities” shall mean Treasury Securities of the United States maturing
within 90 days of the date of acquisition thereof.

“UCC” means the Uniform Commercial Code as in effect in the State of North Carolina
from time to time; provided that all references herein to specific sections or subsections
of the UCC are references to such sections or subsections, as the case may be, of the Uniform
Commercial Code as in effect in the State of North Carolina on the date hereof.

SECTION 2. The Custodian Securities Account. The Customer represents that none of
the Pledged Assets, which have not been endorsed to the Custodian or in blank, are registered in
the name of the Customer, payable to the Customer’s order, or specifically endorsed to the
Customer. To the Custodian’s knowledge, except for the claims and interest of the Administrative
Agent and the Customer in the Pledged Assets, the Custodian has not been notified in writing of any
claim to or interest in the Pledged Assets.

SECTION 3. Priority of Lien. The Custodian hereby acknowledges the Security Interest
granted to the Administrative Agent by the Customer in the Custodian Securities Account and the
Pledged Assets, and acknowledges the Administrative Agent’s exclusive control over the Custodian
Securities Account and the Pledged Assets. The Custodian hereby subordinates in favor of the
Administrative Agent’s Security Interest in the Custodian Securities Account and the Pledged Assets
(for the benefit of the Secured Parties) all liens, encumbrances, claims and rights of setoff
against the Custodian Securities Account and/or the Pledged Assets carried therein which the
Custodian may currently have or acquire at any time in the future by contract or by law (statutory
or otherwise), except that the Custodian will retain its prior lien in the Pledged Assets to secure
payments for securities or other property purchased for the Custodian Securities Account, and
normal commissions and fees relating to the Custodian Securities Account or the Pledged Assets.

SECTION 4. Control; Transfer Restrictions.

(a) In order to provide for control of the Custodian Securities Account and to perfect
Administrative Agent’s Security Interest therein and in the Pledged Assets, the Customer hereby
irrevocably orders, directs and instructs the Custodian, and the Custodian hereby agrees, to
promptly comply with any and all Entitlement Orders, instructions, orders, directions and
notifications communicated to the Custodian and originated by the Administrative Agent relating to
any or all the Pledged Assets, without further consent by the Customer or any other person or
entity. Customer hereby further irrevocably orders, directs and instructs the Custodian, and the
Custodian hereby agrees, that Custodian will not comply with Entitlement Orders relating to any or
all of the Pledged Assets originated by any party (including Customer) other than Administrative
Agent, without in each case Administrative Agent’s express written consent. Customer agrees, and
Custodian acknowledges, that Customer may not at any time withdraw or transfer to any other
account any of the Pledged Assets or any other assets comprising the Custodian Services Account.
Custodian agrees that it will not comply with any order or instruction originated by Customer or
any third party that would require Custodian to violate the foregoing withdrawal or transfer
restrictions. Further, Custodian agrees that Customer may not margin or otherwise write checks
against the Custodian Securities Account.

(b) All cash distributions in respect of the Pledged Assets and all proceeds of any sale of
any Pledged Assets shall be credited to the Custodian Securities Account and shall be subject to
the withdrawal and transfer restrictions set forth in Section 4(a) above.

(c) Customer and Custodian agree and acknowledge that upon the occurrence of an Event of
Default, Administrative Agent is hereby authorized and empowered, acting alone without the consent
of or notice to Customer, to direct Custodian by written notice thereof (such notice may be
referred to herein as the “Notice of Event of Default”) to transfer the Pledged Assets to
Administrative Agent or to liquidate the Pledged Assets and remit the proceeds generated therefrom
to Administrative Agent for application to the Obligations in accordance with the terms of the
Credit Agreement.

(d) It is understood and agreed that the Custodian shall be under no duty or obligation to
inquire or determine whether or not such instructions or Entitlement Orders originated by the
Administrative Agent have been made in accordance with this Agreement, nor seek confirmation
thereof from the Customer or any other person, except the Administrative Agent or a court of
competent jurisdiction.

SECTION 5. Statements, Confirmations and Notices of Adverse Claims. The Custodian
will, pursuant to its standard procedures, send or make available (i) by electronic means copies of
all statements and confirmations concerning the Pledged Assets and the Custodian Securities Account
to each of the Customer and the Administrative Agent and (ii) upon the written request of the
Administrative Agent, a current list setting forth the Financial Assets then credited to the
Custodian Securities Account, at the address set forth below in this Agreement or such other
address or location as instructed by the Customer and the Administrative Agent. If the Custodian
at any time has any Adverse Claim or receives any notice of any lien or encumbrance or any Notice
of Adverse Claim against the Custodian Securities Account or in any Pledged Asset contained
therein, the Custodian will promptly notify the Administrative Agent and the Customer thereof.

SECTION 6. Representations, Warranties and Agreements of the Customer. The Customer
hereby represents, warrants and agrees as follows:

(a) All Securities constituting Pledged Assets are fully paid and non-assessable.

(b) The Pledged Assets are not subject to any security interest (other than the
security interest created in favor of the Administrative Agent under the Security Agreement)
or any Adverse Claim.

(c) None of the Pledged Assets is or will be registered in the name of the Customer or
specially indorsed to the Customer unless indorsed by the Customer to the Custodian or in
blank.

(d) The Customer is duly organized and is validly existing in good standing in its
jurisdiction of organization.

(e) The execution, delivery and performance of this Agreement by the Customer and all
documents and instruments to be delivered hereunder by the Customer have been duly
authorized by the Customer.

(f) The person executing this Agreement on behalf of the Customer has been duly
authorized to act on its behalf.

(g) This Agreement constitutes the legal, valid and binding obligation of the Customer,
enforceable against the Customer in accordance with its terms, except as such enforceability
(i) may be limited by applicable bankruptcy, insolvency, reorganization, moratorium and
similar laws affecting the enforcement of creditors’ rights and remedies generally and (ii)
is subject to general principles of equity (regardless of whether enforceability is
considered in a proceeding in equity or at law).

(h) The Customer’s entry into this Agreement will not violate any agreement, law, rule
or regulation by which Customer is bound or by which any of its assets are affected.

SECTION 7. Representations, Warranties and Agreements of Administrative Agent. The
Administrative Agent hereby represents and warrants that this Agreement constitutes the legal,
valid and binding obligation of the Administrative Agent, enforceable against the Administrative
Agent in accordance with its terms, except as such enforceability (i) may be limited by applicable
bankruptcy, insolvency, reorganization, moratorium and similar laws affecting the enforcement of
creditors’ rights and remedies generally and (ii) is subject to general principles of equity
(regardless of whether enforceability is considered in a proceeding in equity or at law).

SECTION 8. Representations, Warranties and Agreements of Custodian. The Custodian
hereby represents, warrants and agrees on the date hereof and shall be deemed to represent, warrant
and agree each time any Pledged Assets are to be credited to the Custodian Securities Account:

(a) the Custodian is a Securities Intermediary and is acting in that capacity with
respect to the Administrative Agent and in the ordinary course of its business maintains
accounts to which securities may be credited for others and is acting in that capacity in
respect of the Customer;

(b) such Pledged Assets have been credited to the Custodian Securities Account and, in
the case of any Pledged Assets constituting Financial Assets credited to the Custodian
Securities Account after the date hereof, a confirmation thereof has been delivered or
transmitted electronically to the Administrative Agent;

(c) the Custodian will treat any and all of the Pledged Assets and any and all other
property and assets credited from time to time to the Custodian Securities Account as
Financial Assets;

(d) the Custodian is not a Clearing Corporation;

(e) the Custodian Securities Account is a Securities Account;

(f) the Custodian will not change the name or account number of the Custodian
Securities Account without the prior written consent of the Administrative Agent and the
Customer;

(g) the Custodian has not entered into any agreement (other than this Agreement) with
any Person under which the Custodian would be obligated to comply with any Entitlement
Orders with respect to the Custodian Securities Account and/or Pledged Assets credited
thereto and/or which, to the Custodian’s knowledge, purports to limit or condition the
obligation of the Custodian to comply with the instructions and Entitlement Orders
originated by the Administrative Agent, and agrees not to enter into any such agreements
without the prior written consent of the Administrative Agent and the Customer;

(h) the Custodian (to its knowledge) does not have any Adverse Claim and has not
received any Notice of Adverse Claim in respect of any of the Pledged Assets; and

(g) Custodian will make appropriate entries to the Custodian Securities Account on the
books of Custodian in order to evidence Administrative Agent’s Security Interest.

SECTION 9. Responsibility of the Custodian. Until this Agreement is terminated as
provided in Section 13 hereof, the Custodian shall have no responsibility or liability to the
Customer for complying with Entitlement Orders or other directives concerning the Custodian
Securities Account originated by the Administrative Agent. The Custodian shall have no duty to
investigate or make any determination as to whether a default or Event of Default exists under any
agreement between the Customer and the Administrative Agent and shall comply with a Notice of Event
of Default even if it believes that no such default exists. This Agreement does not create any
obligation or duty for the Custodian other than those expressly set forth herein.

SECTION 10. Standard of Care. Notwithstanding any provision contained herein or in
any other document or instrument to the contrary, neither the Custodian nor any of its affiliates,
controlling persons, directors, officers employees or agents (each, an “Indemnified Party”)
shall be liable for (i) prior to the termination of this Agreement pursuant to Section 13 hereof,
following the instruction of the Administrative Agent and (ii) in all other respects, shall not be
liable for any action taken or not taken by it (or them) under or in connection with this
Agreement, except to the extent such liability was proximately caused by the Custodian’s or an
Indemnified Party’s own gross negligence or willful misconduct. In no event shall the Custodian be
liable for indirect, special or consequential damages of any kind whatsoever (including lost
profits and lost business opportunity) even if it is advised of the possibility of such damages and
regardless of the form of action in which any such damages may be claimed. Without limiting the
foregoing, and notwithstanding any provision to the contrary elsewhere, each of the Custodian and
its officers, affiliates, controlling persons, directors, employees and agents:

(a) shall have no responsibilities, obligations or duties other than those expressly
set forth in this Agreement and, without limiting the foregoing, the Custodian shall have no
duty to exercise or enforce rights in the Pledged Assets against prior parties or otherwise;

(b) may in any instance where the Custodian determines that it lacks or is uncertain as
to its authority to take or refrain from taking certain action, or as to the requirements of
this Agreement under any circumstance before it, delay or refrain from taking action unless
and until it has received instructions from the Administrative Agent or advice from legal
counsel (or other appropriate advisor), as the case may be;

(c) so long as it shall have acted (or refrained from acting) in good faith, shall not
be liable for any error of judgment in any action taken, suffered or omitted by, or for any
act done or step taken, suffered or omitted by, or for any mistake of fact or law, unless
such action constitutes gross negligence or willful misconduct on its part;

(d) may consult with legal counsel selected by it (or other experts for the
Administrative Agent or the Customer), and shall not be liable for any action taken or not
taken by it or them in good faith in accordance with the advice of such experts, unless such
action constitutes gross negligence or willful misconduct on its part;

(e) will not be responsible to the Administrative Agent for any statement, warranty or
representation made by any party other than the Custodian in connection with this Agreement;

(f) will have no duty to ascertain or inquire as to the performance or observance by
the Customer of any of the terms, conditions or covenants of the Credit Agreement, the
Security Agreement or any other security agreement with the Administrative Agent;

(g) will not incur any liability by acting or not acting in reliance upon any notice,
consent, certificate, statement or other instrument or writing believed in good faith by it
to be genuine and signed or sent by the proper party or parties;

(h) will not incur liability for any notice, consent, certificate, statement, wire
instruction, telecopy, or other writing which is delayed, canceled or charged without the
knowledge of the Custodian;

(i) shall not be deemed to have or be charged with notice or knowledge of any fact or
matter unless a written notice thereof has been received by the Custodian at the address and
to the person designated in (or as subsequently designated pursuant to) this Agreement;

(j) shall not be obligated or required by any provision of this Agreement to expend or
risk the Custodian’s own funds, or to take any action (including but not limited to the
institution or defense of legal proceedings) which in its judgment may cause it to incur or
suffer any expense or liability; provided, however, if the Custodian elects to take any such
action it shall be entitled to security or indemnity for the payment of the costs, expenses
(including but not limited to reasonable attorneys’ fees) and liabilities which may be
incurred therein or thereby, satisfactory to the Custodian;

(k) shall not incur any liability for acts or omissions of any domestic or foreign
depository or book-entry system for the central handling of Financial Assets; and

(l) shall not be responsible for the title, validity or genuineness of any Pledged
Asset in or delivered into the Custodian Securities Account.

SECTION 11. Indemnification of the Custodian.

(a) The Customer agrees to indemnify and hold the Custodian and its affiliates,
directors, officers, controlling persons, agents and employees (collectively, the
“Indemnitees”) harmless from and against any and all claims, liabilities, losses, damages,
fines, penalties, and expenses, including out-of-pocket and incidental expenses and legal
fees (collectively, “Losses”) that may be imposed on, incurred by, or asserted against, the
Indemnitees or any of them for following any Entitlement Orders, instructions or other
directions upon which Indemnitees are authorized to rely pursuant to the terms of this
Agreement.

(b) In addition to and not in limitation of paragraph (a) immediately above, the
Customer also agrees to indemnify and hold each of the Indemnitees harmless from and against
any and all Losses that may be imposed on, incurred by, or asserted against, any of the
Indemnitees in connection with or arising out of this Agreement or the Custodian’s
performance under this Agreement, provided the Indemnitees have not acted with gross
negligence or engaged in willful misconduct (as determined by a court of competent
jurisdiction in a final and non-appealable judgment).

(c) The foregoing indemnifications shall survive any termination of this Agreement.
Notwithstanding the foregoing clauses (a) and (b), in no event shall any party to this
agreement be liable for indirect, special or consequential damages of any kind whatsoever
(including lost profits and lost business opportunity).

SECTION 12. Customer Agreement. In the event of a conflict between this Agreement
and any other agreement between the Custodian and the Customer relating to the Custodian Securities
Account, the terms of this Agreement will prevail, and in all other respects the terms of the other
agreement relating to the Custodian Securities Account shall apply with respect to any matters not
covered by this Agreement. Regardless of any provision in any such agreement, the State of North
Carolina shall be deemed to be the Custodian’s location for the purposes of this Agreement and the
perfection and priority of the Administrative Agent’s security interest in the Custodian Securities
Account and the Pledged Assets.

SECTION 13. Termination. The rights and powers granted herein to the Administrative
Agent have been granted in order to perfect its Security Interests in the Custodian Securities
Account and the Pledged Assets and are powers coupled with an interest and will neither be affected
by the bankruptcy, insolvency, conservatorship or receivership of the Customer or the Custodian nor
by the lapse of time. The obligations of the Custodian under this Agreement shall continue in
effect until (i) the Administrative Agent has notified the Custodian in writing that the Security
Interests of the Administrative Agent have been terminated at which time this Agreement shall
terminate immediately or (ii) the Custodian has resigned in accordance with the requirements of
this Section 13. The provisions of Sections 10 and 11 shall survive the termination of this
Agreement. Notwithstanding anything to the contrary in this Agreement, the Custodian may terminate
this Agreement on thirty (30) days’ written notice to the Customer and the Administrative Agent;
provided, however, that in the event of the notice of termination of this Agreement by
Custodian, Custodian shall promptly deliver to Administrative Agent (or its nominee) all Pledged
Assets contained in the Custodian Securities Account and any interest, dividends and proceeds
subsequently received by it with respect to such Pledged Assets on the effective date of
termination. Any liability or obligation of Custodian which arises prior to or upon the
termination of this Agreement shall survive the termination of this Agreement.

SECTION 14. Entire Agreement. This Agreement and any exhibits hereto and the
agreements and instruments required to be executed and delivered hereunder set forth the entire
agreement of the parties with respect to the subject matter hereof and supersede and discharge all
prior agreements (written or oral) and negotiations and all contemporaneous oral agreements
concerning such subject matter and negotiations. There are no oral conditions precedent to the
effectiveness of this Agreement.

SECTION 15. Amendments. No amendment, modification or termination of this Agreement
or waiver of any right hereunder shall be binding on any party hereto unless it is in writing and
is signed by the party to be charged.

SECTION 16. Severability. If any term or provision set forth in this Agreement shall
be invalid or unenforceable, the remainder of this Agreement, or the application of such terms or
provisions to persons or circumstances, other than those to which it is held invalid or
unenforceable, shall be construed in all respects as if such invalid or unenforceable term or
provision were omitted.

SECTION 17. Successors. The terms of this Agreement shall be binding upon, and shall
inure to the benefit of, the parties hereto and their respective successors and assigns.

SECTION 18. Rules of Construction. In this Agreement, words in the singular number
include the plural, and in the plural include the singular; words of the masculine gender include
the feminine and the neuter, and when the sense so indicates words of the neuter gender may refer
to any gender and the word “or” is disjunctive but not exclusive. The captions and section numbers
appearing in this Agreement are inserted only as a matter of convenience. They do not define,
limit or describe the scope or intent of the provisions of this Agreement.

SECTION 19. Notices. All notices, Entitlement Orders and other communications
hereunder shall be sent in accordance with the Notice provisions of the Credit Agreement. All
notices and other communications shall be in writing and addressed as follows:

(a) if to the Administrative Agent, at:

Branch Banking And Trust Company

200 West Second Street, 16th Floor

Winston-Salem, North Carolina 27101

Attn.: Michael F. Skorich

Tel. No.: (336) 733-2740

Fax. No.: (336) 733-2709

(b) if to the Customer, at:

Main Street Capital Corporation

11300 Post Oak Boulevard, Suite 800

Houston, Texas 77056

Attention: Todd A. Reppert, President

Telephone: (713) 350-6029

Telecopier: (713) 350-6042

(c) if to the Custodian, at:

Branch Banking And Trust Company

Attn: Corporate Trust Services Department

223 West Nash Street

Wilson, North Carolina 27893

Telephone: (252) 246-2177

Telecopier: (252) 246-4303

or at such other address as shall have been furnished in writing by any Person described above to
the party required to give notice hereunder.

SECTION 20. Counterparts. This Agreement may be executed in any number of
counterparts, all of which shall constitute one and the same instrument, and any party hereto may
execute this Agreement by signing and delivering one or more counterparts.

SECTION 21. Choice of Law; Jurisdiction of Custodian as Securities Intermediary.
This Agreement shall be governed by and construed in accordance with the laws of the State of North
Carolina, without regard to laws as to conflicts of laws, and shall be binding on the parties
hereto and their respective successors and assigns. Notwithstanding any provision of any other
agreement, the Custodian agrees that for purposes of Section 8-110(e) of the UCC, the jurisdiction
of the Custodian in its capacity as the Securities Intermediary of the Customer in respect of the
Pledged Assets is the State of North Carolina.

SECTION 22. Fees. The Customer shall pay to the Custodian the compensation agreed
upon in writing from time to time and any other includable expenses incurred in connection
herewith.

SECTION 23. Consent to Jurisdiction and Service. Each party hereto hereby
absolutely and irrevocably consents and submits to the jurisdiction of the courts of the State of
North Carolina and Federal courts located in the County and State of North Carolina in connection
with any actions or proceedings brought against any party hereto by any other party hereto and
arising out of or relating to this Agreement. Each party hereto hereby irrevocably waives any
objection on the grounds of venue forum non conveniens, or any similar grounds, and irrevocably
consents to service of process by mail or in any other manner permitted by North Carolina law, and
irrevocably waives its right to any jury trial.

1

IN WITNESS WHEREOF, the parties hereto have caused their duly authorized officers to
duly execute and deliver this Agreement as of the date first above written.

MAIN STREET CAPITAL CORPORATION,

as Customer

	 	 	 
	By:

Name:

Title:

	 	/s/ Todd A. Reppert

Todd A. Reppert

President

	 	 	BRANCH BANKING AND TRUST COMPANY, as Administrative
Agent

	 	 	 
	By:

Name:

Title:

	 	/s/ Michael F. Skorich

Michael F. Skorich

Vice President

	 	 	BRANCH BANKING AND TRUST COMPANY, as Custodian

	 	 	 
	By:

Name:

Title:

	 	/s/ Maura S. Pope

Maura S. Pope

Vice President

2EX-10.4

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

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00134-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00134-of-00352.parquet"}]]