Exhibit 10.5

      Restated Guaranty Agreement   (PNC BANK LOGO) [w37954w3795401.gif]      

     THIS RESTATED GUARANTY AGREEMENT (this “Guaranty”) is made and entered into
as of this 31st day of July, 2007, by H.F. LENFEST, an individual (the
“Guarantor”), with an address at 300 Barr Harbor Drive, Suite 460, West
Conshohocken, PA 19428, in consideration of the extension of credit by PNC BANK,
NATIONAL ASSOCIATION (the “Bank”), with an address at 1000 Westlakes Drive,
Suite 200, Berwyn, PA 19312, to ENVIRONMENTAL TECTONICS CORPORATION (the
“Borrower”), and other good and valuable consideration, the receipt and
sufficiency of which are hereby acknowledged. This Guaranty restates and
replaces (but does not constitute a novation of) the existing Restated Limited
Guaranty Agreement from the Guarantor to the Bank dated as of November 16, 2006.
1. Guaranty of Obligations. The Guarantor hereby unconditionally guarantees, as
a primary obligor, and becomes surety for, the prompt payment and performance of
all loans, advances, debts, liabilities, reimbursement and other obligations,
covenants and duties owing by the Borrower to the Bank of any kind or nature,
present or future (including any interest accruing thereon after maturity, or
after the filing of any petition in bankruptcy, or the commencement of any
insolvency, reorganization or like proceeding relating to the Borrower, whether
or not a claim for post-filing or post-petition interest is allowed in such
proceeding), whether direct or indirect (including those acquired by assignment
or participation), absolute or contingent, joint or several, due or to become
due, now existing or hereafter arising under the revolving credit facility
established under that certain amended and restated Letter Agreement between the
Borrower and the Bank dated as of July 31, 2007, (as hereafter amended, modified
or supplemented, the “Credit Agreement”), the Amended and Restated Reimbursement
Agreement for Letters of Credit from the Borrower in favor of the Bank dated as
of July 31, 2007 (as hereafter amended, modified or supplemented, the
“Reimbursement Agreement” and the Note and Letters of Credit (as those terms are
defined in the Credit Agreement) heretofore or hereafter issued pursuant
thereto, and any amendments, extensions, renewals and increases of or to the
foregoing, and all costs and expenses of the Bank incurred in the modification,
enforcement, collection and otherwise in connection with the foregoing,
including reasonable attorneys’ fees and expenses (hereinafter referred to
collectively as the “Obligations”). If the Borrower defaults under any such
Obligations, the Guarantor will pay the amount due to the Bank.
2. Nature of Guaranty; Waivers. This is a guaranty of payment and not of
collection and the Bank shall not be required, as a condition of the Guarantor’s
liability, to make any demand upon or to pursue any of its rights against the
Borrower, or to pursue any rights which may be available to it with respect to
any other person who may be liable for the payment of the Obligations.
     This is an absolute, unconditional, irrevocable and continuing guaranty and
will remain in full force and effect until all of the Obligations have been
indefeasibly paid in full, and the Bank has terminated this Guaranty. This
Guaranty will remain in full force and effect even if there is no principal
balance or other amounts outstanding under the Obligations at a particular time
or from time to time. This Guaranty will not be affected by any surrender,
exchange, acceptance, compromise or release by the Bank of any other party, or
any other guaranty or any security held by it for any of the Obligations, by any
failure of the Bank to take any steps to perfect or maintain its lien or
security interest in or to preserve its rights to any security or other
collateral for any of the Obligations or any guaranty, or by any irregularity,
unenforceability or invalidity of any of the Obligations or any part thereof or
any security or

 

--------------------------------------------------------------------------------

 

other guaranty thereof. The Guarantor’s obligations hereunder shall not be
affected, modified or impaired by any counterclaim, set-off, recoupment,
deduction or defense based upon any claim the Guarantor may have (directly or
indirectly) against the Borrower or the Bank, except payment or performance of
the Obligations.
     Notice of acceptance of this Guaranty, notice of extensions of credit to
the Borrower from time to time, notice of default, diligence, presentment,
notice of dishonor, protest, demand for payment, and any defense based upon the
Bank’s failure to comply with the notice requirements under Sections 9-611 and
9-612 of the Uniform Commercial Code as in effect from time to time are hereby
waived. The Guarantor waives all defenses based on suretyship or impairment of
collateral.
     The Bank at any time and from time to time, without notice to or the
consent of the Guarantor, and without impairing or releasing, discharging or
modifying the Guarantor’s liabilities hereunder, may (a) change the manner,
place, time or terms of payment or performance of or interest rates on, or other
terms relating to, any of the Obligations; (b) renew, substitute, modify, amend
or alter, or grant consents or waivers relating to any of the Obligations, any
other guaranties, or any security for any Obligations or guaranties; (c) apply
any and all payments by whomever paid or however realized including any proceeds
of any collateral, to any Obligations of the Borrower in such order, manner and
amount as the Bank may determine in its sole discretion; (d) settle, compromise
or deal with any other person, including the Borrower or the Guarantor, with
respect to any Obligations in such manner as the Bank deems appropriate in its
sole discretion; (e) substitute, exchange or release any security or guaranty;
or (f) take such actions and exercise such remedies hereunder as provided
herein.
3. Repayments or Recovery from the Bank. If any demand is made at any time upon
the Bank for the repayment or recovery of any amount received by it in payment
or on account of any of the Obligations and if the Bank repays all or any part
of such amount by reason of any judgment, decree or order of any court or
administrative body or by reason of any settlement or compromise of any such
demand, the Guarantor will be and remain liable hereunder for the amount so
repaid or recovered to the same extent as if such amount had never been received
originally by the Bank. The provisions of this section will be and remain
effective notwithstanding any contrary action which may have been taken by the
Guarantor in reliance upon such payment, and any such contrary action so taken
will be without prejudice to the Bank’s rights hereunder and will be deemed to
have been conditioned upon such payment having become final and irrevocable.
4. Financial Statements. Unless compliance is waived in writing by the Bank or
until all of the Obligations have been paid in full, the Guarantor will promptly
submit to the Bank such information relating to the Guarantor’s affairs
(including, but not limited to, semi-annual investment statements for the
Guarantor within 60 days following each June 30 and December 31 and tax returns
for the Guarantor within 30 days following the filing thereof) or any security
for the Guaranty at any time provided by the Guarantor as the Bank may
reasonably request.
5. Enforceability of Obligations. No modification, limitation or discharge of
the Obligations arising out of or by virtue of any bankruptcy, reorganization or
similar proceeding for relief of debtors under federal or state law will affect,
modify, limit or discharge the Guarantor’s liability in any manner whatsoever
and this Guaranty will remain and continue in full force and effect and will be
enforceable against the Guarantor to the same extent and with the same force and
effect as if any such proceeding had not been instituted. The Guarantor waives
all rights and benefits which might accrue to it by reason of any such
proceeding and will be liable to the full extent hereunder, irrespective of any
modification, limitation or discharge of the liability of the Borrower that may
result from any such proceeding.

2

--------------------------------------------------------------------------------

 

6. Events of Default. The occurrence of any of the following shall be an “Event
of Default”: (i) any Event of Default (as defined in any of the Obligations);
(ii) any default under any of the Obligations that does not have a defined set
of “Events of Default” and the lapse of any notice or cure period provided in
such Obligation with respect to such default, (iii) the Guarantor’s failure to
perform any of its obligations hereunder; (iv) the falsity, inaccuracy or
material breach by the Guarantor of any written warranty, representation or
statement made or furnished to the Bank by or on behalf of the Guarantor;
(v) the termination or attempted termination of this Guaranty; (vi) the
Guarantor shall commence any case, proceeding or other action (A) under any
existing or future law of any jurisdiction, domestic or foreign, relating to
bankruptcy, insolvency or relief of debtors, seeking to have an order for relief
entered with respect to it, or seeking to adjudicate it a bankrupt or insolvent,
or seeking arrangement, adjustment, winding-up, liquidation, composition or
other relief with respect to it or its debts, or (B) seeking appointment of a
receiver, trustee, custodian or other similar official for it or for all or any
substantial part of its assets, or the Guarantor shall make a general assignment
for the benefit of its creditors; or (vii) there shall be commenced against the
Guarantor any case, proceeding or other action of a nature referred to in clause
(v) above which (A) results in the entry of an order for relief or any such
adjudication or appointment or (B) remains undismissed, undischarged or unbonded
for a period of 60 days. Upon the occurrence of any Event of Default, (a) the
Guarantor shall pay to the Bank the amount of the Obligations; or (b) on demand
of the Bank, the Guarantor shall immediately deposit with the Bank, in U.S.
dollars, all amounts due or to become due under the Obligations, and the Bank
may at any time use such funds to repay the Obligations; or (c) the Bank in its
discretion may exercise with respect to any collateral any one or more of the
rights and remedies provided a secured party under the applicable version of the
Uniform Commercial Code; or (d) the Bank in its discretion may exercise from
time to time any other rights and remedies available to it at law, in equity or
otherwise.
7. Right of Setoff. In addition to all liens upon and rights of setoff against
the Guarantor’s money, securities or other property given to the Bank by law,
the Bank shall have, with respect to the Guarantor’s obligations to the Bank
under this Guaranty and to the extent permitted by law, a contractual possessory
security interest in and a contractual right of setoff against, and the
Guarantor hereby grants Bank a security interest in, and hereby assigns,
conveys, delivers, pledges and transfers to the Bank all of the Guarantor’s
right, title and interest in and to, all of the Guarantor’s deposits, moneys,
securities and other property now or hereafter in the possession of or on
deposit with, or in transit to, the Bank or any other direct or indirect
subsidiary of The PNC Financial Services Group, Inc., whether held in a general
or special account or deposit, whether held jointly with someone else, or
whether held for safekeeping or otherwise, excluding, however, all IRA, Keogh,
and trust accounts. Every such security interest and right of setoff may be
exercised without demand upon or notice to the Guarantor. Every such right of
setoff shall be deemed to have been exercised immediately upon the occurrence of
an Event of Default hereunder without any action of the Bank, although the Bank
may enter such setoff on its books and records at a later time.
8. Collateral. This Guaranty is secured by the property described in any
collateral security documents which the Guarantor may in the future grant to the
Bank to secure any Obligations of the Guarantor to the Bank.
9. Costs. To the extent that the Bank incurs any costs or expenses in protecting
or enforcing its rights under the Obligations or this Guaranty, including
reasonable attorneys’ fees and the costs and expenses of litigation, such costs
and expenses will be due on demand, will be included in the Obligations and will
bear interest from the incurring or payment thereof at the default interest rate
provided under the Credit Agreement.
10. Postponement of Subrogation. Until the Obligations are indefeasibly paid in
full, expire, are terminated and are not subject to any right of revocation or
rescission, the Guarantor postpones and

3

--------------------------------------------------------------------------------

 

subordinates in favor of the Bank or its designee (and any assignee or potential
assignee) any and all rights which the Guarantor may have to (a) assert any
claim whatsoever against the Borrower based on subrogation, exoneration,
reimbursement, or indemnity or any right of recourse to security for the
Obligations with respect to payments made hereunder, and (b) any realization on
any property of the Borrower, including participation in any marshalling of the
Borrower’s assets.
11. Notices. All notices, demands, requests, consents, approvals and other
communications required or permitted hereunder (“Notices”) must be in writing
and will be effective upon receipt. Notices may be given in any manner to which
the Bank and the Guarantor may separately agree, including electronic mail.
Without limiting the foregoing, first-class mail, facsimile transmission and
commercial courier service are hereby agreed to as acceptable methods for giving
Notices. Regardless of the manner in which provided, Notices may be sent to
addresses for the Bank and the Guarantor as set forth above or to such other
address as either may give to the other for such purpose in accordance with this
section.
12. Preservation of Rights. No delay or omission on the Bank’s part to exercise
any right or power arising hereunder will impair any such right or power or be
considered a waiver of any such right or power, nor will the Bank’s action or
inaction impair any such right or power. The Bank’s rights and remedies
hereunder are cumulative and not exclusive of any other rights or remedies which
the Bank may have under other agreements, at law or in equity. The Bank may
proceed in any order against the Borrower, the Guarantor or any other obligor
of, or collateral securing, the Obligations.
13. Illegality. If any provision contained in this Guaranty should be invalid,
illegal or unenforceable in any respect, it shall not affect or impair the
validity, legality and enforceability of the remaining provisions of this
Guaranty.
14. Changes in Writing. No modification, amendment or waiver of, or consent to
any departure by the Guarantor from, any provision of this Guaranty will be
effective unless made in a writing signed by the Bank, and then such waiver or
consent shall be effective only in the specific instance and for the purpose for
which given. No notice to or demand on the Guarantor will entitle the Guarantor
to any other or further notice or demand in the same, similar or other
circumstance.
15. Entire Agreement. This Guaranty (including the documents and instruments
referred to herein) constitutes the entire agreement and supersedes all other
prior agreements and understandings, both written and oral, between the
Guarantor and the Bank with respect to the subject matter hereof; provided,
however, that this Guaranty is in addition to, and not in substitution for, any
other guarantees from the Guarantor to the Bank.
16. Successors and Assigns. This Guaranty will be binding upon and inure to the
benefit of the Guarantor and the Bank and their respective heirs, executors,
administrators, successors and assigns; provided, however, that the Guarantor
may not assign this Guaranty in whole or in part without the Bank’s prior
written consent and the Bank at any time may assign this Guaranty in whole or in
part.
17. Interpretation. In this Guaranty, unless the Bank and the Guarantor
otherwise agree in writing, the singular includes the plural and the plural the
singular; references to statutes are to be construed as including all statutory
provisions consolidating, amending or replacing the statute referred to; the
word “or” shall be deemed to include “and/or”, the words “including”, “includes”
and “include” shall be deemed to be followed by the words “without limitation”;
and references to sections or exhibits are to those of this Guaranty. Section
headings in this Guaranty are included for convenience of reference only and
shall not constitute a part of this Guaranty for any other purpose. If this
Guaranty is executed by more than one party as Guarantor, the obligations of
such persons or entities will be joint and several.

4

--------------------------------------------------------------------------------

 

18. Governing Law and Jurisdiction. This Guaranty has been delivered to and
accepted by the Bank and will be deemed to be made in the State where the Bank’s
office indicated above is located. This Guaranty will be interpreted and the
rights and liabilities of the Bank and the Guarantor determined in accordance
with the laws of the State where the Bank’s office indicated above is located,
excluding its conflict of laws rules. The Guarantor hereby irrevocably consents
to the exclusive jurisdiction of any state or federal court in the county or
judicial district where the Bank’s office indicated above is located; provided
that nothing contained in this Guaranty will prevent the Bank from bringing any
action, enforcing any award or judgment or exercising any rights against the
Guarantor individually, against any security or against any property of the
Guarantor within any other county, state or other foreign or domestic
jurisdiction. The Guarantor acknowledges and agrees that the venue provided
above is the most convenient forum for both the Bank and the Guarantor. The
Guarantor waives any objection to venue and any objection based on a more
convenient forum in any action instituted under this Guaranty.
19. Equal Credit Opportunity Act. If the Guarantor is not an “applicant for
credit” under Section 202.2 (e) of the Equal Credit Opportunity Act of 1974
(“ECOA”), the Guarantor acknowledges that (i) this Guaranty has been executed to
provide credit support for the Obligations, and (ii) the Guarantor was not
required to execute this Guaranty in violation of Section 202.7(d) of ECOA.
20. Authorization to Obtain Credit Reports. By signing below, the Guarantor
provides written authorization to the Bank or its designee (and any assignee or
potential assignee) to obtain the Guarantor’s personal credit profile from one
or more national credit bureaus. Such authorization shall extend to obtaining a
credit profile in considering this Guaranty and subsequently for the purposes of
update, renewal or extension of such credit or additional credit and for
reviewing or collecting the resulting account.
21. Waiver of Jury Trial. The Guarantor irrevocably waives any and all right the
Guarantor may have to a trial by jury in any action, proceeding or claim of any
nature relating to this Guaranty, any documents executed in connection with this
Guaranty or any transaction contemplated in any of such documents. The Guarantor
acknowledges that the foregoing waiver is knowing and voluntary.
     The Guarantor acknowledges that it has read and understood all the
provisions of this Guaranty, including the waiver of jury trial, and has been
advised by counsel as necessary or appropriate.
     WITNESS the due execution hereof as a document under seal, as of the date
first written above, with the intent to be legally bound hereby.
WITNESS:

                     
 
                                /s/                
 
   
 
            H.F. Lenfest (SEAL)    
 
                   
Print Name: 
                   
 
 
                 
 
                    Acknowledged and accepted:                

              PNC BANK NATIONAL ASSOCIATION    
 
           
By:
Title:
                      /s/    
 
             

5