Exhibit 10.4
EIGHTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT

THIS EIGHTH AMENDMENT TO AMENDED AND RESTATED CREDIT AGREEMENT (this “Amendment”), is entered into as of May 3, 2021, by and among TEXAS OIL & CHEMICAL CO. II, INC., a Texas corporation (“Borrower”), certain subsidiaries of the Borrower party hereto, as guarantors (the “Guarantors”), the lenders from time to time party hereto (the “Lenders”), Citibank, N.A., as an L/C Issuer, and BANK OF AMERICA, N.A., as Administrative Agent for the Lenders (in such capacity, the “Administrative Agent”), Swingline Lender and an L/C Issuer.

RECITALS

A.Borrower, the Guarantors, the Administrative Agent and the Lenders party thereto are parties to that certain Amended and Restated Credit Agreement, dated as of October 1, 2014 (as amended by that certain First Amendment to Amended and Restated Credit Agreement, dated as of February 20, 2015, that certain Second Amendment to Amended and Restated Credit Agreement, dated as of March 28, 2017, that certain Third Amendment to Amended and Restated Credit Agreement, dated as of July 25, 2017, that certain Fourth Amendment to Amended and Restated Credit Agreement, dated as of July 31, 2018, that certain Fifth Amendment to Amended and Restated Credit Agreement, dated as of December 19, 2018, that certain Sixth Amendment to Amended and Restated Credit Agreement, dated as of March 29, 2019, and that certain Seventh Amendment to Amended and Restated Credit Agreement, dated as of May 8, 2020 (the “Credit Agreement” and the Credit Agreement, as modified by this Amendment, the “Amended Credit Agreement”)).
B.Borrower has requested that the Administrative Agent and the Lenders amend the Credit Agreement, and the Administrative Agent and the Lenders have agreed to amend the Credit Agreement, subject to the terms and conditions set out in this Amendment.
AGREEMENT

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

1.Definitions. Unless otherwise defined in this Amendment, each capitalized term used but not otherwise defined herein has the meaning given such term in the Amended Credit Agreement.
2.Amendments to the Credit Agreement. On the Effective Date:
(a)The following definition in Section 1.01 of the Credit Agreement is deleted in its entirety and replaced as follows:
Consolidated EBITDA” means, for any period, the sum of the following determined on a Consolidated basis, without duplication, for the Loan Parties in accordance with GAAP, Consolidated Net Income for the most recently completed Measurement Period plus (a) the following to the extent deducted in calculating such Consolidated Net Income (without duplication): (i) Consolidated Interest Charges, (ii) the provision for Federal, state, local and foreign income taxes payable, (iii) depreciation and amortization expense; (iv) out of pocket severance and restructuring expenses up to an amount not to exceed $1,000,000 in the aggregate, (v) non-recurring cash charges, expenses or losses arising from or related to the February 2021 Texas winter storm, not to exceed $5,000,000 in the aggregate for the 2021 fiscal year, and



(vi) other non-recurring expenses reducing such Consolidated Net Income which (A) do not represent a cash item in such period or any future period (in each case of or by the Loan Parties for such Measurement Period) and (B) are approved in writing by the Administrative Agent, and minus (b) the following to the extent included in calculating such Consolidated Net Income: (i) Federal, state, local and foreign income tax credits; and (ii) all non-cash items increasing Consolidated Net Income (in each case of or by the Loan Parties for such Measurement Period) which are approved in writing by the Administrative Agent.
3.Effectiveness of this Amendment. This Amendment shall be effective as of the date (the “Effective Date”) once all of the following have been satisfied or delivered to the Administrative Agent and the Lenders, as applicable, in each case, in Proper Form:
i.Execution of Amendment; Loan Documents. This Amendment executed by a Responsible Officer of each Loan Party and a duly authorized officer of each Lender.

ii.Additional Information. Such additional information and materials, which the Administrative Agent and/or any Lender shall reasonably request or require.

4.Representations and Warranties. Borrower and each Guarantor represents and warrants to the Administrative Agent and the Lenders on and as of the Effective Date hereof that (a) it possesses the requisite power and authority to execute and deliver this Amendment, (b) this Amendment has been duly authorized and approved by the requisite corporate action on the part of Borrower or such Guarantor, (c) no other consent of any Person (other than the Administrative Agent and the Lenders) that has not been obtained is required for this Amendment to be effective, (d) the execution and delivery of this Amendment does not violate its organizational documents, (e) the representations and warranties in each Loan Document to which it is a party are true and correct in all material respects on and as of the date of this Amendment as though made on the date of this Amendment (except to the extent that such representations and warranties speak to a specific date, in which case such representation or warranty shall be true and correct in all material respects as of such date), (f) after giving effect to this Amendment, it is in compliance with all covenants and agreements contained in each Loan Document to which it is a party, (g) after giving effect to this Amendment, no Default or Event of Default has occurred and is continuing and (h) that each Loan Document to which it is a party remains in full force and effect and is the legal, valid, and binding obligations of Borrower or such Guarantor enforceable against it in accordance with their respective terms, subject to applicable bankruptcy, insolvency or similar laws affecting creditors’ rights generally and to general principles of equity and principles of good faith and fair dealing.
5.Scope of Amendment; Reaffirmation; RELEASE. Except as expressly modified by this Amendment, all references to the Credit Agreement shall refer to the Amended Credit Agreement. Except as affected by this Amendment, the Loan Documents are unchanged and continue in full force and effect. However, in the event of any inconsistency between the terms of the Amended Credit Agreement and any other Loan Document, the terms of the Amended Credit Agreement shall control and such other document shall be deemed to be amended to conform to the terms of the Amended Credit Agreement. As material part of the consideration for the Administrative Agent and the Lenders entering into this Amendment, Borrower and each Guarantor hereby releases and forever discharges the Administrative Agent and each Lender (and their successors, assigns, affiliates, officers, managers, directors, employees, and agents) from any and all claims, demands, damages, causes of action, or liabilities for actions or omissions (whether arising at law or in equity, and whether direct or indirect) in connection with the Credit Agreement and the other Loan Documents prior to the date
2



of this Amendment, whether or not heretofore asserted, and which Borrower or any Guarantor may have or claim to have against Administrative Agent or any Lender.
6.Miscellaneous.
1.Binding Effect. The Amended Credit Agreement shall be binding upon and inure to the benefit of each of the undersigned and their respective legal representatives, successors and permitted assigns.
2.No Waiver of Defaults. This Amendment does not constitute a waiver of, or a consent to, any present or future violation of or default under, any provision of the Loan Documents, or a waiver of the Administrative Agent’s or any Lender’s right to insist upon future compliance with each term, covenant, condition and provision of the Loan Documents.
3.Form. Each agreement, document, instrument or other writing to be furnished to the Administrative Agent or any Lender under any provision of this Amendment must be in form and substance reasonably satisfactory to the Administrative Agent.
4.Headings. The headings and captions used in this Amendment are for convenience only and will not be deemed to limit, amplify or modify the terms of this Amendment, the Credit Agreement, or the other Loan Documents.
5.Costs, Expenses and Attorneys’ Fees. Borrower agrees to pay or reimburse the Administrative Agent on demand for all its reasonable and invoiced (with separate invoices for each service provider) out-of-pocket costs and expenses incurred in connection with the preparation, negotiation, and execution of this Amendment, including, without limitation, the reasonable and invoiced fees and disbursements of the Administrative Agent’s counsel.
6.Multiple Counterparts; Electronic Signatures. This Amendment and any document, amendment, approval, consent, information, notice, certificate, request, statement, disclosure or authorization related to this Amendment (each a “Communication”), including Communications required to be in writing, may be in the form of an Electronic Record and may be executed using Electronic Signatures. (including, without limitation, facsimile and .pdf) and shall be considered an original, and shall have the same legal effect, validity and enforceability as a paper record. This Amendment may be executed in as many counterparts as necessary or convenient, including both paper and electronic counterparts, but all such counterparts are one and the same Amendment. For the avoidance of doubt, the authorization under this paragraph may include, without limitation, use or acceptance by the Administrative Agent of a manually signed paper Communication which has been converted into electronic form (such as scanned into PDF format), or an electronically signed Communication converted into another format, for transmission, delivery and/or retention. For purposes hereof, “Electronic Record” and “Electronic Signature” shall have the meanings assigned to them, respectively, by 15 USC §7006, as it may be amended from time to time.
7.Governing Law. This Amendment and the other Loan Documents must be construed, and their performance enforced, under Texas law.
7.Entirety. The Loan Documents represent the final agreement between Borrower, the Guarantors, the Lenders and the Administrative Agent and may not be contradicted by evidence of prior, contemporaneous or subsequent oral agreements by the parties. there are no unwritten oral agreements among the parties.
3



Remainder of Page Intentionally Blank.
Signature Pages to Follow.

4



This Amendment is executed as of the Effective Date.
    
BORROWER:

TEXAS OIL & CHEMICAL CO. II, INC.


By: /s/ S. Sami Ahmad
Name: S. Sami Ahmad
Title: Treasurer
GUARANTORS:

    SOUTH HAMPTON RESOURCES, INC.


By: /s/ S. Sami Ahmad
Name: S. Sami Ahmad
Title: Treasurer

    GULF STATE PIPE LINE COMPANY, INC.


By: /s/ S. Sami Ahmad
Name: S. Sami Ahmad
Title: Treasurer

    TRECORA CHEMICAL, INC.

    
By: /s/ S. Sami Ahmad
Name: S. Sami Ahmad
Title: Treasurer


Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)


ADMINISTRATIVE AGENT:

BANK OF AMERICA, N.A.,
as Administrative Agent


/s/ Anthony W. Kell
Name: Anthony W. Kell
Title: Vice President
Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)


LENDER:

BANK OF AMERICA, N.A.,
as a Lender, L/C Issuer and Swingline Lender


By: /s/ Adam Rose
Adam Rose
Senior Vice President
Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)


LENDER:

CITIBANK, N.A.,
as a Lender and L/C Issuer

By: /s/ Randy Humphreys
Name: Randy Humphreys
Title: Director – Head of Central Mid Corporate Banking

Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)


LENDER:

BMO HARRIS BANK N.A.,
as a Lender

By: /s/ Jason Deegan
Name: Jason Deegan
Title: Director

Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)


LENDER:

CAPITAL ONE, N.A.,
as a Lender


By: /s/ Lewis Gissel
Name: Lewis Gissel
Title: Senior Vice President
Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)



LENDER:

REGIONS BANK,
as a Lender


By: /s/ Philip A. Ugalde
Name: Philip A. Ugalde
                        Title: SVP

Signature Page to
Eighth Amendment to Amended and Restated Credit Agreement
(Texas Oil & Chemical Co. II, Inc.)