<PAGE>

                                                                    Exhibit 10.4

                                ENDORSEMENT NO. 4

                         Attached to and made a part of
                            AGREEMENT OF REINSURANCE
                                    NO. 9034
                                     between
                         PHILADELPHIA INDEMNITY COMPANY
                         PHILADELPHIA INSURANCE COMPANY
               (herein collectively referred to as the "Company")
                                       and
                         GENERAL REINSURANCE CORPORATION
                     (herein referred to as the "Reinsurer")

IT IS MUTUALLY AGREED that, as respects new and renewal policies of the Company
becoming effective at and after 12:01 A.M., January 1, 2006, and policies of the
Company in force at 12:01 A.M., January 1, 2006, with respect to claims and
losses resulting from Occurrences taking place at and after the aforesaid time
and date, EXHIBIT A to this Agreement is amended as follows:

     I - SECTION 3 is amended to read:

"SECTION 3 - LIABILITY OF THE REINSURER

The Reinsurer shall pay to the Company, with respect to each Risk of the
Company, the amount of Net Loss sustained by the Company in excess of the
Company Retention but not exceeding the Limits of Liability of the Reinsurer as
set forth in the Schedule of Reinsurance.

                             SCHEDULE OF REINSURANCE

<TABLE>
<CAPTION>
                                        Limits of Liability of the Reinsurer
                                        ------------------------------------
                                                 FIRST         SECOND
Class of Business   Company Retention        EXCESS COVER   EXCESS COVER
-----------------   -----------------        ------------   ------------
<S>                 <C>                 <C>                 <C>
Property Business       $2,000,000            $3,000,000     $5,000,000
</TABLE>

The liability of the Reinsurer shall not exceed:

     (a)  $6,000,000 under the First Excess Cover nor $10,000,000 under the
          Second Excess Cover with respect to all Net Loss on all Risks involved
          in one Occurrence.

     (b)  $15,000,000 under the Second Excess Cover with respect to all Net Loss
          on all Risks involved in all Occurrences (including Extra Contractual
          Obligations) taking place during each Agreement Year. For purposes of
          this provision, upon a run off termination of this Exhibit the last

                         GENERAL REINSURANCE CORPORATION
                          A BERKSHIRE HATHAWAY COMPANY

<PAGE>

          completed Agreement Year shall be combined with the remaining period
          that reinsurance is afforded under this Exhibit to constitute a single
          Agreement Year.

All insurance written under one or more policies of the Company against the same
peril on the same Risk shall be combined, and the Company Retention and the
Limits of Liability of the Reinsurer shall be determined on the basis of the sum
of all insurance against the same peril and on the same Risk which is in force
at the time of a claim or loss."

     II - Sub-paragraphs (a) and (b) in SECTION 4 - DEFINITIONS are amended to
          read:

     "(a) COMPANY RETENTION

          This term shall mean the amount the Company and its underlying
          facultative reinsurers shall retain for its own account; however, this
          requirement shall be satisfied if this amount is retained by the
          Company or its affiliated companies under common management or common
          ownership."

     "(b) NET LOSS

          This term shall mean all payments by the Company within the terms and
          limits of its policies in settlement of claims or losses, after
          deduction of salvage and other recoveries and after deduction of
          amounts due from all other reinsurance, except underlying facultative
          reinsurance and catastrophe reinsurance, whether collectible or not.
          This term shall include Adjustment Expense. If the Company becomes
          insolvent, this definition shall be modified to the extent set forth
          in the article entitled INSOLVENCY OF THE COMPANY.

          Notwithstanding the provisions of the article entitled MANAGEMENT OF
          CLAIMS AND LOSSES, this term shall also include 95% of Extra
          Contractual Obligations, provided that the Reinsurer is given written
          notice of circumstances which may result in an Extra Contractual
          Obligation within 36 months of the later of the termination date of
          this Exhibit or the termination of reinsurance on the policy under
          which the Extra Contractual Obligation arose.

          Nothing in this definition shall imply that losses are not recoverable
          hereunder until the Company's Net Loss has been finally ascertained."

     III - The first two lines of definition (e) RISK in SECTION 4 - DEFINITIONS
          are replaced by the following:

          "The Company shall establish what constitutes one Risk and shall make
          such determination based on the peril of fire at the time of
          acceptance, provided:"


                                       -2-
                         GENERAL REINSURANCE CORPORATION

<PAGE>

     IV - Exclusion (v) in SECTION 5 - EXCLUSIONS is amended to read:

     "(v) Losses arising, directly or indirectly, out of loss of, alteration of,
          or damage to or a reduction in the functionality, availability or
          operation of a computer system, hardware, program, software, data,
          information repository, microchip, integrated circuit or similar
          device in computer equipment or non-computer equipment, whether the
          property of the policyholder of the Company or not, unless such loss
          arises out of physical damage occurring at the insured's premises as a
          result of the following perils to the extent that these perils are
          covered under this Exhibit: fire, lightning, explosion, windstorm or
          hail, smoke, aircraft or vehicles, riot or civil commotion, sprinkler
          leakage, sinkhole collapse, volcanic action, falling objects, weight
          of snow, ice or sleet, water damage, flood and/or earth movement.
          Nothing in this exclusion shall be construed to extend coverage under
          this Exhibit to any liability which would not have been covered in the
          absence of this exclusion;"

     V - SECTION 7 is amended to read:

"SECTION 7 - REINSURANCE PREMIUM

The Company shall pay to the Reinsurer:

     (a)  For the First Excess Cover, 2.18% of the Company's Subject Earned
          Premium;

     (b)  For the Second Excess Cover, 1.01% of the Company's Subject Earned
          Premium."

     VI - SECTION 6 is amended to read:

"SECTION 6 - OTHER REINSURANCE

The obligations of the Company to reinsure business falling within the scope of
this Exhibit and of the Reinsurer to accept such reinsurance are mandatory and
no other reinsurance (either facultative or treaty) is permitted, except as
provided for below.

When the amount of insurance written by the Company on an individual Risk
exceeds $15,000,000, the Company may purchase facultative excess of loss or
share reinsurance for the excess amount on such Risk. The Company may also
purchase facultative excess of loss reinsurance or facultative share reinsurance
within the liability of the Reinsurer, if, in the underwriting judgment of the
Company, the Reinsurer will be benefited thereby.

The Company may also purchase facultative excess of loss reinsurance within the
Company Retention. In no event, however, shall the amount required with respect
to the net Company Retention after such reinsurance be reduced to less than
$500,000.

Recoveries from catastrophe reinsurance shall be deemed not to reduce the amount
required with respect to the Company Retention."


                                       -3-
                         GENERAL REINSURANCE CORPORATION

<PAGE>

IT IS FURTHER AGREED that, as respects Terrorism Occurrences taking place at and
after 12:01 A.M., January 1, 2006, EXHIBIT B to this Agreement is hereby renewed
subject to all its terms, conditions and limitations, except as modified below,
for a period of one year. Accordingly:

     I  -  The first paragraph of SECTION 2 - TERM is amended to read:

"This Exhibit shall apply to new and renewal policies of the Company becoming
effective at and after 12:01 A.M., January 1, 2006, and to policies of the
Company in force at 12:01 A.M., January 1, 2006, with respect to claims and
losses resulting from Terrorism Occurrences taking place at and after the
aforesaid time and date, and prior to 12:01 A.M., January 1, 2007."

     II - The penultimate paragraph of SECTION 3 - LIABILITY OF THE REINSURER is
          replaced in its entirety by the following:

"The liability of the Reinsurer shall not exceed $8,000,000 with respect to all
Net Loss and Adjustment Expenses combined arising out of all loss or damage
directly or indirectly arising out of, caused by, or resulting from all
Terrorism Occurrences taking place during each Agreement Year, regardless of any
other cause or event contributing to such loss or damage in any way or at any
time, or whether such loss or damage is accidental or intentional."

     III - The first two lines of definition (e) RISK in SECTION 4 - DEFINITIONS
          are replaced by the following:

          "The Company shall establish what constitutes one Risk and shall make
          such determination based on the peril of fire at the time of
          acceptance, provided:"

     IV - SECTION 6 is amended to read:

"SECTION 6 - REINSURANCE PREMIUM

The Company shall pay to the Reinsurer a flat reinsurance premium of $640,000
for the term of this Exhibit."

IN WITNESS WHEREOF, the parties hereto have caused this Endorsement to be
executed


                                       -4-
                         GENERAL REINSURANCE CORPORATION

<PAGE>

in duplicate,

this 9th day of August, 2006,

                                        PHILADELPHIA INDEMNITY COMPANY
                                        PHILADELPHIA INSURANCE COMPANY

                                        /s/ Christopher J. Maguire
                                        ----------------------------------------
                                        Christopher J. Maguire,
                                        Executive Vice President and Chief
                                        Underwriting Officer


Attest: /s/ William A. McKenna
        ------------------------------
        William A. McKenna
        Assistant Vice President
        Reinsurance

and this 28th day of June, 2006.

                                        GENERAL REINSURANCE CORPORATION


                                        /s/ Joan LaFrance
                                        ----------------------------------------
                                        Joan LaFrance,
                                        Vice President


Attest: /s/ Diane B. Hyland
        -----------------------------
        Diane B. Hyland,
        Assistant Vice President



                                       -5-
                                Endorsement No. 4
                               Agreement No. 9034
                         GENERAL REINSURANCE CORPORATION