Exhibit 10.58.1 AMENDMENT NO. 1, dated as of May 27, 1999 (this "AMENDMENT"), to the Security Deposit Agreement, dated as of March 18, 1999 (the "AGREEMENT"), among (i) EDISON MISSION HOLDINGS CO., a California corporation (the "BORROWER"), (ii) EDISON MISSION FINANCE CO., a California corporation ("EDISON MISSION FINANCE"), (iii) HOMER CITY PROPERTY HOLDINGS, INC., a California corporation ("HOMER CITY HOLDINGS"), (iv) CHESTNUT RIDGE ENERGY COMPANY, a California corporation ("CHESTNUT RIDGE"), (v) MISSION ENERGY WESTSIDE, INC., a California corporation ("MEW"), (vi) EME HOMER CITY GENERATION L.P., a Pennsylvania limited partnership ("EME HOMER CITY"; and, together with the Borrower, Edison Mission Finance, Homer City Holdings, Chestnut Ridge and MEW, the "LOAN PARTIES"), and (vii) UNITED STATES TRUST COMPANY OF NEW YORK, as collateral agent for certain senior secured creditors of the Borrower (in such capacity, the "COLLATERAL AGENT"). RECITALS A. The Borrower has entered into a Credit Agreement, dated as of March 18, 1999 (as the same may be amended, supplemented or otherwise modified from time to time, the "CREDIT AGREEMENT"; the loans made thereunder, the "LOANS"), with certain financial institutions (collectively, the "LENDERS") and Citocorp USA, Inc., as administrative agent for the Lenders (in such capacity, the "ADMINISTRATIVE AGENT"). B. Pursuant to the Agreement, certain accounts of the Loan Parties were established with the Collateral Agent, together with instructions for deposits into, and payments from, each such account and each Loan Party pledged and assigned to the Collateral Agent certain security interests related to such accounts for the benefit of the senior secured creditors to the Borrower. C. The Borrower wishes to issue $300 million in aggregate principal amount of Senior Secured Bonds due 2019 and $530 million in aggregate principal amount of Senior Secured Bonds due 2026 (collectively, the "BONDS"; the trustee to the holders thereof, the "TRUSTEE"), the proceeds of which will be used to refinance a portion of the Loans and to repay a portion of the Borrower's direct parent's equity investment in the Borrower. D. The Loan Parties have requested, and, upon this Amendment becoming effective, the Collateral Agent has agreed, that certain provisions of the Agreement be amended in the manner provided for in this Amendment. 2 NOW, THEREFORE, the parties hereto hereby agree as follows: 1. AMENDMENT TO DEFINITION OF "NET CASH PROCEEDS." The definition of "Net Cash Proceeds" is hereby amended by deleting the current definition in its entirety and substituting in lieu thereof the following: "NET CASH PROCEEDS" means (a) in connection with any Recovery Event, the proceeds thereof in the form of cash and cash equivalents of such Recovery Event, net of any expenses reasonably incurred in respect of such Recovery Event, including attorneys' fees, amounts required to be applied to the repayment of Indebtedness secured by a Lien expressly permitted under the Credit Agreement and the other Financing Documents on any asset which is the subject of such Recovery Event (other than any Lien pursuant to a Security Document) and net of taxes paid or reasonably estimated to be payable as a result thereof (after taking into account any available tax credits or deductions and any tax sharing arrangements), to the extent that, in the case of Recovery Events relating to property or casualty insurance claims, the amount of such proceeds exceeds $5,000,000 with respect to any asset of any Loan Party and (b) in connection with any issuance or sale of debt securities or other incurrence of Indebtedness, the cash proceeds received from such issuance, sale or incurrence, net of attorneys' fees, investment banking fees, accountants' fees, underwriting discounts, commissions, administrative agency fees, upfront fees, arrangement fees and other customary fees and expenses actually incurred in connection therewith. 2. AMENDMENT TO DEFINITION OF "SECURED PARTIES." The definition of "Secured Parties" is hereby amended by deleting the current definition in its entirety and substituting in lieu thereof the following: "SECURED PARTIES" means the Collateral Agent, the Administrative Agent, the Lenders, the Trustee, each Person that provides any Refinancing Indebtedness, Ordinary Course Letter of Credit Indebtedness, DSR Letter of Credit Indebtedness, Additional Indebtedness or Swap Indebtedness and each Person that serves as indenture trustee, collateral agent, lenders' representative or in any similar capacity for Person that provide any Senior Debt. 3. AMENDMENT TO SECTION 3.4. Section 3.4 of the Agreement is hereby amended by deleting the current section in its entirety and substituting in lieu thereof the following: SECTION 3.4 PRINCIPAL ACCOUNTS. (a) The Loan Parties agree that, until the 364-Day Term Loans have been repaid in full, all Net Cash Proceeds of any Refinancing Indebtedness shall be deposited into the Loan Principal Account. IF, notwithstanding the foregoing, any Loan Party shall receive any such proceeds, it shall immediately deliver such proceeds in the exact form received (duly indorsed, if appropriate, in a manner satisfactory to the Collateral Agent) to the Collateral Agent for 3 deposit into the Loan Principal Account. The Collateral Agent shall have the right to receive all such Net Cash Proceeds directly from the Persons owing the same. All such Net Cash Proceeds received by the Collateral Agent shall be deposited into the Loan Principal Account. (b) The Loan Parties agree that all Net Cash Proceeds of any Additional Indebtedness that is incurred for the purpose of (i) prepaying any Loans, Refinancing Indebtedness, Ordinary Course Letter of Credit Indebtedness, DSR Letter of Credit Indebtedness or Additional Indebtedness or (ii) repaying any Loans, Refinancing Indebtedness or Additional Indebtedness at its scheduled maturity, shall be deposited into the Principal Account related to the Indebtedness that is being prepaid or repaid. If, notwithstanding the foregoing, any Loan Party shall receive any such proceeds, it shall immediately deliver such proceeds in the exact form received (duly indorsed, if appropriate, in a manner satisfactory to the Collateral Agent) to the Collateral Agent for deposit into such related Principal Account. The Collateral Agent shall have the right to receive all such Net Cash Proceeds directly from the Persons owing the same. All such Net Cash Proceeds received by the Collateral Agent shall be deposited into such related Principal Account. (c) The Loan Parties agree that all Net Cash Proceeds of any Additional Indebtedness other than the type described in paragraph (b) above shall be deposited into the Revenue Account. 4. AMENDMENT TO SECTION 4.1(a). Section 4.1(a) of the Agreement is hereby amended by deleting the current clauses beginning with the words "third" and "fourth" in their entirety and substituting in lieu thereof the following: THIRD, (i) into each Accrued Interest Account, the Accrued Interest Amount calculated for such Accrued Interest Account, together with the amount of all deficiencies, if any, with respect to deposits of Accrued Interest Amounts required in all prior months, as certified in such Request Letter, (ii) into each Principal Account (other than (A) the Loan Principal Account and any other Principal Account established in respect of non-amortizing Senior Debt, (B) any DSR Letter of Credit Indebtedness Principal Account relating to non-amortizing DSR Letter of Credit Indebtedness (or, so long as any Loans or related Commitments remain outstanding, any DSR Letter of Credit Indebtedness Principal Account relating to any DSR Letter of Credit Indebtedness), (C) any Ordinary Course Letter of Credit Indebtedness Principal Accounts established for non-amortizing Ordinary Course Letter of Credit Indebtedness and (D) any Swap Indebtedness Termination Payment Account), an amount equal to 1/6th of the principal amount, if any, which is payable on or within six months following such Monthly Transfer Date on account of the Senior Debt with respect to which such Principal Account was established, together with the amount of all deficiencies, if any, with respect to deposits of principal required in all prior months, as certified in such Request Letter, 4 (iii) into each Ordinary Course Letter of Credit Indebtedness Principal Account, the amount certified in such Request Letter to be sufficient to repay in full the related non-amortizing Ordinary Course Letter of Credit Indebtedness then outstanding, (iv) into each Swap Indebtedness Termination Payment Account, the amount certified in such Request Letter to be sufficient to repay in full the related termination payment then due and payable and (v) to the Administrative Agent, the amount specified in the Request Letter to be applied to the repayment of Revolving Loans; FOURTH, into each DSR Letter of Credit Indebtedness Principal Account relating to non-amortizing DSR Letter of Credit Indebtedness (or, so long as any Loans or related Commitments remain outstanding, each DSR Letter of Credit Indebtedness Principal Account relating to any DSR Letter of Credit Indebtedness), the amount certified in such Request Letter to be sufficient to repay in full the related DSR Letter of Credit Indebtedness then outstanding. 5. GRANT, AND CONFIRMATION OF GRANT, OF SECURITY INTEREST. Each of the Loan Parties hereby grants and confirms the grant of the security interest in: (i) the Revenues and each of the Accounts (except as provided in clauses (b), (c), (d), (e), (f) and (g) of Section 2.4 of the Agreement) and all cash, cash equivalents, instruments, investments and other securities on deposit therein and all Proceeds of the foregoing in favor of the Collateral Agent for the benefit of the Secured Parties (as defined in Amendment No. 1 to the Guarantee and Collateral Agreement); and (ii) the Refinancing Indebtedness Accrued Interest Account, the Refinancing Indebtedness Principal Account and the Refinancing Indebtedness Debt Service Reserve Account related to each class of Refinancing Indebtedness, and all cash, cash equivalents, instruments, investments and other securities on deposit therein and all Proceeds of the foregoing in favor of the Collateral Agent for the exclusive benefit of the Persons that provide such class of Refinancing Indebtedness; in each case, to secure the Obligations. 6. SECURITIES INTERMEDIARY. The Securities Intermediary hereby agrees that, upon its execution of this Amendment, it shall be bound by all of the provisions of the Agreement as amended by this Amendment. 7. COUNTERPARTS. This Amendment may be executed by the parties hereto in any number of separate counterparts, and all of said counterparts taken together shall be deemed to constitute one and the same instrument. Delivery of an executed counterpart of a signature page to this letter by facsimile shall be effective as delivery of a manually executed counterpart of this Amendment. 8. LIMITED EFFECT. Except as expressly provided herein, all of the terms and provisions of the Agreement are and shall remain in full force and effect. 9. SEVERABILITY. Any provision of this Amendment which is prohibited or unenforceable in any jurisdiction shall, as to such jurisdiction, be ineffective to the extent of such 5 prohibition or unenforceability without invalidating the remaining provisions hereof, and any such prohibition or unenforceability in any jurisdiction shall not invalidate or render unenforceable such provision in any other jurisdiction. 10. CONDITIONS TO EFFECTIVENESS. The amendment provided for herein shall become effective on the date the Collateral Agent shall have received counterparts of this Amendment duly executed and delivered by each Loan Party and consented to by the Administrative Agent and the Trustee. 11. APPLICABLE LAW. THIS AMENDMENT AND THE RIGHTS AND OBLIGATIONS OF THE PARTIES HERETO SHALL BE GOVERNED BY, AND CONSTRUED AND INTERPRETED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF NEW YORK. IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly executed and delivered by their respective proper and duly authorized officers as of the day and year first above written. EDISON MISSION HOLDINGS CO. By: /s/ Steven D. Eisenberg -------------------------- Name: Steven D. Eisenberg Title: Vice President EDISON MISSION FINANCE CO. By: /s/ Steven D. Eisenberg -------------------------- Name: Steven D. Eisenberg Title: Vice President HOMER CITY PROPERTY HOLDINGS, INC. By: /s/ Steven D. Eisenberg -------------------------- Name: Steven D. Eisenberg Title: Vice President CHESTNUT RIDGE ENERGY COMPANY By: /s/ Steven D. Eisenberg -------------------------- Name: Steven D. Eisenberg Title: Vice President MISSION ENERGY WESTSIDE, INC. By: /s/ Steven D. Eisenberg -------------------------- Name: Steven D. Eisenberg Title: Vice President EME HOMER CITY GENERATION L.P. By: Mission Energy Westside, Inc., its General Partner By: /s/ Steven D. Eisenberg -------------------------- Name: Steven D. Eisenberg Title: Vice President UNITED STATES TRUST COMPANY OF NEW YORK, as Collateral Agent By: /s/ Christopher J. Grell -------------------------- Name: Christopher J. Grell Title: Assistant Vice President UNITED STATES TRUST COMPANY OF NEW YORK, as Securities Intermediary By: /s/ Christopher J. Grell -------------------------- Name: Christopher J. Grell Title: Assistant Vice President Acknowledged and Consented to by: CITICORP USA, INC., as Administrative Agent By: /s/ Anita J. Brickell ---------------------------- Name: Anita J. Brickell Title: Attorney-in-Fact UNITED STATES TRUST COMPANY OF NEW YORK, as Trustee By: /s/ Christopher J. Grell ---------------------------- Name: Christopher J. Grell Title: Assistant Vice President