<PAGE>
                                                                    EXHIBIT 10.4
                                                                  Execution Copy

                                 AMENDMENT NO. 2
           TO AMENDED AND RESTATED MASTER LOAN AND SECURITY AGREEMENT

     This AMENDMENT NO. 2 is dated as of May __, 2002 (this "Amendment"), and
amends the Amended and Restated Master Loan and Security Agreement, dated as of
December 1, 2001, as amended (the "Loan and Security Agreement"), and is between
NC Capital Corporation and Morgan Stanley Dean Witter Mortgage Capital Inc.

                                   WITNESSETH:

     WHEREAS, the parties hereto desire to make a certain amendment to the Loan
and Security Agreement as hereinafter set forth; and

     WHEREAS, pursuant to Section 11.4 of the Loan and Security Agreement, the
parties hereto are permitted to amend the Loan and Security Agreement:

     NOW THEREFORE, in consideration of the above recitals and for other good
and valuable consideration, the receipt and adequacy of which are hereby
acknowledged, the parties hereto agree as follows:

     SECTION 1. Definitions. Capitalized terms used herein but not defined shall
                -----------
have the meanings set forth in the Loan and Security Agreement.

     SECTION 2. Amendment. The Loan and Security Agreement is hereby amended as
                ---------
set forth below:

          The definition of the term "Maximum Credit" is hereby amended in its
     entirety to read as follows:

          "Maximum Credit" shall mean $500,000,000 from May 13, 2002 through and
     including May 31, 2002, and shall mean at all times thereafter,
     $400,000,000, in each case as reduced in accordance with Section 2.1
     hereof.

     SECTION 3. Survival. Except as expressly amended hereby, the Loan and
                --------
Security Agreement shall continue in full force and effect in accordance with
the provisions thereof and the Loan and Security Agreement is in all respects
hereby ratified, confirmed and preserved. This Amendment and all its provisions
shall be deemed a part of the Loan and Security Agreement in the manner and to
the extent herein provided.

     SECTION 4. Successors and Assigns. This Amendment shall be binding upon and
                ----------------------
inure to the benefit of the parties hereto and their respective successors and
permitted assigns.

     SECTION 5. Governing Law. This Amendment shall be governed by New York law
                -------------
without reference to its choice of law doctrine.

<PAGE>

     SECTION 6. Counterparts. This Amendment may be executed in any number of
                ------------
counterparts, all of which taken together shall constitute one and the same
instrument, and any of the parties hereto may execute this Amendment by signing
any such counterpart.

                                     * * *


<PAGE>




     IN WITNESS WHEREOF, the parties hereto have caused this Amendment No. 2 to
be duly executed as of this ___ day of May, 2002.

                            NC CAPITAL CORPORATION


                            By: /s/ Patrick Flanagan
                                _____________________________________
                            Name:
                            Title: Chief Executive Officer

                            MORGAN STANLEY DEAN WITTER
                            MORTGAGE CAPITAL INC.

                            By:______________________________________
                            Name:
                            Title