1 EXHIBIT 4.5 EXECUTION COPY AMENDMENT NO. 1 Dated as of July 28, 1998 to and under SECOND AMENDED AND RESTATED REVOLVING/TERM SECURITY AND COLLATERAL AGENCY AGREEMENT Dated as of July 31, 1996 This Amendment No. 1 (the "Amendment"), dated as of July 28, 1998, by and among Resource Bancshares Mortgage Group, Inc. (the "Pledgor"), the banks listed on the signature pages hereof (the "Banks"), and The Bank of New York, as Secured Party and Collateral Agent. WHEREAS, the Pledgor, the Agent, the Co-Agents, the Banks and the other Persons listed on the signature pages thereof are parties to a Second Amended and Restated Secured Revolving/Term Credit Agreement, dated as of July 31, 1996 (as amended prior to the date hereof, the "Second Amended and Restated Credit Agreement"); and WHEREAS, the parties thereto have amended and restated in its entirety the Second Amended and Restated Credit Agreement pursuant to that Third Amended and Restated Secured Revolving/Term Credit Agreement, dated as of July 28, 1998 (as amended, restated, supplemented, waived or otherwise modified from time to time, the "Credit Agreement"); and WHEREAS, the Pledgor, the Secured Party and the Collateral Agent are parties to the Second Amended and Restated Revolving/Term Security and Collateral Agency Agreement dated as of July 31, 1996 (as amended, restated, supplemented, waived or otherwise modified from time to time, the "Security Agreement"); and WHEREAS, the Pledgor, the Secured Party and the Collateral Agent desire to amend the Security Agreement as more fully set forth herein; NOW, THEREFORE, the Pledgor, the Secured Party and the Collateral Agent hereby (i) confirm and ratify that the Security Agreement continues in full force and effect pursuant to the terms of the Credit Agreement and shall continue to secure the Secured Obligations (including all Liabilities of the Pledgor to the Principals under the Credit Agreement and all other Loan Documents, as more fully provided in the Security Agreement) and (ii) further agree that the Security Agreement shall be amended as follows: 1. Amendment to the Security Agreement. Upon and after the Amendment Effective Date (as defined below), 2 (a) The definition of "Credit Agreement" shall be amended as follows: (i) by deleting the words "Second Amended and Restated Secured Revolving/Term Credit Agreement, dated as of July 31, 1996, as amended from time to time"; and (ii) inserting in lieu thereof the words "Third Amended and Restated Secured Revolving/Term Credit Agreement, dated as of July 28, 1998, as amended, restated, supplemented, waived or otherwise modified from time to time". 2. Representations and Warranties. In order to induce the Banks, the Secured Party and the Collateral Agent to agree to amend the Security Agreement, the Pledgor hereby represents and warrants, as follows: The Pledgor has the corporate power and authority to execute, deliver and perform this Amendment and the Security Agreement, as amended by this Amendment, and has taken all necessary corporate action to authorize the execution, delivery and performance of this Amendment. This Amendment has been duly executed and delivered on behalf of the Pledgor, and this Amendment, and the Security Agreement as amended hereby, constitutes the legal, valid and binding obligations of the Pledgor, enforceable against it in accordance with their respective terms, except as enforceability may be limited by applicable bankruptcy, insolvency and other similar laws affecting creditors' rights generally and by general principles of equity. The execution, delivery and performance of this Amendment, and the Security Agreement as amended hereby, does not and will not (a) violate any Applicable Law or any Contract to which the Pledgor or any Subsidiary is a party or by which the Pledgor or any Subsidiary or any of their respective properties may be bound, (b) require any license, consent, authorization, approval or any other action by, or any notice to or filing or registration with, any Governmental Authority or other Person or (c) result in the creation or imposition of any Lien on any asset of the Pledgor except as contemplated by the Loan Documents. Each of the foregoing representations and warranties shall be made at and as of the Amendment Effective Date. 3. Conditions to Effectiveness; Amendment Effective Date. This Amendment shall be effective as of the date first written above, but shall not become effective as of such date until the date (the "Amendment Effective Date") that the Agent shall have received this Amendment duly executed by the Pledgor, the Secured Party and the Collateral Agent and consented to by each Bank. 4. Governing Law. The rights and duties of the parties under this Amendment shall, pursuant to New York General Obligations Law Section 5-1401, be governed by the law of the State of New York. 2 3 5. Counterparts. This Amendment may be signed in any number of counterparts, each of which shall be an original, with the same effect as if the signatures thereto were upon the same instrument. 6. Headings. Section headings in this Amendment are included herein for convenience and reference only and shall not constitute a part of this Amendment for any other purpose. 3 4 IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be executed by their duly authorized officers all as of July 28, 1998. RESOURCE BANCSHARES MORTGAGE GROUP, INC. By ---------------------------------- Name: Title: THE BANK OF NEW YORK, as Collateral Agent, Secured Party and as a Bank By ---------------------------------- Name: Patricia M. Dominus Title: Vice President This Amendment No. 1 to the Second Amended and Restated Revolving/Term Security and Collateral Agency Agreement is hereby consented to by: - - ---------------------------------- [insert Bank name] By: ------------------------------ Name: Title: 4