Document:

<PAGE>

                                                                    EXHIBIT 10.4

                 SECOND AMENDMENT TO SECOND AMENDED AND RESTATED
                    RECEIVABLES PURCHASE AGREEMENT AND WAIVER

      THIS SECOND AMENDMENT TO SECOND AMENDED AND RESTATED RECEIVABLES PURCHASE
AGREEMENT AND WAIVER (this "Amendment") dated as of August 31, 2004, is entered
into among WESCO RECEIVABLES CORP. (the "Seller"), WESCO DISTRIBUTION, INC. (the
"Servicer"), the Purchasers (each, a "Purchaser") and Purchaser Agents (each, a
"Purchaser Agent") party hereto, and WACHOVIA CAPITAL MARKETS, LLC (as successor
to Wachovia Securities, Inc.), as Administrator (the "Administrator").

                                    RECITALS

      1. The Seller, Servicer, each Purchaser, each Purchaser Agent and the
Administrator are parties to the Second Amended and Restated Receivables
Purchase Agreement dated as of September 2, 2003 (as amended through the date
hereof, the "Agreement"); and

      2. The parties hereto desire to amend the Agreement as hereinafter set
forth.

      NOW THEREFORE, for good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, the parties agree as follows:

      1. Certain Defined Terms. Capitalized terms that are used herein without
definition and that are defined in Exhibit I to the Agreement shall have the
same meanings herein as therein defined.

      2. Amendments to Agreement. The Agreement is hereby amended as follows:

            2.1 The definition of "Settlement Date" as set forth in Exhibit I to
      the Agreement is hereby amended and restated in its entirety as follows:

                  "Settlement Date" means the 2nd Business Day following the
            date the Information Package for the most recent calendar month is
            due.

            2.2 Clause (g) of Exhibit V to the Agreement is hereby amended and
      restated in its entirety as follows:

                  (g) the average for three consecutive calendar months of: (A)
            the Default Ratio shall (i) exceed 4.00% during the period from the
            effective date of this Amendment through and including January 31,
            2005 or (ii) exceed 3.75% thereafter, (B) the Delinquency Ratio
            shall exceed 4.05%, or (C) the Dilution Ratio shall exceed 7.00%;

                                       1
<PAGE>

            2.3 The definition of "Group A Ratable Share" as set forth in
      Exhibit I to the Agreement is hereby amended and restated in its entirety
      as follows:

                  "Group A Ratable Share" means on any date with respect to any
            Group A Purchaser, a fraction, expressed as a percentage (a) the
            numerator of which is equal to the portion of the Investment of such
            Purchaser set forth in paragraph (a) of the definition thereof at
            such time, and (b) the denominator of which is the aggregate of the
            Investments of all Purchasers at such time.

            2.4 Any references in the Agreement (or the Exhibits, Schedules or
      Annexes thereto) to "Wachovia Securities, Inc." shall hereinafter be
      deemed to be references to "Wachovia Capital Markets, LLC".

            2.5 The Commitment and Scheduled Commitment Termination Date with
      respect to PNC Bank, National Association, as a Related Committed
      Purchaser, as set forth on PNC Bank, National Association's signature page
      to the Agreement, is hereby amended by respectively (i) deleting the
      amount "$40,000,000" therein and substituting the amount "$55,000,000"
      therefor and (ii) deleting the date "August 31, 2004" therein and
      substituting the date "August 30, 2005" therefor.

            2.6 The Commitment and Scheduled Commitment Termination Date with
      respect to Wachovia Bank, National Association, as a Related Committed
      Purchaser, as set forth on Wachovia Bank, National Association's signature
      page to the Agreement, is hereby amended by respectively (i) deleting the
      amount "$125,000,000" therein and substituting the amount "$135,000,000"
      therefor and (ii) deleting the date "August 31, 2004" therein and
      substituting the date "August 30, 2005" therefor.

            2.7 Schedule II to the Agreement is hereby amended and restated in
      its entirety as attached hereto.

      3. Waiver. Pursuant to Section 2.2 of the Agreement and clause (g) of
Exhibit V to the Agreement (prior to the effectiveness of this Amendment), if
the average for three consecutive calendar months of the Default Ratio exceeds
3.00% then a default constituting a Termination Event is deemed to have occurred
and may trigger the Facility Termination Event. You have advised the
Administrator that, (i) as further indicated in the Information Package
delivered for the period ending March 31, 2004, the Default Ratio as calculated
on March 31, 2004 equaled 3.05%, thereby causing such a default to occur on
March 31, 2004 and (ii) as further indicated in the Information Package
delivered for the period ending July 31, 2004, the Default Ratio as calculated
on July 31, 2004 equaled 3.30%, thereby causing defaults to occur respectively
on March 31, 2004 and July 31, 2004 (collectively, such defaults solely
occurring on March 31, 2004 and July 31, 2004, the "Breach").

      You have requested that the Administrator and the Majority Purchasers
(collectively referred to herein as the "Waiving Parties") agree, pursuant to
Section 6.1 of the Receivables Purchase Agreement to waive the Breach. The
Waiving Parties are prepared to do so, but only upon the terms and conditions
set forth below.

                                       2
<PAGE>

      The Waiving Parties hereby waive the Breach and any Termination Event
occurring solely as a result of the Breach. Notwithstanding anything to the
contrary herein or in the Transaction Documents, by signing this letter, the
Waiving Parties are not now waiving, nor have the Waiving Parties agreed to
waive in the future, the breach of (or any rights, powers and/or remedies,
whether arising as a matter of contract and/or applicable law, related to the
breach of) any provisions of the Agreement or any other Transaction Documents
other than each Breach strictly described herein. Except as specifically
modified by this Amendment, all of the terms, conditions and provisions of the
Agreement and each other Transaction Document shall stand and remain unchanged
and in full force and effect, and the Waiving Parties waive none of, but
instead, expressly reserve all of, their claims, rights, powers or remedies,
whether as a matter of contract and/or under applicable law with respect to any
Transaction Document. The Waiving Parties waive none of, but instead expressly
reserve all of, these claims, rights and powers and remedies under the
Transaction Documents. No reference to this waiver need be made in any
instrument or document at any time referring to the Agreement or any other
Transaction Document. The waiver provided for herein shall be strictly construed
and limited as provided herein.

      4. Representations and Warranties. The Seller and Servicer hereby
represent and warrant to each of the parties hereto as follows:

            (a) Representations and Warranties. The representations and
      warranties contained in Exhibit III of the Agreement are true and correct
      as of the date hereof.

            (b) No Default. Both before and immediately after giving effect to
      this Amendment and the transactions contemplated hereby, no Termination
      Event or Unmatured Termination Event exists or shall exist.

      5. Effect of Amendment. All provisions of the Agreement, as expressly
amended and modified by this Amendment, shall remain in full force and effect.
After this Amendment becomes effective, all references in the Agreement (or in
any other Transaction Document) to "this Agreement", "hereof", "herein" or words
of similar effect referring to the Agreement shall be deemed to be references to
the Agreement as amended by this Amendment. This Amendment shall not be deemed,
either expressly or impliedly, to waive, amend or supplement any provision of
the Agreement other than as set forth herein.

      6. Effectiveness. This Amendment shall become effective as of the date
hereof upon receipt by the Administrator of counterparts of this Amendment
(whether by facsimile or otherwise) executed by each of the other parties
hereto, in form and substance satisfactory to the Administrator in its sole
discretion.

      7. Counterparts. This Amendment may be executed in any number of
counterparts and by different parties on separate counterparts, each of which
when so executed shall be deemed to be an original and all of which when taken
together shall constitute but one and the same instrument.

                                       3
<PAGE>

      8. Governing Law. This Amendment shall be governed by, and construed in
accordance with, the internal laws of the State of New York (without regard to
any otherwise applicable principles of conflicts of law).

      9. Section Headings. The various headings of this Amendment are included
for convenience only and shall not affect the meaning or interpretation of this
Amendment, the Agreement or any provision hereof or thereof.

                                       4
<PAGE>

                                   SCHEDULE II

                      LOCK-BOX BANKS AND LOCK-BOX ACCOUNTS

<TABLE>
<CAPTION>
Lock-Box      Bank              Title                          Account
--------      ----              -----                          -------
<S>         <C>              <C>                              <C>
530409      PNC Bank         Int'l Structures                 1001145943
771751      PNC Bank         Wesco Distribution Inc           1001145943
802578      PNC Bank         Wesco Distribution Inc           1001145943
676504      PNC Bank         Bruckner International           1001145943
676780      PNC Bank         Brown Electric                   1001145943
890914      PNC Bank         Murco                            1001145943
910465      PNC Bank         Wesco Distribution Inc           1001145943
825089      PNC Bank         Bala cynwyd                      1001145943
640376      PNC Bank         Wesco Distribution Inc           1001145943
641447      PNC Bank         Pittsburgh Lockbox               1001145943
641836      PNC Bank         Cash Sales                       1001145943
642432      PNC Bank         Hamby Young                      1001145943
642526      PNC Bank         Coghlin                          1001145943
642565      PNC Bank         Bruckner Supply                  1001145943
642728      PNC Bank         Control Corp of America          1001145943
633718      Fifth Third      Wesco Distribution Inc             83527712
827765      PNC Bank         Avon Division                    1001145943
827791      PNC Bank         Avon Division                    1001145943
643582      PNC Bank         Liberty Electric Inc.            1001145943
</TABLE>

                                     Sch-1

<PAGE>

      IN WITNESS WHEREOF, the parties have executed this Amendment as of the
date first written above.

                                         WESCO RECEIVABLES CORP.

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         WESCO DISTRIBUTION, INC., as Servicer

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA
<PAGE>

                                         WACHOVIA CAPITAL MARKETS, LLC,
                                         as Administrator

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>

                                         MARKET STREET FUNDING CORPORATION,
                                         as a Conduit Purchaser

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         PNC BANK, NATIONAL ASSOCIATION,
                                         as Purchaser Agent for Market Street
                                         Funding Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>

                                         GENERAL ELECTRIC CAPITAL
                                         CORPORATION, as a Conduit Purchaser

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         GENERAL ELECTRIC CAPITAL
                                         CORPORATION, as Purchaser Agent for
                                         General Electric Capital Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>

                                         BLUE RIDGE ASSET FUNDING
                                         CORPORATION, as a Conduit Purchaser

                                         By:  Wachovia Capital Markets, LLC
                                               as Attorney in Fact

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         WACHOVIA BANK, NATIONAL
                                         ASSOCIATION, as Purchaser Agent for
                                         Blue Ridge Asset Funding Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>

                                         FIFTH THIRD BANK, as a Conduit
                                         Purchaser

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         FIFTH THIRD BANK,
                                         as Purchaser Agent for Fifth Third Bank

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>
                                         THE RELATED COMMITTED PURCHASERS:

                                         PNC BANK, NATIONAL ASSOCIATION,
                                         as a Related Committed Purchaser for
                                         Market Street Funding Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>

                                        FIFTH THIRD BANK, as a Related
                                        Committed Purchaser for Fifth Third Bank

                                        By:    ________________________________
                                        Name:  ________________________________
                                        Title: ________________________________

                                                      SECOND AMENDMENT TO WESCO
                                                                    2ND A&R RPA

<PAGE>
                                         GENERAL ELECTRIC CAPITAL
                                         CORPORATION, as a Related Committed
                                         Purchaser for General Electric Capital
                                         Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA

<PAGE>

                                         WACHOVIA BANK, NATIONAL
                                         ASSOCIATION, as Related Committed
                                         Purchaser for Blue Ridge Asset Funding
                                         Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                                       SECOND AMENDMENT TO WESCO
                                                                     2ND A&R RPA<PAGE>

                                                                    EXHIBIT 10.5

                 THIRD AMENDMENT TO SECOND AMENDED AND RESTATED
                         RECEIVABLES PURCHASE AGREEMENT

      THIS THIRD AMENDMENT TO SECOND AMENDED AND RESTATED RECEIVABLES PURCHASE
AGREEMENT (this "Amendment") dated as of September 23, 2004, is entered into
among WESCO RECEIVABLES CORP. (the "Seller"), WESCO DISTRIBUTION, INC. (the
"Servicer"), the Purchasers (each, a "Purchaser") and Purchaser Agents (each, a
"Purchaser Agent") party hereto, and WACHOVIA CAPITAL MARKETS, LLC (as successor
to Wachovia Securities, Inc.), as Administrator (the "Administrator").

                                    RECITALS

      1. The Seller, Servicer, each Purchaser, each Purchaser Agent and the
Administrator are parties to the Second Amended and Restated Receivables
Purchase Agreement dated as of September 2, 2003 (as amended through the date
hereof, the "Agreement"); and

      2. The parties hereto desire to amend the Agreement as hereinafter set
forth.

      NOW THEREFORE, for good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged, the parties agree as follows:

      1. Certain Defined Terms. Capitalized terms that are used herein without
definition and that are defined in Exhibit I to the Agreement shall have the
same meanings herein as therein defined.

      2. Amendments to Agreement. The Agreement is hereby amended as follows:

            2.1 The Scheduled Commitment Termination Date with respect to Fifth
      Third Bank, as a Related Committed Purchaser, as set forth on Fifth Third
      Bank's signature page to the Agreement, is hereby amended by deleting the
      date "August 29, 2006" therein and substituting the date "August 29, 2007"
      therefor.

            2.2 The Scheduled Commitment Termination Date with respect to
      General Electric Capital Corporation, as a Related Committed Purchaser, as
      set forth on General Electric Capital Corporation's signature page to the
      Agreement, is hereby amended by deleting the date "August 29, 2006"
      therein and substituting the date "August 29, 2007" therefor.

            2.3 Clause (i)(iii) of Section 2 of Exhibit IV to the Agreement is
      hereby amended and restated in its entirety as follows:

                  (iii) as to the Servicer only, as soon as available and in any
            event not later than the twentieth day after the last day of each
            calendar month or if such day is not a Business Day, the next
            Business Day, an Information

                                       1
<PAGE>

            Package as of the last day of such month or, within 10 Business Days
            of a request by the Administrator or any Purchaser Agent, an
            Information Package for such periods as is specified by the
            Administrator or such Purchaser Agent (including on a semi-monthly,
            weekly or daily basis); provided, however that if WESCO shall cease
            to have a rating of at least "B-" by Standard & Poor's on its
            corporate credit rating the Servicer shall (i) provide an
            Information Package on the first Business Day of each calendar week
            and (ii) provide such information as shall requested by the
            Administrator in its sole discretion regarding Collections to the
            Administrator on a daily basis;

      3. Representations and Warranties. The Seller and Servicer hereby
represent and warrant to each of the parties hereto as follows:

            (a) Representations and Warranties. The representations and
      warranties contained in Exhibit III of the Agreement are true and correct
      as of the date hereof.

            (b) No Default. Both before and immediately after giving effect to
      this Amendment and the transactions contemplated hereby, no Termination
      Event or Unmatured Termination Event exists or shall exist.

      4. Effect of Amendment. All provisions of the Agreement, as expressly
amended and modified by this Amendment, shall remain in full force and effect.
After this Amendment becomes effective, all references in the Agreement (or in
any other Transaction Document) to "this Agreement", "hereof", "herein" or words
of similar effect referring to the Agreement shall be deemed to be references to
the Agreement as amended by this Amendment. This Amendment shall not be deemed,
either expressly or impliedly, to waive, amend or supplement any provision of
the Agreement other than as set forth herein.

      5. Effectiveness. This Amendment shall become effective as of the date
hereof upon receipt by the Administrator of counterparts of this Amendment
(whether by facsimile or otherwise) executed by each of the other parties
hereto, in form and substance satisfactory to the Administrator in its sole
discretion.

      6. Counterparts. This Amendment may be executed in any number of
counterparts and by different parties on separate counterparts, each of which
when so executed shall be deemed to be an original and all of which when taken
together shall constitute but one and the same instrument.

      7. Governing Law. This Amendment shall be governed by, and construed in
accordance with, the internal laws of the State of New York (without regard to
any otherwise applicable principles of conflicts of law).

      8. Section Headings. The various headings of this Amendment are included
for convenience only and shall not affect the meaning or interpretation of this
Amendment, the Agreement or any provision hereof or thereof.

                                       2
<PAGE>

      IN WITNESS WHEREOF, the parties have executed this Amendment as of the
date first written above.

                                         WESCO RECEIVABLES CORP.

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         WESCO DISTRIBUTION, INC., as Servicer

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-1
<PAGE>

                                         WACHOVIA CAPITAL MARKETS, LLC,
                                         as Administrator

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-2
<PAGE>

                                         MARKET STREET FUNDING CORPORATION,
                                         as a Conduit Purchaser

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         PNC BANK, NATIONAL ASSOCIATION,
                                         as Purchaser Agent for Market Street
                                         Funding Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-3
<PAGE>

                                         GENERAL ELECTRIC CAPITAL
                                         CORPORATION, as a Conduit Purchaser

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         GENERAL ELECTRIC CAPITAL
                                         CORPORATION, as Purchaser Agent for
                                         General Electric Capital Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-4
<PAGE>

                                         BLUE RIDGE ASSET FUNDING
                                         CORPORATION, as a Conduit Purchaser

                                         By:  Wachovia Capital Markets, LLC
                                              as Attorney in Fact

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         WACHOVIA BANK, NATIONAL
                                         ASSOCIATION, as Purchaser Agent for
                                         Blue Ridge Asset Funding Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-5
<PAGE>

                                         FIFTH THIRD BANK, as a Conduit
                                         Purchaser

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                         FIFTH THIRD BANK,
                                         as Purchaser Agent for Fifth Third Bank

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-6
<PAGE>

                                         THE RELATED COMMITTED PURCHASERS:

                                         PNC BANK, NATIONAL ASSOCIATION,
                                         as a Related Committed Purchaser for
                                         Market Street Funding Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-7
<PAGE>

                                         FIFTH THIRD BANK, as a Related
                                         Committed Purchaser for Fifth Third
                                         Bank

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-8
<PAGE>

                                         GENERAL ELECTRIC CAPITAL
                                         CORPORATION, as a Related Committed
                                         Purchaser for General Electric Capital
                                         Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-9
<PAGE>

                                         WACHOVIA BANK, NATIONAL
                                         ASSOCIATION, as Related Committed
                                         Purchaser for Blue Ridge Asset Funding
                                         Corporation

                                         By:    _______________________________
                                         Name:  _______________________________
                                         Title: _______________________________

                                      S-10

Source: [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00073-of-00352.parquet"}, [{"source": "alea-institute/alea-institute/kl3m-data-edgar-agreements/train-00073-of-00352.parquet"}]]