Exhibit 10.2 FIFTH AMENDMENT TO RECEIVABLES PURCHASE AGREEMENT THIS FIFTH AMENDMENT TO RECEIVABLES PURCHASE AGREEMENT, dated as of December 17, 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 "Purchase Limit" as set forth in Exhibit I to the Agreement is hereby amended by deleting the amount "$50,000,000" therein and substituting the amount "$60,000,000" therefor. 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). (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 as of the date hereof 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) receipt by the Agent of written confirmation from each Rating Agency that the effectiveness of this Amendment will not cause the downgrade or withdrawal by such Rating Agency of its then current rating of the Notes; (c) receipt by the Agent of written confirmation from S&P reaffirming the "A" rating of the facility; (d) receipt by the Agent from the Seller on or prior to the date hereof of an "amendment fee" in the amount set forth in that certain fee letter dated as of the date hereof, by and between Seller and Agent; (e) a fully executed and effective First Amendment to Purchase and Sale Agreement, dated as of the date hereof, among the Originators party thereto and the Seller; and (f) such other documents, opinions, instruments and approvals as the Agent may reasonably request. 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. 2 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] 3 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: Jeff L. Hull Title: Chairman, President and Chief Executive Officer S-1 Fifth Amendment to RPA (Atrium) ATRIUM COMPANIES, INC., as Servicer By:________________________________ Name Printed: Jeff L. Hull Title: Chairman, President and Chief Executive Officer S-2 Fifth Amendment to RPA (Atrium) HARRIS NESBITT CORP., as Agent By:________________________________ Name Printed:______________________ Title:_____________________________ S-3 Fifth Amendment to RPA (Atrium) FAIRWAY FINANCE COMPANY, LLC, as Purchaser By:________________________________ Name Printed:______________________ Title:_____________________________ S-4 Fifth Amendment to RPA (Atrium)