Exhibit 10.31 SEVENTH AMENDMENT TO AMENDED AND RESTATED WAREHOUSING CREDIT AGREEMENT ------------------------------------------------- THIS SEVENTH AMENDMENT TO AMENDED AND RESTATED WAREHOUSING CREDIT AGREEMENT (the "Seventh Amendment") is made and entered into as of the 29th day of August, 2004, by and among (i)UNITED FINANCIAL MORTGAGE CORP., an Illinois corporation with its principal place of business located at 815 Commerce Drive, Suite 100, Oak Brook, Illinois 60523 ("United" or the "Company"), (ii) (a) NATIONAL CITY BANK OF KENTUCKY, a national banking association with a place of business located at 101 South Fifth Street, Louisville, Kentucky 40202 ("National City"), (b) BANK ONE, NA, a national banking association with its principal place of business located in Chicago, Illinois ("Bank One"), (c) COMERICA BANK, a Michigan banking corporation with its principal place of business located at 500 Woodward Avenue, MC: 3256, Detroit, Michigan 48226 ("Comerica"), (d) COLONIAL BANK, N.A., a national banking association with a principal place of business located at 201 E. Pine Street, Suite 730, Orlando, Florida 32801 ("Colonial"), and HSBC BANK USA, a New York state banking corporation with its principal place of business at One HSBC Center, 27th Floor, Buffalo, New York 14203 ("HSBC") (National City, Bank One, Comerica, Colonial and HSBC are each individually referred to as a "Bank" and collectively as the "Banks"), and (iii) NATIONAL CITY BANK OF KENTUCKY, in its capacity as Agent for the Banks (in such capacity, the "Agent"). P R E L I M I N A R Y S T A T E M E N T: A. Pursuant to that certain Amended and Restated Warehousing Credit Agreement dated as of August 1, 2003, among the Company, the Banks party thereto and the Agent, as heretofore amended (the "Existing Credit Agreement"), the Agent and the Banks have established a warehousing line of credit facility in favor of the Company in the current maximum principal amount of One Hundred Ten Million Dollars ($110,000,000.00) (the "Warehouse Line"), for the purposes set forth therein. B. The Company has now requested that the Agent and Banks amend the Existing Credit Agreement to extend the Maturity Date to September 30, 2004. C. The Agent and the Banks are willing to and desire to amend the Existing Credit Agreement in the manner described above, upon the terms and conditions set forth herein. NOW, THEREFORE, in consideration of the premises and the mutual covenants and agreements set forth in the Existing Credit Agreement and herein, and for other good and valuable consideration, the mutuality, receipt and sufficiency of which are hereby acknowledged, the parties hereto hereby agree as follows: 1. Each capitalized term used herein, unless otherwise expressly defined herein, shall have the meaning set forth in the Existing Credit Agreement. 2. The following definition, as contained in Article 1 of the Existing Credit Agreement, is hereby amended and restated in its entirety to read as follows: "Maturity Date" shall mean September 30, 2004; provided that the Agent and the Banks shall have the option, in their sole, absolute discretion, either one time or from time to time, to extend the Maturity Date for an additional period not to exceed three hundred sixty four (364) days. If the Maturity Date is extended, the term "Maturity Date" shall mean the date of expiration of such extension. 3. The Company represents and warrants that no Event of Default has occurred to date under the Existing Credit Agreement or any other Loan Document and that no Unmatured Event of Default currently exists under any of the Loan Documents. 4. This Seventh Amendment may be executed in one or more counterparts, each of which shall constitute an original and all of the same shall constitute one and the same instrument. 5. This Seventh Amendment shall be effective as of the date of delivery to the Agent of each of the following: (i) this Seventh Amendment and each of the other agreements and instruments referred to herein or related hereto, each duly executed by each of the parties thereto, and (ii) all such other security documents, opinions, instruments and certificates as may be required by Agent or its counsel in order to consummate the transactions contemplated herein. 6. This Seventh Amendment and the related writings and the respective rights and obligations of the parties shall be governed by, and construed and enforced in accordance with, the laws of the Commonwealth of Kentucky. 7. This Seventh Amendment shall be binding upon, and shall inure to the benefit of, the Company, the Banks and the Agent and their respective successors and assigns. 8. This Seventh Amendment and the agreements, instruments and other documents referred to herein, constitute the entire agreement of the parties with respect to, and supersede all prior understandings of the parties with respect to the subject matter hereof. No change, modification, addition or termination of this Seventh Amendment shall be enforceable unless in writing signed by the party against whom enforcement is sought. 9. The Company hereby makes, declares, ratifies and/or reaffirms, as applicable, all of the representations, warranties, covenants, agreements and obligations set forth in the Existing Credit Agreement and each of the other Loan Documents, as amended and modified hereby. [The remainder of this page has been intentionally left blank] IN WITNESS WHEREOF, the parties hereto have caused this Seventh Amendment to Amended and Restated Warehousing Credit Agreement to be duly executed as of the day and year first above written. UNITED FINANCIAL MORTGAGE CORP. By: _______________________________________ Title: ______________________________________ (the "Company") NATIONAL CITY BANK OF KENTUCKY By: ______________________________________ Title: _____________________________________ BANK ONE, NA By: ________________________________________ Title: _______________________________________ COMERICA BANK By: ________________________________________ Title: _______________________________________ COLONIAL BANK, N.A. By: ________________________________________ Title: _______________________________________ HSBC BANK USA By: ______________________________________ Title: _____________________________________ (collectively, the "Banks") NATIONAL CITY BANK OF KENTUCKY By: _____________________________________ Title: ____________________________________ (the "Agent")