Exhibit 10.3 SIXTH AMENDMENT TO RECEIVABLES PURCHASE AGREEMENT THIS SIXTH AMENDMENT TO RECEIVABLES PURCHASE AGREEMENT, dated as of December 28, 2004 (this "Amendment"), is entered into among ATRIUM FUNDING CORPORATION, a Delaware corporation, as seller (the "Seller"), ATRIUM COMPANIES, INC., a Delaware corporation, as initial servicer (in such capacity, together with its successors and permitted assigns in such capacity, the "Servicer"), FAIRWAY FINANCE COMPANY, LLC (as successor to Fairway Finance Corporation), a Delaware limited liability company (the "Purchaser"), and HARRIS NESBITT CORP. (f/k/a BMO Nesbitt Burns Corp.), a Delaware corporation as agent for the Purchaser (in such capacity, together with its successors and assigns in such capacity, the "Agent"). BACKGROUND 1. The Seller, the Servicer, the Purchaser and the Agent are parties to that certain Receivables Purchase Agreement, dated as of July 31, 2001 (as amended through the date hereof, the "Agreement"). 2. The parties hereto desire to amend the Agreement as set forth herein. NOW, THEREFORE, in consideration of the foregoing and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto hereby agree as follows: SECTION 1. Definitions. Capitalized terms used in this Amendment and not otherwise defined herein shall have the meanings assigned thereto in the Agreement. SECTION 2. Amendment. The Agreement is hereby amended as follows: 2.1. The definition of "Adjusted Net Income" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Adjusted Net Income" means, for the purposes of the Financial Covenants listed in clause (s) of Exhibit IV only, for any period, the consolidated net income (loss) for such period, of Atrium and its consolidated Subsidiaries calculated on a consolidated basis in accordance with GAAP, adjusted by excluding (to the extent taken into account in the calculation of such consolidated net income (loss)) the effect of (a) gains or losses for such period from Dispositions not in the ordinary course of business and Excluded Dispositions not in the ordinary course of business, and the tax consequences thereof, (b) any non-recurring or extraordinary items of income or expense for such period and the tax consequences thereof (including expenses related to the Transactions or any Permitted Acquisition); provided that an item will not be considered "non-recurring" if it is in the ordinary course of continuing operations, (c) the portion of net income (loss) of any Person (other than a Subsidiary) in which Atrium or any Subsidiary has an ownership interest, except to the extent of the amount of cash dividends or other cash distributions actually paid to Atrium or (subject to clause (d) below) any Subsidiary during such period to the extent not in excess of Atrium's or such Subsidiary's proportionate interest in such Person's consolidated net income for such period, (d) the net income of any Subsidiary to the extent that the declaration or payment of dividends or similar distribution by such Subsidiary was not for the relevant period permitted (without giving effect to any non-permanent waiver), directly or indirectly, by operation of the terms of its charter or any agreement, instrument, judgment, decree, order, statute, rule or governmental regulation applicable to such Subsidiary or its stockholders, (e) any unrealized gains or losses relating to hedging transactions and mark-to-market in foreign currencies or Swap Contracts, (f) any non-cash impairment charges resulting from intangible assets, and (g) any net after-tax income or loss from discontinued operations and any net after-tax gains or losses on disposal of discontinued operations. 2.2. The definition of "Capital Expenditures" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Capital Expenditures" shall mean, for the purposes of the financial covenants listed in clause (s) of Exhibit IV to the Agreement only, for any period, any direct or indirect expenditures of Atrium and the Subsidiaries which should be capitalized on the consolidated balance sheet of Atrium and the Subsidiaries in accordance with GAAP in respect of the purchase or other acquisition of fixed or capital assets (including, without limitation, securities), excluding (i) normal replacement and maintenance programs properly charged to current operations, (ii) any expenditure made with the Net Available Proceeds of any Disposition to the extent such Net Available Proceeds are not required to be applied to the prepayment of the Loans in accordance with Section 2.10(a)(iv) of the Credit Agreement, (iii) any expenditure made with the proceeds of any Excluded Disposition, (iv) expenditures in an amount not to exceed the sum of (x) the Net Available Proceeds of any Casualty Event to the extent such Net Available Proceeds are not required to be applied to the prepayment of the Loans in accordance with Section 2.10(a)(i) of the Credit Agreement and (y) the amount of any applicable insurance deductibles with respect to such Casualty Event to the extent such amount is applied as set forth in clause (x) of Section 2.10(a)(i) of the Credit Agreement within the period specified therein, (v) expenditures to effect Permitted Acquisitions, (vi) the purchase price of equipment to the extent that the consideration therefor consists of used or surplus equipment being traded in at such time or the proceeds of a concurrent sale of such used or surplus equipment, in each case in the ordinary course of business, (vii) any deposits required to be made in connection with the purchase or other acquisition of fixed or capital assets; provided, however, that such a deposit shall no longer be excluded from Capital Expenditures if used to purchase or acquire fixed or capital assets, (viii) option exercise costs to acquire Property and the costs of improvements to such Property so long as such Property is sold within the same fiscal year, (ix) any 2 capitalized interest and (x) capital expenditures resulting from operating lease conversions pursuant to Section 9.08(k)(ii) of the Credit Agreement. 2.3. The definition of "Casualty Event" set forth in Exhibit I to the Agreement is hereby amended by replacing the words "Original Closing Date" therein with the date "December 28, 2004". 2.4. The definition of "Consolidated EBITDA" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Consolidated EBITDA" shall mean, for any Measurement Period, the remainder of (A) the sum (without duplication) of the amounts for such period of (i) Adjusted Net Income, (ii) income tax expense to the extent deducted in determining Adjusted Net Income for such period, (iii) the sum of (a) all interest expense to the extent deducted in determining Adjusted Net Income for such period, plus (b) an amount equal to the interest (or other fees in the nature of interest or discount accrued and paid or payable in cash) for such period on any Permitted Receivables Transaction, plus (c) other than for purposes of the definition of Excess Cash Flow, Permitted Securitization Fees paid or payable in cash for such period to the extent deducted in determining Adjusted Net Income for such period (without duplication of any such amounts added back pursuant to any other clause of this definition), (iv) depreciation expenses and amortization expense to the extent deducted in determining Adjusted Net Income for such period, (v) the non-cash component of any item of expense to the extent deducted in determining Adjusted Net Income for such period, other than to the extent requiring an accrual or reserve for future cash expenses in accordance with GAAP, (vi) the amortization or expensing resulting from the application of purchase accounting to the extent deducted in determining Adjusted Net Income, (vii) other than for purposes of calculating Excess Cash Flow, to the extent deducted in determining Adjusted Net Income, the cash portion of stock compensation expense related to the departure from Parent or any of its Subsidiaries of any Person owning any Equity Interests of Parent up to a maximum of $15.0 million, (viii) expenses resulting from changes in accounting methods, (ix) the non-cash portion of stock compensation expense to the extent not requiring any cash expenses in the relevant Measurement Period and (x) non-capitalized acquisition or transaction expenses, all as determined on a consolidated basis for Atrium and its Consolidated Subsidiaries in accordance with GAAP, minus (B) the sum of (1) cash dividends and other distributions paid by Atrium pursuant to Sections 9.10(b)(i) and (2) of the Credit Agreement solely for purposes of calculating Consolidated EBITDA for purposes of the Interest Coverage Ratio and the Fixed Charge Coverage Ratio, interest income from Permitted Investments (as such term is defined in the Credit Agreement). Other than for purposes of calculating Excess Cash Flow, Consolidated EBITDA shall be calculated on a pro forma basis to give effect to the Transactions, any Acquisition permitted by the Credit Agreement and Dispositions (other than any Dispositions in the ordinary course of business) 3 consummated during the relevant Measurement Period as if each such Acquisition had been effected on the first day of such period and as if each such Disposition had been consummated on the day prior to the first day of such period. 2.5. The definition of "Consolidated Interest Expense" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Consolidated Interest Expense" means, for the purposes of the Financial Covenants listed in clause (s) of Exhibit IV only, for any Measurement Period, the sum of (A) all cash interest expense (including commitment fees, letter of credit fees, the interest component of Capital Leases and cash interest paid on the Holdings Notes) of Holdings and its Consolidated Subsidiaries for such Measurement Period including the net amounts paid or received under all Interest Rate Protection Agreements less interest income from Permitted Investments (as such term is defined in the Credit Agreement), plus (B) in the event of the consummation of a Permitted Receivables Transaction, an amount equal to the interest (or other fees in the nature of interest or discount accrued and paid or payable in cash) for such period on any Permitted Receivables Transaction, plus (C) an amount equal to dividend payments made pursuant to Section 9.10(c) of the Credit Agreement minus any interest expense incurred by Atrium on the Existing Notes; provided that for purposes of Section 9.11 of the Credit Agreement only Atrium will be permitted to exclude from Consolidated Interest Expense any interest expense incurred by Atrium on the Existing Notes between December 28, 2004 and the date such notes are redeemed by Atrium pursuant to the Tender Offer or the Existing Notes Redemption so long as such Existing Notes have been called for redemption pursuant to the Existing Notes Redemption Notice. Consolidated Interest Expense shall be calculated on a pro forma basis (as determined by the Credit Agreement) to give effect to any Debt incurred, assumed or permanently repaid or extinguished during the relevant Measurement Period in connection with any Acquisitions permitted thereby and Dispositions (other than any Dispositions in the ordinary course of business) as if such incurrence, assumption, repayment or extinguishing had been effected on the first day of such period. 2.6. The definition of "Credit Agreement" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Credit Agreement" means the Credit Agreement among Atrium, Merrill Lynch Capital, as administrative agent and collateral agent, the lenders from time to time party thereto, the guarantors party thereto and UBS Securities LLC, as the sole lead arranger, sole book runner, syndication agent and Antares Capital Corporation, Citicorp North America, Inc. and General Electric Capital Corporation, as co-documentation agents, dated as of December 28, 2004 (without regard, or giving effect, to any amendments, supplements, amendments and restatements, replacements or other modification thereof or thereto that may take place on or after such date). 4 2.7. Clause (2)(b) of the definition of "Debt" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: (b) all non-contingent (but only so long as non-contingent) obligations issued, undertaken or assumed by such Person as the deferred purchase price of Property or services (other than earn-out payments made in connection with acquisitions and not more than 60 days past due and trade payables and accrued expenses paid on customary terms and not more than 60 days past due and incurred in the ordinary course of business on ordinary terms), excluding payments made in connection with non-compete arrangements; 2.8. The definition of "Disqualified Capital Stock" set forth in Exhibit I to the Agreement is hereby amended by replacing the date "December 10, 2008" where it appears in the last line thereof, with the date "December 28, 2009" therein. 2.9. The definition of "Excess Cash Flow" set forth in Exhibit I to the Agreement is hereby amended by (i) replacing the word "and" which appears immediately before clause (B)(ix) thereof with a comma and (ii) adding the following at the end of such definition: "and (x) for periods ending prior to 2008, $10.0 million". 2.10. The definition of "Holdings" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Holdings" shall mean ACIH, Inc., a Delaware corporation. 2.11. The definition of "Issuing Lender" set forth in Exhibit I to the Agreement is hereby amended by replacing the words "Fleet National Bank" with the words "Merrill Lynch Capital" therein. 2.12. The definition of "Loans" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Loans" means the Revolving Credit Loans and the Term Loans (including Replacement Term Loans (as defined in Section 13.04 (iv) of the Credit Agreement)). 2.13. The definition of "Net Available Proceeds" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Net Available Proceeds" means: (i) in the case of any Disposition Event, the amount of Net Cash Payments received by any Company in connection with such Disposition Event; (ii) in the case of any Casualty Event, the aggregate amount of proceeds of insurance, condemnation awards and other compensation received by Atrium or any Obligor in respect of such Casualty Event net of (A) fees and expenses incurred by such Company in connection with recovery thereof, 5 (B) repayments of Debt (other than Debt under the Credit Agreement) to the extent secured by a Lien on such Property that is permitted hereunder, and (C) any taxes (including income, transfer, stamp, duty, customs, withholding and any other taxes) paid or payable by any Company in respect of the amount so recovered (after application of all credits and other offsets); and (iii) in the case of any Equity Issuance or any Debt Issuance, the aggregate amount of all cash received by the Person effecting such transaction in respect thereof net of all investment banking fees, discounts and commissions, legal fees, consulting fees, accountants' fees, underwriting discounts and commissions and other customary fees and expenses payable to any Person other than an Affiliate of any Company, actually incurred and satisfactorily documented in connection therewith. 2.14. The definition of "Permitted Acquisition" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Permitted Acquisition" means any Acquisition effected in compliance with Section 9.06(i) or (m) of the Credit Agreement. 2.15. The definition of "Permitted Holders" set forth in clause (c) of the last paragraph of the definition of "Change in Control" set forth in Exhibit I to the Agreement is hereby amended by deleting "ML IBK Positions, Inc." therein and substituting "ML Global Private Equity Fund, L.P." therefor. 2.16. The definition of "Swap Contract" set forth in Exhibit I to the Agreement is hereby amended by adding the following phrase at the end thereof: "but excluding all forward commitments for the purchase of materials and utilities used in the ordinary course of business of Atrium and its Subsidiaries and not for speculative purposes". 2.17. The definition of "Swing Loan Lender" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Swing Loan Lender" means Merrill Lynch Capital and its successors and assigns in such capacity. 2.18. The definition of "Test Date" set forth in Exhibit I to the Agreement is hereby amended by replacing the words "Section 9.01(a)" with the words "Section 9.01(a)(ii)" therein. 2.19. The definition of "Total Debt" set forth in Exhibit I to the Agreement is hereby amended and restated in its entirety as follows: "Total Debt" shall mean, at any date, and without duplication, the aggregate amount of Debt of Atrium and its Consolidated Subsidiaries of the types described in clauses (a), (b), (c), (d), (e), (f), (h) (but only to the extent any such letter of credit has been drawn and not reimbursed) and (j) of the definition of "Debt" and all Guaranty Obligations of Atrium and its Consolidated Subsidiaries in respect thereof as of such date and determined on a consolidated 6 basis in accordance with GAAP; provided that for purposes of Section 9.11 of the Credit Agreement only, Atrium will be permitted to exclude from Total Debt any Debt under any Existing Notes that have been called pursuant to the Existing Notes Redemption Notice. 2.20. Exhibit I to the Agreement is hereby amended by adding thereto the following new definitions in appropriate alphabetical order: "Existing Notes" shall have the meaning set forth in the Credit Agreement. "Existing Notes Redemption" shall have the meaning set forth in the Credit Agreement. "Existing Notes Redemption Notice" shall have the meaning set forth in the Credit Agreement. "GAAP" shall mean generally accepted accounting principles in effect in the United States of America and set forth as of the relevant date in the opinions and pronouncements of the Accounting Principles Board of the American Institute of Certified Public Accountants and statements and pronouncements of the Financial Accounting Standards Board (or agencies with similar functions of comparable stature and authority within the United States accounting profession), which are applicable to the circumstances as of the date of determination. "Holdings Notes" shall have the meaning set forth in the Credit Agreement. "Merger" shall have the meaning set forth in the Credit Agreement. "Merrill Lynch Capital" means Merrill Lynch Capital, a division of Merrill Lynch Business Financial Services, Inc. "Parent" means Atrium Corporation, a Delaware corporation, and all of its successors and assigns. "Tender Offer" shall have the meaning set forth in the Credit Agreement. 2.21. Paragraph (s) of Exhibit IV to the Agreement is hereby amended and restated in its entirety as follows: (s) Financial Covenants. (i) Maximum Total Leverage Ratio. With regard to Atrium (on a consolidated basis) the Total Leverage Ratio shall not, as of any Test Date during any period set forth in the table below, exceed the ratio set forth opposite such period in the table below: 7 Period Ratio ------ ----- December 28, 2004 through December 31, 2005 4.25x January 1, 2006 through December 31, 2006 4.00x January 1, 2007 through December 31, 2007 3.75x January 1, 2008 through December 31, 2008 3.50x January 1, 2009 through December 31, 2009 3.25x January 1, 2010 through December 31, 2010 3.00x January 1, 2011 and thereafter 2.75x (ii) Minimum Interest Coverage Ratio. With regard to Holdings (on a consolidated basis), the Interest Coverage Ratio shall not, as of any Test Date during any period set forth in the table below, be less than the ratio set forth opposite such period in the table below: Period Ratio ------ ----- December 28, 2004 through December 31, 2005 2.50x January 1, 2006 through December 31, 2006 2.50x January 1, 2007 through December 31, 2007 2.50x January 1, 2008 through December 31, 2008 2.50x January 1, 2009 through December 31, 2009 2.75x January 1, 2010 through December 31, 2010 3.00x January 1, 2011 and thereafter 3.00x (iii) Minimum Fixed Charge Coverage Ratio. With regard to Holdings (on a consolidated basis), the Fixed Charge Coverage Ratio shall not, as of any Test Date during any period set forth in the table below, be less than the ratio set forth opposite such period in the table below: Period Ratio ------ ----- December 28, 2004 through December 31, 2005 1.50x January 1, 2006 through December 31, 2006 1.50x January 1, 2007 through December 31, 2007 1.50x January 1, 2008 through December 31, 2008 1.50x January 1, 2009 through December 31, 2009 1.50x January 1, 2010 through December 31, 2010 1.50x January 1, 2011 and thereafter 1.50x (iv) Capital Expenditures. The Servicer shall not permit the aggregate amount of Capital Expenditures made by it and its subsidiaries to exceed (a) $27.0 million in the aggregate for the fiscal year ended December 31, 2005, (b) $28.0 million in the aggregate for the fiscal year ended December 31, 2006, (c) $29.0 million for the fiscal year ended December 31, 2007, (d) $30.0 million for the fiscal year ended 8 December 31, 2008, (e) $31.0 million for the fiscal year ended December 31, 2009, (f) $32.0 million for the fiscal year ended December 31, 2010 and (g) $33.0 million for the fiscal year ended December 31, 2011; provided, however, that (x) if the aggregate amount of Capital Expenditures for any fiscal year shall be less than the amount permitted for such fiscal year (before giving effect to any carryover), then 75% of the amount of such shortfall may be added to the amount of Capital Expenditures permitted for the immediately succeeding (but not any other) fiscal year and (y) in determining whether any amount is available for carryover, the amount expended in any fiscal year shall first be deemed to be from the amount allocated to such year before any carryover. SECTION 3. Representations and Warranties. Each of the Seller and the Servicer hereby represents and warrants to the Agent and the Purchaser as follows: (a) Representations and Warranties. The representations and warranties of such Person contained in Exhibit III to the Agreement are true and correct as of the date hereof (unless stated to relate solely to an earlier date, in which case such representations and warranties were true and correct as of such earlier date). The Servicer further represents and warrants that each of the financial covenants set forth in Section 2.1 above is substantially the same as those contained in the executed Credit Agreement (as defined below). (b) Enforceability. The execution and delivery by such Person of this Amendment, and the performance of its obligations under this Amendment and the Agreement, as amended hereby, are within its corporate powers and have been duly authorized by all necessary corporate action on its part. This Amendment and the Agreement, as amended hereby, are its valid and legally binding obligations, enforceable in accordance with its terms. (c) Termination Event. No Termination Event or Unmatured Termination Event has occurred and is continuing. SECTION 4. Effectiveness. This Amendment shall become effective upon receipt by the Agent of the following, each duly executed and dated as of the date hereof (or such other date satisfactory to the Agent), in form and substance satisfactory to the Agent: (a) counterparts of this Amendment (whether by facsimile or otherwise) executed by each of the parties hereto; (b) fully executed and effective copies of (i) the Credit Agreement (as defined in Section 2.6 of this Amendment) and (ii) that certain Consent, dated as of the date hereof, among each of the parties hereto and each Originator; and (c) such other documents, opinions, instruments and approvals as the Agent may reasonably request. 9 SECTION 5. Effect of Amendment. Except as expressly amended and modified by this Amendment, all provisions of the Agreement shall remain in full force and effect. After this Amendment becomes effective, all references in the Agreement (or in any other Transaction Document) to "the Receivables Purchase Agreement," "this Agreement," "hereof," "herein" or words of similar effect, in each case referring to the Agreement, shall be deemed to be references to the Agreement as amended by this Amendment. This Amendment shall not be deemed to expressly or impliedly waive, amend or supplement any provision of the Agreement other than as set forth herein. SECTION 6. Counterparts. This Amendment may be executed in any number of counterparts and by different parties on separate counterparts, and each counterpart shall be deemed to be an original, and all such counterparts shall together constitute but one and the same instrument. SECTION 7. Governing Law. This Amendment shall be governed by, and construed in accordance with, the internal laws of the State of New York without reference to conflict of laws principles. SECTION 8. Section Headings. The various headings of this Amendment are inserted for convenience only and shall not affect the meaning or interpretation of this amendment or the Agreement or any provision hereof or thereof. [signature pages follow] 10 IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed by their respective, duly authorized officers as of the date and year first-above written. ATRIUM FUNDING CORPORATION, as Seller By:_____________________________________ Name Printed: Philip Ragona Title: Secretary and General Counsel ATRIUM COMPANIES, INC., as Servicer By:________________________________ Name Printed: Philip Ragona Title: Senior Vice President and General Counsel S-1 Sixth Amendment to RPA (Atrium) HARRIS NESBITT CORP., as Agent By:________________________________ Name Printed:______________________ Title:_____________________________ S-2 Sixth Amendment to RPA (Atrium) FAIRWAY FINANCE COMPANY, LLC, as Purchaser By:________________________________ Name Printed:______________________ Title:_____________________________ S-3 Sixth Amendment to RPA (Atrium)