Exhibit 10.17

MIDCAROLINA BANK

ENDORSEMENT
SPLIT DOLLAR AGREEMENT

THIS ENDORSEMENT
SPLIT DOLLAR AGREEMENT (this Agreement) is entered into as of this 1st day of October, 2004 by and between MidCarolina Bank, a North Carolina-chartered commercial bank (the
Bank), and Robert C. Patterson, an officer of the Bank (the Officer). This Agreement shall append the Split Dollar Policy Endorsement entered into on even date herewith or as subsequently amended, by and between the
aforementioned parties.

WHEREAS, to encourage the Officer to remain an employee of the Bank, the Bank
is willing to divide the death proceeds of a life insurance policy on the Officers life. The Bank will pay life insurance premiums from its general assets,

WHEREAS, the Bank and the Officer are parties to a Split Dollar Agreement dated as of January 25, 2002, and

WHEREAS, the Bank and the Officer intend that this Agreement shall amend and restate in its entirety the
January 25, 2002 Split Dollar Agreement, and from and after the Effective Date of this Agreement the January 25, 2002 Split Dollar Agreement shall be of no further force or effect.

NOW THEREFORE, in consideration of these premises and other good and valuable consideration, the
receipt and sufficiency of which are hereby acknowledged, the Officer and the Bank hereby agree as follows.

Article 1

General Definitions

Capitalized terms
not otherwise defined in this Agreement are used herein as defined in the Salary Continuation Agreement dated as of the date of this Agreement between the Bank and the Officer. The following terms shall have the meanings specified 

1.1 Administrator means the administrator described in Article 7.

1.2 Insured means the Officer.

1.3 Insurer means each life insurance carrier in which there
is a Split Dollar Policy Endorsement attached to this Agreement.

1.4 Net Death Proceeds means the total death proceeds of the
Policy minus the cash surrender value.

1.5 Officers Interest means the benefit set forth in Section 2.2.

1.6 Policy means the specific life insurance policy or policies issued by the Insurers.



---

1.7 Split Dollar Policy Endorsement means the form required by the Administrator or the Insurer to
indicate the Officers interest, if any, in a Policy on such Officers life.

Article 2

Policy Ownership/Interests

2.1
Bank Ownership. The Bank is the sole owner of the Policy and shall have the right to exercise all incidents of ownership. The Bank shall be the beneficiary of the remaining death proceeds of the Policy after the Officers Interest has
been paid according to Section 2.2 below.

2.2 Death Benefit. The Officer shall have the right to designate the beneficiary of
the Officers Interest. If at the time of Termination of Employment the Officer is entitled to benefits under the Salary Continuation Agreement in effect at the time of Termination of Employment, or if Termination of Employment occurs because
of the Officers death, then the beneficiary designated in accordance with the Split Dollar Policy Endorsement shall be entitled to 80% of the Net Death Proceeds (the Officers Interest). The Officer or the Officers
transferee shall also have the right to elect and change settlement options that may be permitted for the Officers Interest.

2.3
Comparable Coverage. The Bank may replace the Policy with a comparable insurance policy to cover the benefit provided under this Agreement, in which case the Bank and the Officer shall execute a new Split Dollar Policy Endorsement for the
comparable insurance policy.

2.4 Internal Revenue Code Section 1035 Exchanges. The Officer recognizes and agrees that the Bank
may after this Split Dollar Agreement is adopted wish to exchange the Policy of life insurance on the Officers life for another contract of life insurance insuring the Officers life. Provided that the Policy is replaced (or intended to
be replaced) with a comparable policy of life insurance, the Officer agrees to provide medical information and cooperate with medical insurance-related testing required by a prospective insurer for implementing the Policy or, if necessary, for
modifying or updating to a comparable insurer.

Article 3

Premiums

3.1 Premium Payment. The Bank shall pay any premiums due on
the Policy.

3.2 Economic Benefit. The Administrator shall annually determine the economic benefit attributable to the Officer based
on the amount of the current term rate for the Officers age multiplied by the aggregate death benefit payable to the Officers beneficiary. The current term rate is the minimum amount required to be imputed under applicable
Internal Revenue Service authority.

3.3 Imputed Income. The Bank shall impute the economic benefit to the Officer on an annual
basis.



---

Article 4

Assignment

The Officer may irrevocably assign without consideration all of the Officers
rights and interest in this Agreement to any person, entity, or trust established by the Officer or the Officers spouse. If the Officer transfers all of the Officers rights and interest in this Agreement, then all of the Officers
rights and interest in the Agreement shall be vested in the Officers transferee, who shall be substituted as a party hereunder and the Officer shall have no further interest in this Agreement.

Article 5

Insurer

The Insurer shall be bound only by the terms of the Policy. Any payments the Insurer makes or actions it takes in accordance with the Policy shall
fully discharge it from all claims, suits and demands of all entities or persons. The Insurer shall not be bound by or be deemed to have notice of the provisions of this Agreement.

Article 6

Claims and Review Procedures

6.1 Claims Procedure. Any person or entity who has not received benefits under this Agreement that he or she believes should be paid (the
claimant) shall make a claim for such benefits as follows 

6.1.1 Initiation  Written Claim.
The claimant initiates a claim by submitting to the Administrator a written claim for the benefits.

6.1.2 Timing of
Administrator Response. The Administrator shall respond to such claimant within 90 days after receiving the claim. If the Administrator determines that special circumstances require additional time for processing the claim, the Administrator can
extend the response period by an additional 90 days by notifying the claimant in writing, prior to the end of the initial 90-day period, that an additional period is required. The notice of extension must set forth the special circumstances and the
date by which the Administrator expects to render its decision.

6.1.3 Notice of Decision. If the Administrator
denies part or all of the claim, the Administrator shall notify the claimant in writing of such denial. The Administrator shall write the notification in a manner calculated to be understood by the claimant. The notification shall set forth 

(a) The specific reasons for the denial,

(b) A reference to the specific provisions of this Agreement on which the denial is based,

(c) A
description of any additional information or material necessary for the claimant to perfect the claim and an explanation of why it is needed,

(d) An explanation of the Agreements review procedures and the time limits applicable to such procedures, and



---

(e) A statement of the claimants right to bring a civil action under ERISA section 502(a) following
an adverse benefit determination on review.

6.2 Review Procedure. If the Administrator denies part or all of the claim, the
claimant shall have the opportunity for a full and fair review by the Administrator of the denial, as follows 

6.2.1
Initiation  Written Request. To initiate the review, within 60 days after receiving the Administrators notice of denial the claimant must file with the Administrator a written request for review.

6.2.2 Additional Submissions  Information Access. The claimant shall then have the opportunity to submit written comments,
documents, records and other information relating to the claim. Upon request and free of charge, the Administrator shall also provide the claimant reasonable access to, and copies of, all documents, records and other information relevant (as defined
in applicable ERISA regulations) to the claimants claim for benefits.

6.2.3 Considerations on Review. In
considering the review, the Administrator shall take into account all materials and information the claimant submits relating to the claim, without regard to whether such information was submitted or considered in the initial benefit determination.

6.2.4 Timing of Administrator Response. The Administrator shall respond in writing to such claimant within 60 days
after receiving the request for review. If the Administrator determines that special circumstances require additional time for processing the claim, the Administrator can extend the response period by an additional 60 days by notifying the claimant
in writing, prior to the end of the initial 60-day period, that an additional period is required. The notice of extension must set forth the special circumstances and the date by which the Administrator expects to render its decision.

6.2.5 Notice of Decision. The Administrator shall notify the claimant in writing of its decision on review. The Administrator shall
write the notification in a manner calculated to be understood by the claimant. The notification shall set forth 

(a) The specific
reasons for the denial,

(b) A reference to the specific provisions of the Agreement on which the denial is based,

(c) A statement that the claimant is entitled to receive, upon request and free of charge, reasonable access to, and copies of, all documents, records and
other information relevant (as defined in applicable ERISA regulations) to the claimants claim for benefits, and

(d) A statement of
the claimants right to bring a civil action under ERISA section 502(a).



---

Article 7

Administration of Agreement

7.1 Administrator Duties. This Agreement shall be administered
by an Administrator, which shall consist of the board or such committee as the board shall appoint. The Officer may be a member of the Administrator. The Administrator shall also have the discretion and authority to (a) make, amend, interpret,
and enforce all appropriate rules and regulations for the administration of this Agreement and (b) decide or resolve any and all questions, including interpretations of this Agreement, as may arise in connection with the Agreement.

7.2 Agents. In the administration of this Agreement, the Administrator may employ agents and delegate to them such administrative duties as it
sees fit (including acting through a duly appointed representative) and may from time to time consult with counsel, who may be counsel to the Bank.

7.3 Binding Effect of Decisions. The decision or action of the Administrator with respect to any question arising out of or in connection with the administration, interpretation, and application of this Agreement and the rules and
regulations promulgated hereunder shall be final and conclusive and binding upon all persons having any interest in the Agreement.

7.4
Indemnity of Administrator. The Bank shall indemnify and hold harmless the members of the Administrator against any and all claims, losses, damages, expenses, or liabilities arising from any action or failure to act with respect to this
Agreement, except in the case of willful misconduct by the Administrator or any of its members.

7.5 Information. To enable the
Administrator to perform its functions, the Bank shall supply full and timely information to the Administrator on all matters relating to the date and circumstances of the retirement, death, or Termination of Employment of the Officer and such other
pertinent information as the Administrator may reasonably require.



---

Article 8

Miscellaneous

8.1 Binding Effect. This Agreement shall bind the Officer and the Bank and
their beneficiaries, survivors, executors, administrators, and transferees, and any Policy beneficiary.

8.2 Amendment and Termination
of Agreement. This Agreement may be amended solely by a written agreement signed by the Bank and the Officer. This Agreement shall automatically terminate and the Officers rights and interest in this Agreement shall be forfeited if
benefits under the Salary Continuation Agreement are neither paid nor payable because of termination under Article 5 of the Salary Continuation Agreement. This Agreement shall also terminate upon distribution of death benefits in accordance with
Section 2.2 above.

8.3 Successors; Binding Agreement. By an assumption agreement in form and substance satisfactory to the
Officer, the Bank shall require any successor (whether direct or indirect, by purchase, merger, consolidation, or otherwise) to all or substantially all of the business or assets of the Bank to expressly assume and agree to perform this Agreement in
the same manner and to the same extent that the Bank would be required to perform this Agreement if no succession had occurred.

8.4 No
Guarantee of Employment. This Agreement is not an employment policy or contract. It does not give the Officer the right to remain an employee of the Bank, nor does it interfere with the Banks right to discharge the Officer. It also does
not require the Officer to remain an employee or interfere with the Officers right to terminate employment at any time.

8.5
Applicable Law. This Agreement and all rights hereunder shall be governed by and construed according to the laws of the State of North Carolina, except to the extent preempted by the laws of the United States of America.

8.6 Entire Agreement. This Agreement and the Salary Continuation Agreement constitute the entire agreement between the Bank and the Officer as to
the subject matter hereof. No rights are granted to the Officer by this Agreement other than those specifically set forth herein. This Agreement supersedes and replaces in its entirety the January 25, 2002 Split Dollar Agreement, and from and
after the Effective Date of this Agreement the January 25, 2002 Split Dollar Agreement shall be of no further force or effect.

8.7
Severability. If for any reason any provision of this Agreement is held invalid, such invalidity shall not affect any other provision of this Agreement not held invalid, and each such other provision shall continue in full force and effect to
the full extent consistent with law. If any provision of this Agreement is held invalid in part, such invalidity shall not affect the remainder of the provision not held invalid, and the remainder of the provision together with all other provisions
of this Agreement shall continue in full force and effect to the full extent consistent with law.

8.8 Headings. Caption headings
and subheadings herein are included solely for convenience of reference and shall not affect the meaning or interpretation of any provision of this Agreement.

8.9 Notices. All notices, requests, demands, and other communications hereunder shall be in writing and shall be deemed to have been duly given if delivered by hand or mailed, certified or registered mail,
return receipt requested, with postage prepaid, to the following addresses or to such other



---

address as either party may designate by like notice. Unless otherwise changed by notice, notice shall be properly
addressed to the Officer if addressed to the address of the Officer on the books and records of the Bank at the time of the delivery of such notice, and properly addressed to the Bank if addressed to the Board of Directors, MidCarolina Bank, 3101
South Church Street, Burlington, North Carolina 27215.

IN WITNESS
WHEREOF, the Officer and a duly authorized representative of the Bank have executed this Agreement as of the date first written above.



|                        |  |                  |  |                          
|----------------------- |  | ---------------- |  | -------------------------
|OFFICER:                |  | BANK:           
|                        |  | MidCarolina Bank
|                        |  |                 
|/s/ Robert C. Patterson |  | By:              |  | /s/ Randolph J. Cary, Jr.
|Robert C. Patterson     |  | Its:             |  | Chief Executive Officer  
|                        |  |                 
|                        |  | And By:          |  | /s/ Trudi Isakson        
|                        |  | Its:             |  | Corporate Secretary      



---

AGREEMENT TO COOPERATE WITH
INSURANCE UNDERWRITING INCIDENT TO INTERNAL REVENUE CODE SECTION 1035 EXCHANGE

I acknowledge that I have read the Endorsement Split Dollar Agreement and agree to be bound by its terms, particularly the covenant on my part set
forth in section 2.4 of the Endorsement Split Dollar Agreement to provide medical information and cooperate with medical insurance-related testing required by an insurer to issue a comparable insurance policy to cover the benefit provided under this
Endorsement Split Dollar Agreement.



|        |  |        
|------- |  | -------
|Witness |  | Officer



---

SPLIT DOLLAR POLICY ENDORSEMENT



|                             |  |                                                     
|---------------------------- |  | ----------------------------------------------------
|Insured: Robert C. Patterson |  | Insurer: Massachusetts Mutual Life Insurance Company
|Policy No. XXXXXX            |  |                                                     

Under the terms of the MidCarolina Bank Split Dollar Agreement dated as of , 2004, the
undersigned Owner requests that the above-referenced policy issued by the Insurer provide for the following beneficiary designation and limited contract ownership rights to the Insured:

1. Upon the death of the Insured, proceeds shall be paid in one sum to the Owner, its successors or assigns, to the extent of its interest in the policy.
It is hereby provided that the Insurer may rely solely upon a statement from the Owner concerning the amount of proceeds it is entitled to receive under this paragraph.

2. Any proceeds at the death of the Insured in excess of the amount paid under the provisions of the preceding paragraph shall be paid in one sum to:



|                                                           
|-----------------------------------------------------------
|PRIMARY
BENEFICIARY, RELATIONSHIP/SOCIAL SECURITY NUMBER   
|CONTINGENT BENEFICIARY, RELATIONSHIP/SOCIAL SECURITY NUMBER

The exclusive right to change the beneficiary for the proceeds payable under this paragraph, to elect any optional
method of settlement for the proceeds paid under this paragraph that is available under the terms of the policy, and to assign all rights and interests granted under this paragraph are hereby granted to the Insured. The sole signature of the Insured
shall be sufficient to exercise said rights. The Owner retains all contract rights not granted to the Insured under this paragraph.

3. It
is agreed by the undersigned that this designation and limited assignment of rights shall be subject in all respects to the contractual terms of the policy.

4. Any payment directed by the Owner under this endorsement shall be a full discharge of the Insurer, and such discharge shall be binding on all parties claiming any interest under the policy.

The undersigned for the Owner is signing in a representative capacity and warrants that he or she has the authority to bind the entity on whose behalf
this document is being executed.

Signed at
, North Carolina, this day  of
, 2004.



|                    |  |                  |  | 
|------------------- |  | ---------------- |  | 
|INSURED:            |  | OWNER:          
|                    |  | MidCarolina Bank
|                    |  |                 
|                    |  | By:              |  | 
|Robert C. Patterson |  |                  |  | 
|                    |  | Its:             |  | 



---

SPLIT DOLLAR POLICY ENDORSEMENT



|                             |  |                                                
|---------------------------- |  | -----------------------------------------------
|Insured: Robert C. Patterson |  | Insurer: Jefferson-Pilot Life Insurance Company
|Policy No. XXXXXXX           |  |                                                

Under the terms of the MidCarolina Bank Split Dollar Agreement dated as of
, 2004, the undersigned Owner requests that the above-referenced policy issued by the Insurer provide for the
following beneficiary designation and limited contract ownership rights to the Insured:

1. Upon the death of the Insured, proceeds shall be
paid in one sum to the Owner, its successors or assigns, to the extent of its interest in the policy. It is hereby provided that the Insurer may rely solely upon a statement from the Owner concerning the amount of proceeds it is entitled to receive
under this paragraph.

2. Any proceeds at the death of the Insured in excess of the amount paid under the provisions of the preceding
paragraph shall be paid in one sum to:



|                                                           
|-----------------------------------------------------------
|PRIMARY
BENEFICIARY, RELATIONSHIP/SOCIAL SECURITY NUMBER   
|CONTINGENT BENEFICIARY, RELATIONSHIP/SOCIAL SECURITY NUMBER

The exclusive right to change the beneficiary for the proceeds payable under this paragraph, to elect any optional
method of settlement for the proceeds paid under this paragraph that is available under the terms of the policy, and to assign all rights and interests granted under this paragraph are hereby granted to the Insured. The sole signature of the Insured
shall be sufficient to exercise said rights. The Owner retains all contract rights not granted to the Insured under this paragraph.

3. It
is agreed by the undersigned that this designation and limited assignment of rights shall be subject in all respects to the contractual terms of the policy.

4. Any payment directed by the Owner under this endorsement shall be a full discharge of the Insurer, and such discharge shall be binding on all parties claiming any interest under the policy.

The undersigned for the Owner is signing in a representative capacity and warrants that he or she has the authority to bind the entity on whose behalf
this document is being executed.

Signed at
, North Carolina, this  day of
, 2004.



|                    |  |                  |  | 
|------------------- |  | ---------------- |  | 
|INSURED:            |  | OWNER:          
|                    |  | MidCarolina Bank
|                    |  |                 
|                    |  | By:              |  | 
|Robert C. Patterson |  |                  |  | 
|                    |  | Its:             |  |