EXHIBIT 10.4 [LETTERHEAD] PERSONAL AND CONFIDENTIAL May 28, 1996 Mid-Peninsula Bancorp 420 Cowper Street Palo Alto, CA 94301 Attention: Mr. David L. Kalkbrenner President & Chief Executive Officer Dear David: 1. This letter is to confirm our understanding that Mid-Peninsula Bancorp ("Mid-Peninsula" or the "Company") or any successor corporation has retained Alex. Brown & Sons Incorporated ("Alex. Brown") to act as Mid-Peninsula's financial advisor and to assist Mid-Peninsula in assessing the impact of, and the opportunities created by, the changing environment among financial institutions. In this capacity, Alex. Brown will provide financial advice to you as you deem necessary and analyze alternative strategies, including acquisitions, mergers or other forms of business combinations involving Mid-Peninsula. Specifically, Alex. Brown will render the following general advisory services to the Company: - Evaluation and complete financial analysis of acquisition opportunities including, but not limited to, acquisitions of commercial banks, thrift institutions, individual branches and non-depository institutions. - Development of an acquisition strategy for Mid-Peninsula, including assistance on such matters as the development of approach tactics to each target institution, valuation, pro forma financial modeling and analysis, negotiations, reviewing the financing alternatives for each transaction and assistance in the handling of investor relations. - A full review of Mid-Peninsula's takeover defense posture, including an analysis of the Company's existing defensive measures and recommendation of additional actions if required. A detailed review of the overall merger and acquisition Page 60 of 69 Pages Mid-Peninsula Bancorp May 28, 1996 Page 2 environment would also be presented with a particular emphasis on (i) the strategies of the active acquirers within Mid-Peninsula's trade area (ii) unsolicited offers for control; and (iii) the actions undertaken unilaterally by shareholders to disrupt the implementation of corporate strategy. - Active takeover defense assistance and strategic advice to Mid- Peninsula in the event of an unsolicited offer for control or accumulation of stock by an individual shareholder or shareholders acting as a group. - A detailed review of Mid-Peninsula. This would cover the following: - Historical financial performance evaluated against a relevant peer group of independent bank institutions; - Analysis of Mid-Peninsula's projections and their impact on shareholder value; - Identification and analysis of the Company's shareholders; and - Review and analysis of the historical trading patterns of the common stock. - Any additional financial analyses or advice as requested from time to time by Mid-Peninsula. - Presentations to the Board of Directors of the Company on any of the topics listed above as requested by management. 2. For serving in the above capacity, Alex. Brown would receive a $25,000 retainer and be reimbursed for its out-of-pocket expenses applicable to the undertaking, including reasonable legal fees if appropriate. 3. When requested by Mid-Peninsula, Alex. Brown would provide financial and strategic analysis of and advice with respect to specific transactions which, if consummated, would result in Mid-Peninsula acquiring, being acquired by or otherwise combining with another entity. Specifically, with respect to any particular transaction, Alex. Brown would as requested: (a) Render financial and strategic advice as it bears upon the valuation of any potential transaction; (b) Advise you as to the most appropriate form, consistent with law, accounting and business practice, for a proposed transaction; Page 61 of 69 Pages Mid-Peninsula Bancorp May 28, 1996 Page 3 (c) Act as your agent and financial advisor in the negotiating process, working with you and your legal counsel and accountants. As your agent, Alex. Brown will engage in discussions on your behalf with other entities or their representatives only when authorized by you to do so; and (d) Render our opinion as to the fairness, from a financial point of view, of the terms of a transaction to Mid-Peninsula shareholders. 4. Our fee for assisting you in connection with specific transactions would be agreed between us in the context of a particular transaction. Among the factors to be considered would be: (a) The scope and nature of our involvement; (b) The complexity of the transaction; (c) Whether we are requested to render a fairness opinion; and (d) Customary investment banking fees for transactions of comparable size. In addition, we understand that we may be asked to provide our opinions and advice on smaller transactions that Mid-Peninsula may from time to time consider; such advice will be provided at no additional fee. 5. INDEMNIFICATION AND CONTRIBUTION. In consideration of our services as the Company's financial advisor hereunder, the Company agrees to indemnify and hold harmless Alex. Brown and each of its directors, officers, agents, employees and controlling persons (within the meaning of the Securities Act of 1933, as amended) to the extent and as provided in Addendum A attached hereto and incorporated herein by reference. The provisions of this paragraph and Addendum A incorporated herein by reference shall be effective as of the date hereof, and shall continue in full force and effect until the termination of this agreement and, thereafter, shall survive the termination of Alex. Brown's engagement under this agreement and shall be binding upon any successors or assigns of the Company. 6. This agreement shall have an initial term extending until December 31, 1997, unless terminated prior thereto by the Company. Thereafter, this agreement shall renew automatically from year-to-year upon the same terms and conditions set forth herein until terminated in writing by either Alex. Brown or Mid-Peninsula. Page 62 of 69 Pages Mid-Peninsula Bancorp May 28, 1996 Page 4 If the foregoing letter correctly sets forth the terms of Alex. Brown's engagement, please sign and return to us the enclosed duplicate hereof. Very Truly Yours, ALEX. BROWN & SONS INCORPORATED By: /s/ Jean-Luc Servat ---------------------------------- Jean-Luc Servat Managing Director Accepted and Agreed: MID-PENINSULA BANCORP By: /s/ David L. Kalkbrenner ----------------------------------- David L. Kalkbrenner President & Chief Executive Officer Page 63 of 69 Pages ADDENDUM A In connection with our engagement described in the foregoing letter dated May 28, 1996, (the "Letter") to which this Addendum A is attached, the Company (as defined in the Letter) agrees to indemnify and hold harmless Alex. Brown & Sons Incorporated ("Alex. Brown") and each of its directors, officers, agents, employees and controlling persons (within the meaning of the Securities Act of 1933, as amended) from and against any losses, claims, damages or liabilities (or actions or proceedings in respect thereof) (collectively "Liabilities") related to or arising out of this engagement, and will reimburse Alex. Brown and each other person indemnified hereunder for all reasonable legal and other expenses as incurred in connection with defending any such Liabilities, whether or not Alex. Brown or any of its directors, officers, agents, employees and controlling persons is a named party thereto; provided, however, that the Company will not be liable in any such case (except cases arising out of the use of information provided by the Company with knowledge of its falsity) for Liabilities that a court of competent jurisdiction shall have found in a final judgment to have arisen primarily from the gross negligence, willful misconduct or bad faith of Alex. Brown or the party claiming a right to indemnification. In case any proceeding shall be instituted involving any person in respect of whom indemnity may be sought, such person (the "indemnified party") shall promptly notify the Company and the Company, upon request of the indemnified party, shall retain counsel reasonably satisfactory to the indemnified party to represent the indemnified party and any others the Company may designate in such proceeding and shall pay, as they are incurred, the fees and expenses of such counsel related to such proceeding. In any such proceeding, any indemnified party shall have the right to retain its own counsel at its own expense, except that the Company shall pay as incurred the reasonable fees and expenses of counsel retained by the indemnified party in the event that (i) the Company and the indemnified party shall have mutually agreed to the retention of such counsel or, (ii) the named parties to any such proceeding (including any impleaded parties) include both the Company and the indemnified party and representation of both parties by the same counsel would be inappropriate, in the reasonable opinion of the indemnified party, due to actual or potential differing interests between them. The Company shall not be liable for any settlement of any action or proceeding effected without its written consent, but if settled with such consent or if there be a final judgment for the plaintiff, the Company agrees to indemnify the indemnified parties to the extent set forth in this Addendum A. In addition, the Company will not, without the prior written consent of Alex. Brown, which shall not be unreasonably withheld, settle or compromise or consent to the entry of any judgment in any pending or threatened claim, action, suit or proceeding in respect of which indemnification may be sought hereunder (whether or not Alex. Brown or any indemnified party is an actual or potential party to such claim, action, suit or proceeding) unless such settlement, compromise or consent includes an unconditional release of Alex. Brown and each other indemnified party hereunder from all liability arising out of such claim, action, suit or proceeding. Page 64 of 69 Pages In the event that a party is not entitled to indemnification hereunder because a court of competent jurisdiction has found the relevant Liability has arisen primarily from the gross negligence, willful misconduct or bad faith of Alex. Brown or such party, then Alex. Brown or such party shall reimburse to the Company all sums previously advanced hereunder. In the event a claim for indemnification under this Addendum A is determined to be unenforceable by a final judgment of a court of competent jurisdiction, then the Company shall contribute to the aggregate losses, claims, damages or liabilities to which Alex. Brown or its officers, directors, agents, employees or controlling persons may be subject in such amount as is appropriate to reflect the relative benefits received by each of the Company and the parties seeking contribution on the one hand, and the relative faults of the Company and the party seeking contribution on the other, as well as any other relevant equitable considerations. This indemnification shall apply to the original engagement as set forth in the Letter and any modification of the original engagement and the indemnification provided herein shall survive termination of our engagement and shall be binding upon any successors or assigns of the Company. Acknowledged and Agreed: MID-PENINSULA BANCORP By: /s/ David L. Kalkbrenner ------------------------------- Date: May 28, 1996 -------------------------------- JLS:cd Page 65 of 69 Pages [LETTERHEAD] May 28, 1996 ADDENDUM B This Addendum B reflects qualifications relating to Sections 3(d) and 4 of the engagement agreement between Alex. Brown & Sons Incorporated ("Alex. Brown") and Mid-Peninsula Bancorp ("Mid-Peninsula" or the "Company") dated May 28, 1996. This Addendum B is to confirm our understanding of the basis upon which Alex. Brown is being engaged to provide investment banking advice and services to Mid-Peninsula in connection with the proposed merger of equals (the "Transaction") by and between the Company and Cupertino National Bancorp ("Cupertino"). 1. Alex. Brown will be engaged, as your sole and exclusive financial advisor, to perform the following functions: (a) Analyze, with the Company's management and Board of Directors, the terms of any definitive acquisition agreement (the "Agreement") entered into by and between the Company and Cupertino. (b) Render our opinion (the "Opinion") as to the fairness, from a financial point of view to the Company's shareholders, of the Conversion Ratio (as defined in the Agreement) on the date of the execution of the Agreement, update such opinion as required at or near the time of distribution of proxy materials by the Company and bring-down such opinion as required at or near the time of closing of the Transaction. The nature and scope of the investigation which we would conduct in order to be able to render our opinion will be such as we would consider appropriate, and such opinion will be subject to customary assumptions and qualifications. Our opinion will be in written form. Such opinion shall be solely for the use of the Board of Directors in considering the Agreement and for inclusion in the Company's proxy materials relating to the proposed Transaction. We understand and expect that the Company will use such Opinion in connection with the proxy statement to be mailed to the Company's shareholders seeking approval for the Transaction. The Company may not Page 66 of 69 Pages Mid-Peninsula Bancorp May 22, 1996 Page 2 otherwise publish or refer to such opinion (either in its entirety or through excerpts or summaries) or disclose the existence of our engagement hereunder or describe or characterize the advice provided by us to the Company without the prior written approval of Alex. Brown, which approval shall not be unreasonably withheld, or except as aforesaid or as otherwise required by applicable law. 2. In consideration of our services as your financial advisor as described in Section 1 of this Addendum B, the Company agrees to compensate Alex. Brown as follows: (a) Upon delivery the Opinion, Alex. Brown will be paid a non-refundable fee of $200,000, against which will be credited the $25,000 retainer fee previously paid in accordance with Section 2 of the Engagement Agreement. Payment of this $175,000 shall be made in two installments: $75,000 upon the rendering of the Opinion to the Board of Directors of the Company and $100,000 upon inclusion of the Opinion in the Proxy Statement to shareholders of the Company. (b) In addition to the fee described above, the Company agrees to reimburse Alex. Brown for all reasonable out-of-pocket expenses, including fees and reimbursements of legal counsel, incurred by Alex. Brown in carrying out its duties under this Addendum B. Fees and reimbursements of legal counsel shall not exceed $2,000 without prior approval of the Company. 3. In consideration of our services as the Company's financial advisor under this Addendum B and under the Engagement Agreement, the Company agrees to indemnify and hold harmless Alex. Brown and each of its directors, officers, agents, employees and controlling persons (within the meaning of the Securities Act of 1933, as amended) to the extent and as provided in Addendum A attached to the Engagement Agreement and incorporated herein by reference. In addition, neither Alex. Brown nor any indemnified person shall have any liability to the Company related to or arising from the engagement described in this Addendum B, except for liability for losses, claims, damages or expenses incurred by the Company which are determined by a court of competent jurisdiction in a final judgment to have arisen primarily from Alex. Brown's gross negligence, willful misconduct or bad faith. The provisions of this Section 3 and Addendum A incorporated herein by reference shall survive the termination of Alex. Brown's engagement under this Addendum B and shall be binding upon any successors or assigns of the Company. Page 67 of 69 Pages Mid-Peninsula Bancorp May 22, 1996 Page 3 4. In the event of consummation of the Transaction, Alex. Brown shall have the right to disclose its participation in such Transaction, including, without limitation, the placement of "tombstone" advertisements in financial and other newspapers and journals, provided that Alex. Brown will submit a copy of any such advertisements to the Company for its approval, which approval shall not be unreasonably withheld or delayed. If the foregoing letter is in accordance with your understanding of the terms of our engagement, please sign and return to us the enclosed duplicate hereof. Very truly yours, ALEX. BROWN & SONS INCORPORATED By: /s/ Jean-Luc Servat ---------------------------------- Jean-Luc Servat Managing Director Accepted and Agreed: MID-PENINSULA BANCORP By: /s/ David L. Kalkbrenner ----------------------------------- David L. Kalkbrenner President & Chief Executive Officer Date: May 28, 1996 ---------------------------------- Page 68 of 69 Pages