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 -