Document:

EX-4.1

 Exhibit 4.1 
 FIRST AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT 
 THIS FIRST
AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (this “Amendment”) is dated as of February 26, 2013, among TREX COMPANY, INC., a Delaware corporation (the “Borrower”); the lenders party hereto (each, a “Lender”
and, collectively, the “Lenders”); and BRANCH BANKING AND TRUST COMPANY, as Administrative Agent (in such capacity, the “Administrative Agent”). 
 The Borrower, the Lenders and the Administrative Agent are parties to an Amended and Restated Credit Agreement dated as of January 6, 2012 (the “Credit Agreement”), and they now desire to
amend certain provisions of the Credit Agreement as provided herein. 
 The Borrower has requested that the Lenders temporarily
increase the aggregate Revolver Commitments (as defined in the Credit Agreement) from $100,000,000 to $125,000,000 for the period from the date hereof through and including June 30, 2013, and the Lenders have agreed to such temporary increase
on the terms and subject to the conditions set forth in this Amendment. 
 Accordingly, for and in consideration of the premises
and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the Borrower, the Lenders and the Administrative Agent hereby agree as follows: 

1. Capitalized Terms; Effective Date. Capitalized terms used in this Amendment which are not otherwise defined herein shall have
the meanings assigned thereto in the Credit Agreement, as amended by this Amendment. Except as expressly provided to the contrary herein, all amendments to the Credit Agreement set forth herein shall be effective as of the date of this Amendment.

 2. Credit Agreement Amendments. The following provisions of the Credit Agreement are amended as follows: 

2.1. Existing Definitions. The definitions of “Revolver Commitment” and “Stated Termination Date” set forth in
Section 1.01 of the Credit Agreement are amended and restated in their entirety to read as follows: 

“Revolver Commitment” means, with respect to each Lender, (i) the applicable amount set forth opposite the
name of such Lender on the signature pages to the First Amendment, or (ii) as to any Lender which enters into an Assignment and Assumption (whether as transferor Lender or as assignee thereunder), the amount of such Lender’s Revolver
Commitment after giving effect to such Assignment and Assumption, in each case as such amount may be reduced from time to time pursuant to Sections 2.08 and 2.09, and as such amount may be increased pursuant to Section 2.14. 

“Stated Termination Date” means January 9, 2016, as such date may be extended pursuant to
Section 2.05. 

 2.2. New Definitions. New definitions of “Excess Availability Percentage”
and “First Amendment” are added to Section 1.01 of the Credit Agreement to read as follows: 

“Excess Availability Percentage” means, as of any date of determination thereof by the Administrative Agent, a
fraction, the numerator of which is an amount equal to (i) the Borrowing Base, less (ii) the outstanding principal amount of all Advances, and less (iii) the aggregate amount of all Letter of Credit Obligations then
outstanding, and the denominator of which is an amount equal to the Borrowing Base. 
 “First
Amendment” means the First Amendment to Amended and Restated Credit Agreement dated as of February 26, 2013, among the Borrower, the Lenders and the Administrative Agent, which amends certain provisions of this Agreement. 

2.3. Applicable Margin. The table set forth in Section 2.06(a) of the Credit Agreement is replaced with the following table:

  

													
	 Consolidated Debt to Consolidated EBITDA Ratio
	  	Euro-Dollar
Advances	 	 	Base Rate
Advances	 	 	Letters of
Credit	 
				
	 Greater than or equal to 3.00 to 1.0
	  	 	2.50	% 	 	 	1.50	% 	 	 	1.950	% 
				
	 Greater than or equal to 2.50 to 1.0 but less than 3.00 to 1.0
	  	 	2.25	% 	 	 	1.25	% 	 	 	1.725	% 
				
	 Greater than or equal to 2.00 to 1.0 but less than 2.50 to 1.0
	  	 	2.00	% 	 	 	1.00	% 	 	 	1.500	% 
				
	 Less than 2.00 to 1.0
	  	 	1.75	% 	 	 	0.75	% 	 	 	1.250	% 

 2.4. Applicable Fee Rate. The table set forth in Section 2.07(b) of the Credit Agreement is
replaced with the following table: 
  

					
	 Consolidated Debt to Consolidated EBITDA Ratio
	  	Applicable
Fee Rate	 
		
	 Greater than or equal to 3.00 to 1.0
	  	 	0.500	% 
		
	 Greater than or equal to 2.50 to 1.0 but less than 3.00 to 1.0
	  	 	0.375	% 
		
	 Greater than or equal to 2.00 to 1.0 but less than 2.50 to 1.0
	  	 	0.300	% 
		
	 Less than 2.00 to 1.0
	  	 	0.250	% 

  
 - 2 -

 2.5. Financial Covenants. A new paragraph (d) is added to Section 5.05 of
the Credit Agreement to read as follows: 
 (d) Excess Availability Percentage. The Borrower will not
permit the Excess Availability Percentage to be less than 10% at any time through and including June 30, 2013. 
 2.6.
Revolver Commitments. Each Lender’s Revolver Commitment shall be as set forth on its signature page hereto. 
 3.
Representations. The Borrower hereby represents and warrants to the Administrative Agent and the Lenders that: 
 3.1.
The Borrower is in compliance with all of the terms, covenants and conditions of the Credit Agreement, as amended by this Amendment, and all of the terms, covenants and conditions of each of the other Loan Documents. 

3.2. There exists no Default or Event of Default. 
 3.3. The representations and warranties contained in Article IV of the Credit Agreement are, except to the extent that they relate solely to an earlier date, true with the same effect as though such
representations and warranties had been made on the date hereof. 
 3.4. The Borrower has full corporate or other organizational
power and authority to execute, deliver and perform its obligations under this Amendment and the Replacement Revolver Notes (as hereinafter defined) and to incur the obligations provided for herein and therein, all of which have been duly authorized
by all proper and necessary corporate action. No consent or approval of the stockholders of the Borrower which has not been obtained and no consent or approval of, notice to or filing with, any public authority which has not been obtained or made is
required as a condition to the validity of this Amendment or the Replacement Revolver Notes. 
 3.5. This Amendment and the
Replacement Revolver Notes constitute the valid and legally binding obligations of the Borrower, enforceable in accordance with their respective terms, except as the enforceability hereof or thereof may be limited by bankruptcy, insolvency, or
similar laws affecting creditors’ rights generally or by general principles of equity (regardless of whether such enforceability is considered in a proceeding at law or in equity). 

3.6. There are no actions, suits, proceedings or investigations pending or, so far as the officers of the Borrower know, threatened
before any court or administrative agency that, in the opinion of the officers of the Borrower, will materially adversely affect (i) the financial condition or operations of the Borrower, or (ii) the ability of the Borrower to execute or
deliver this Amendment or the Replacement Revolver Notes, or to carry out the terms of the Credit Agreement, as amended by this Amendment, or the Replacement Revolver Notes. 

  
 - 3 -

 3.7. There is no charter, by-law, or other organizational document provision of the Borrower
and no provision of any existing mortgage, lease, indenture, contract, or agreement binding on the Borrower or affecting its property that would conflict with or in any way prevent the execution or delivery of this Amendment or the Replacement
Revolver Notes, or the carrying out of the terms of the Credit Agreement, as amended by this Amendment, or the Replacement Revolver Notes. 
 4. No Other Amendments; Reaffirmation; Waiver and Release; No Novation. Except as expressly amended hereby, the terms of the Credit Agreement shall remain in full force and effect in all respects,
and the Borrower hereby reaffirms its obligations under the Credit Agreement, as amended by this Amendment, and under each of the other Loan Documents. The Borrower, for itself and for its successors and assigns, hereby waives and releases the
Administrative Agent, the Lenders and their respective successors and assigns, from any claim, cause of action, defense, counterclaim, set-off or recoupment of any kind or nature known to the Borrower that it may now or hereafter assert against the
Administrative Agent or any Lender arising from or in connection with the Credit Agreement, as amended by this Amendment, or the transactions contemplated thereby or hereby that exist on the date hereof or arise from facts or actions occurring prior
hereto or on the date hereof. For purposes of the preceding sentence, the terms “Agent” and “Lender” shall include the Administrative Agent’s and each Lender’s former, present and future officers, directors, employees,
agents and attorneys. Nothing contained in this Amendment shall be construed to constitute a novation with respect to the indebtedness described in the Credit Agreement. 
 5. Conditions. The effectiveness of this Amendment is subject to the following conditions precedent: 
 5.1. Amendment. The Borrower and the Lenders shall have executed and delivered to the Administrative Agent a counterpart of this Amendment. 

5.2. Replacement Revolver Notes. The Borrower shall have executed and delivered to each Lender a replacement Revolver Note
(together, the “Replacement Revolver Notes”), each in form and substance satisfactory to applicable Lender and reflecting such Lender’s revised Revolver Commitment. 

5.3. Extension Fees; Other Expenses. The Borrower shall have paid (or shall have made arrangements satisfactory to the
Administrative Agent for the payment) the extension fees described in the fee letter dated of even date herewith between the Administrative Agent and the Borrower (the “First Amendment Fee Letter”). The Borrower also shall have paid (or
shall have made arrangements satisfactory to the Administrative Agent for the payment) all the other expenses of the Administrative Agent and the Lenders as described in Section 8 below. 

6. Security for Obligations. The Borrower acknowledges and agrees that all indebtedness and other obligations of the Borrower
under the Credit Agreement, as amended by this Amendment, and the other Loan Documents, including without limitation the indebtedness evidenced by the Replacement Revolver Notes, are secured by the Collateral described in the Collateral Documents.

  
 - 4 -

 7. References. All references in the Credit Agreement to “this Agreement,”
“herein,” “hereunder” or other words of similar import, and all references to the “Credit Agreement” or similar words in the other Loan Documents, or any other document or instrument that refers to the Credit Agreement,
shall be deemed to be references to the Credit Agreement as amended by this Amendment. All references in the Credit Agreement to the Revolver Notes shall be deemed to include the Replacement Revolver Notes. 

8. Expenses. The Borrower agrees to pay all reasonable out-of-pocket expenses incurred by the Administrative Agent and the Lenders
in connection with the preparation of this Amendment and the consummation of the transactions described herein, including, without limitation, the reasonable attorneys’ fees and expenses of the Administrative Agent and the Lenders, and expenses
related to obtaining real estate appraisals, inventory appraisals and a field exam. 
 9. Applicable Law. This Amendment
and the Replacement Revolver Notes shall be construed in accordance with and governed by the laws of the Commonwealth of Virginia. 
 10. Counterparts. This Amendment may be executed in any number of counterparts, each of which shall be an original, but all of which taken together shall constitute one and the same instrument.

 11. Successors. This Amendment shall be binding upon and inure to the benefit of the parties hereto and their
respective successors and assigns. 
 12. Entire Agreement. This Amendment represents the final agreement of the
Borrower, the Lenders and the Administrative Agent with respect to the subject matter hereof, and may not be contradicted, modified or supplemented in any way by evidence of any prior or contemporaneous written or oral agreements of the Borrower,
the Lenders and/or the Administrative Agent. 
 [Signatures begin on following page] 

  
 - 5 -

 IN WITNESS WHEREOF, the Borrower, the Lenders and the Administrative Agent have caused this
Amendment to be executed by their duly authorized officers, under seal, all as of the date first written above. 
  

					
	 TREX COMPANY, INC.,
 a Delaware corporation
	 	(SEAL)
			
	By:	 	 /s/ James E. Cline
	 	(SEAL)
	Name:	 	James E. Cline	 	
	Title:	 	Vice President and	 	
		 	Chief Financial Officer	 	

 [Signatures continue on following page] 

  
 - 6 -

 
					
	BRANCH BANKING AND TRUST COMPANY,
	 as Administrative Agent
and as a Lender
	 	(SEAL)
			
	By:	 	 /s/ Matthew W. Rush
	 	(SEAL)
	Name:	 	Matthew W. Rush	 	
	Title:	 	Senior Vice President	 	

  

			
	Revolver Commitment:	  	$67,500,000 from February 26, 2013 through and including June 30, 2013, and $55,000,000 from July 1, 2013 and thereafter.

 [Signatures continue on following page] 

  
 - 7 -

 
					
	WELLS FARGO CAPITAL FINANCE, LLC,
	 as a Lender
	 	(SEAL)
			
	By:	 	 /s/ J. Ryan Davison
	 	(SEAL)
	Name:	 	J. Ryan Davison	 	
	Title:	 	Vice President	 	

  

			
	Revolver Commitment:	  	$57,500,000 from February 26, 2013 through and including June 30, 2013, and $45,000,000 from July 1, 2013 and thereafter.

  
 - 8 -EX-4.2

 Exhibit 4.2 
 REVOLVER NOTE 
  

			
	$67,500,000.00	 	Winston-Salem, North Carolina
		 	February 26, 2013

 For value received, TREX COMPANY, INC., a Delaware corporation (the
“Borrower”), promises to pay to the order of BRANCH BANKING AND TRUST COMPANY (the “Lender”), for the account of its Lending Office, the principal sum of SIXTY-SEVEN MILLION FIVE HUNDRED THOUSAND AND NO/100 DOLLARS
($67,500,000.00), or such lesser amount as shall equal the unpaid principal amount of each Revolver Advance made by the Lender to the Borrower pursuant to the Credit Agreement referred to below, on the dates and in the amounts provided in the Credit
Agreement. The Borrower promises to pay interest on the unpaid principal amount of this Note on the dates and at the rate or rates provided for in the Credit Agreement. Interest on any overdue principal of and, to the extent permitted by law,
overdue interest on the principal amount hereof shall bear interest at the Default Rate, as provided for in the Credit Agreement. All such payments of principal and interest shall be made in lawful money of the United States in federal or other
immediately available funds at the office of Branch Banking and Trust Company, 200 West Second Street, 16th Floor, Winston-Salem, NC 27101, or at such other address as may be specified from time to time pursuant to the Credit Agreement. 
 All Revolver Advances made by the Lender, the interest rates from time to time applicable thereto and all repayments of the principal thereof may be recorded by the Lender and, prior to any transfer
hereof, endorsed by the Lender on the schedule attached hereto, or on a continuation of such schedule attached to and made a part hereof; provided that the failure of the Lender to make, or any error of the Lender in making, any such
recordation or endorsement shall not affect the obligations of the Borrower hereunder or under the Credit Agreement. This Note is secured by, among other security, the Collateral Documents, as the same may be modified or amended from time to time.

 This Note increases, amends and restates in its entirety the $55,000,000 Revolver Note of the Borrower dated January 6,
2012, payable to the order of the Lender (the “Prior Note”), and this Note is executed and delivered to the Lender as a replacement of and in substitution for the Prior Note. The execution and delivery of this Note shall not constitute a
novation of the debt originally evidenced by the Prior Note and secured as hereinafter provided. 
 This Note is one of the
Revolver Notes referred to in the Amended and Restated Credit Agreement dated as of January 6, 2012, as amended (as it may be further amended, restated, replaced or otherwise modified from time to time, the “Credit Agreement”), among
the Borrower, the Lenders listed on the signature pages thereof and their successors and assigns, Branch Banking and Trust Company, as Administrative Agent, Swing Line Lender and Letter of Credit Issuer, Branch Banking and Trust Company and Wells
Fargo Capital Finance, LLC, as Collateral Agents, and BB&T Capital Markets, as Lead Arranger. Terms defined in the Credit Agreement are used herein with the same meanings. Reference is made to the Credit Agreement for provisions for the
prepayment and the repayment hereof and the acceleration of the maturity hereof. 

 The Borrower hereby waives presentment, demand, protest, notice of demand, protest and
nonpayment and any other notice required by law relative hereto, except to the extent as otherwise may be expressly provided for in the Credit Agreement. 
 The Borrower agrees, in the event that this Note or any portion hereof is collected by law or through an attorney at law, to pay all reasonable costs of collection, including, without limitation,
reasonable attorneys’ fees. 
 IN WITNESS WHEREOF, the Borrower has caused this Note to be duly executed under seal, by its
duly authorized officers as of the day and year first above written. 
  

					
	TREX COMPANY, INC.,	 	(SEAL)
	 a Delaware corporation
	 	
			
	By:	 	 /s/ James E. Cline
	 	(SEAL)
	Name:	 	James E. Cline	 	
	Title:	 	Vice President and	 	
		 	Chief Financial Officer	 	

  
 - 2 -

 Revolver Note (cont’d) 

ADVANCES AND PAYMENTS OF PRINCIPAL 
  

											
	 Date
	 	Interest
Rate	 	Interest
Period
(if applicable)	 	Amount
of
Advance	 	Amount of
Principal
Repaid	 	Notation
Made By
						
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	
		 		 		 		 		 	

  
 - 3 -

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