Exhibit 10.4 AMENDED AND RESTATED -------------------- GENERAL CONTINUING GUARANTY --------------------------- THIS AMENDED AND RESTATED GENERAL CONTINUING GUARANTY ("Guaranty"), dated as of August 29, 2001, is executed and delivered by each of the Guarantors (as defined below), in favor of Foothill Capital Corporation, a California corporation ("Guarantied Party"), with reference to the following: WHEREAS, MicroStrategy Incorporated, a Delaware corporation ("Parent") and MicroStrategy Services Corporation, a Delaware corporation ("Borrower"), and Guarantied Party have entered into that certain Amended and Restated Loan and Security Agreement, dated as of June 14, 2001 (as the same may be further amended, restated or otherwise modified from time to time, the "Loan Agreement"); WHEREAS, Parent, Aventine, Incorporated, a Delaware corporation, MicroStrategy Capital Corporation, a Delaware corporation, MicroStrategy Management Corporation, a Delaware corporation, and Strategy.com, Incorporated, a Delaware corporation (each a "Guarantor" and collectively, the "Guarantors"), are all Affiliates of Borrower, and each Guarantor will benefit from Guarantied Party's agreement to make financial accommodations to Borrower; and WHEREAS, in order to induce Guarantied Party to extend financial and other accommodations to Borrower pursuant to the Loan Agreement and the Consent and Amendment Number One to the Loan Agreement, and in consideration thereof, and in consideration of any loans or other financial accommodations heretofore or hereafter extended by Guarantied Party to Borrower, whether pursuant to the Loan Agreement or otherwise, each Guarantor has agreed to guaranty the Guarantied Obligations and to amend and restate this Guaranty to add Strategy.com Incorporated as a Guarantor. NOW, THEREFORE, in consideration of the foregoing, each Guarantor hereby agrees, in favor of Guarantied Party, as follows: 1. Definitions and Construction. (a) Definitions. Capitalized terms used herein and not otherwise defined herein shall have the meanings ascribed to them in the Loan Agreement. The following terms, as used in this Guaranty, shall have the following meanings: "Borrower" shall have the meaning set forth in the recitals to this Guaranty. "Guarantied Obligations" shall mean: the due and punctual payment of the principal of, and interest (including, any and all interest which, but for the application of the provisions of the Bankruptcy Code, would have accrued on such amounts) on, any and all premium on, and any and all 1 fees, costs, and expenses (including, any and all fees, costs, and expenses which, but for the application of the provisions of the Bankruptcy Code, would have accrued on such amounts) incurred in connection with or on the Indebtedness owed by Borrower to Guarantied Party pursuant to the terms of the Loan Documents. "Guarantied Party" shall have the meaning set forth in the preamble to this Guaranty. "Guarantor" or "Guarantors" shall have the respective meaning set forth in the preamble to this Guaranty. "Guaranty" shall have the meaning set forth in the preamble to this Guaranty. "Indebtedness" shall mean any and all obligations, indebtedness, or liabilities of any kind or character owed by Borrower to Guarantied Party and arising directly or indirectly out of or in connection with the Loan Agreement or the other Loan Documents, including all such obligations, indebtedness, or liabilities, whether for principal, interest (including any and all interest which, but for the application of the provisions of the Bankruptcy Code, would have accrued on such amounts), premium, reimbursement obligations, fees, costs, expenses (including attorneys fees), or indemnity obligations, whether heretofore, now, or hereafter made, incurred, or created, whether voluntarily or involuntarily made, incurred, or created, whether secured or unsecured (and if secured, regardless of the nature or extent of the security), whether absolute or contingent, liquidated or unliquidated, or determined or indeterminate, whether Borrower is liable individually or jointly with others, and whether recovery is or hereafter becomes barred by any statute of limitations or otherwise becomes unenforceable for any reason whatsoever, including any act or failure to act by Guarantied Party. "Loan Agreement" shall have meaning set forth in the recitals to this Guaranty. "Parent" shall have meaning set forth in the recitals to this Guaranty. (b) Construction. Unless the context of this Guaranty clearly requires otherwise, references to the plural include the singular, references to the singular include the plural, the part includes the whole, the terms "include" and "including" are not limiting, and the term "or" has the inclusive meaning represented by the phrase "and/or." The words "hereof," "herein," "hereby," "hereunder," and other similar terms refer to this Guaranty as a whole and not to any particular provision of this Guaranty. Any reference in this Guaranty to any of the following documents includes any and all alterations, amendments, restatements, extensions, modifications, renewals, or supplements thereto or thereof, as applicable: the Loan Agreement; this Guaranty; and the other Loan Documents. Neither this Guaranty nor any uncertainty or ambiguity herein shall be construed or resolved against Guarantied Party or a Guarantor, whether under any rule of construction or otherwise. On the contrary, this Guaranty has been reviewed 2 by each Guarantor, Guarantied Party, and their respective counsel, and shall be construed and interpreted according to the ordinary meaning of the words used so as to fairly accomplish the purposes and intentions of Guarantied Party and each Guarantor. 2. Guarantied Obligations. Each Guarantor, individually and collectively, jointly and severally, hereby irrevocably and unconditionally guaranties to Guarantied Party, as and for its own debt, until final and indefeasible payment thereof has been made, (a) the payment of the Guarantied Obligations, in each case when and as the same shall become due and payable, whether at maturity, pursuant to a mandatory prepayment requirement, by acceleration, or otherwise; it being the intent of such Guarantor that the guaranty set forth herein shall be a guaranty of payment and not a guaranty of collection; and (b) the punctual and faithful performance, keeping, observance, and fulfillment by Borrower of all of the agreements, conditions, covenants, and obligations of Borrower contained in the Loan Agreement and under each of the other Loan Documents. 3. Continuing Guaranty. This Guaranty includes Guarantied Obligations arising under successive transactions continuing, compromising, extending, increasing, modifying, releasing, or renewing the Guarantied Obligations, changing the interest rate, payment terms, or other terms and conditions thereof, or creating new or additional Guarantied Obligations after prior Guarantied Obligations have been satisfied in whole or in part. To the maximum extent permitted by law, each Guarantor hereby waives any right to revoke this Guaranty as to future Indebtedness. If such a revocation is effective notwithstanding the foregoing waiver, each Guarantor acknowledges and agrees that (a) no such revocation shall be effective until written notice thereof has been received by Guarantied Party, (b) no such revocation shall apply to any Guarantied Obligations in existence on such date (including any subsequent continuation, extension, or renewal thereof, or change in the interest rate, payment terms, or other terms and conditions thereof), (c) no such revocation shall apply to any Guarantied Obligations made or created after such date to the extent made or created pursuant to a legally binding commitment of Guarantied Party in existence on the date of such revocation, (d) no payment by any Guarantor, Borrower, or from any other source, prior to the date of such revocation shall reduce the maximum obligation of such Guarantor hereunder, and (e) any payment by Borrower or from any source other than such Guarantor subsequent to the date of such revocation shall first be applied to that portion of the Guarantied Obligations as to which the revocation is effective and which are not, therefore, guarantied hereunder, and to the extent so applied shall not reduce the maximum obligation of such Guarantor hereunder. 4. Performance Under this Guaranty. In the event that Borrower fails to make any payment of any Guarantied Obligations, on or before the due date thereof, or if Borrower shall fail to perform, keep, observe, or fulfill any other obligation referred to in clause (b) of Section 2 hereof in the manner provided in the Loan Agreement or the other Loan Documents, as applicable, each Guarantor immediately shall cause such payment to be made or each of such obligations to be performed, kept, observed, or fulfilled. 3 5. Primary Obligations. This Guaranty is a primary and original obligation of each Guarantor, is not merely the creation of a surety relationship, and is an absolute, unconditional, and continuing guaranty of payment and performance which shall remain in full force and effect without respect to future changes in conditions. Each Guarantor agrees that it is directly, jointly and severally with any other guarantor of the Guarantied Obligations, liable to Guarantied Party, that the obligations of such Guarantor hereunder are independent of the obligations of Borrower or any other guarantor, and that a separate action may be brought against such Guarantor, whether such action is brought against Borrower or any other guarantor or whether Borrower or any other guarantor is joined in such action. Each Guarantor agrees that its liability hereunder shall be immediate and shall not be contingent upon the exercise or enforcement by Guarantied Party of whatever remedies it may have against Borrower or any other guarantor, or the enforcement of any lien or realization upon any security Guarantied Party may at any time possess. Each Guarantor agrees that any release which may be given by Guarantied Party to Borrower or any other guarantor shall not release such Guarantor. Each Guarantor consents and agrees that Guarantied Party shall be under no obligation to marshal any property or assets of Borrower or any other guarantor in favor of such Guarantor, or against or in payment of any or all of the Guarantied Obligations. 6. Waivers. (a) To the fullest extent permitted by applicable law, each Guarantor hereby waives: (i) notice of acceptance hereof; (ii) notice of any loans or other financial accommodations made or extended under the Loan Agreement, or the creation or existence of any Guarantied Obligations; (iii) notice of the amount of the Guarantied Obligations, subject, however, to such Guarantor's right to make inquiry of Guarantied Party to ascertain the amount of the Guarantied Obligations at any reasonable time; (iv) notice of any adverse change in the financial condition of Borrower or of any other fact that might increase such Guarantor's risk hereunder; (v) notice of presentment for payment, demand, protest, and notice thereof as to any instrument among the Loan Documents; (vi) notice of any Default or Event of Default under the Loan Agreement; and (vii) all other notices (except if such notice is specifically required to be given to such Guarantor under this Guaranty or any other Loan Documents to which such Guarantor is a party) and demands to which such Guarantor might otherwise be entitled. (b) To the fullest extent permitted by applicable law, each Guarantor waives the right by statute or otherwise to require Guarantied Party to institute suit against Borrower or to exhaust any rights and remedies which Guarantied Party has or may have against Borrower. In this regard, each Guarantor agrees that it is bound to the payment of each and all Guarantied Obligations, whether now existing or hereafter arising, as fully as if such Guarantied Obligations were directly owing to Guarantied Party by such Guarantor. Each Guarantor further waives any defense arising by reason of any disability or other defense (other than the defense that the Guarantied Obligations shall have been fully and finally performed and indefeasibly paid in full in cash) of Borrower or by reason of the cessation from any cause whatsoever of the liability of Borrower in respect thereof. 4 (c) To the fullest extent permitted by applicable law, each Guarantor hereby waives: (i) any rights to assert against Guarantied Party any defense (legal or equitable), set-off, counterclaim, or claim which such Guarantor may now or at any time hereafter have against Borrower or any other party liable to Guarantied Party; (ii) any defense, set-off, counterclaim, or claim, of any kind or nature, arising directly or indirectly from the present or future lack of perfection, sufficiency, validity, or enforceability of the Guarantied Obligations or any security therefor; (iii) any defense arising by reason of any claim or defense based upon an election of remedies by Guarantied Party including any defense based upon an election of remedies by Guarantied Party under the provisions of ss. 580d and 726 of the California Code of Civil Procedure, or any similar law of California or any other jurisdiction; (iv) the benefit of any statute of limitations affecting such Guarantor's liability hereunder or the enforcement thereof, and any act which shall defer or delay the operation of any statute of limitations applicable to the Guarantied Obligations shall similarly operate to defer or delay the operation of such statute of limitations applicable to such Guarantor's liability hereunder. (d) Until such time as all of the Guarantied Obligations (excluding any Guarantied Obligations with respect to the Warrant and the Registration Rights Agreement) have been fully, finally, and indefeasibly paid in full in cash: (i) each Guarantor hereby postpones any right of subrogation such Guarantor has or may have as against Borrower with respect to the Guarantied Obligations; (ii) in addition, each Guarantor hereby postpones any right to proceed against Borrower or any other Person, now or hereafter, for contribution, indemnity, reimbursement, or any other suretyship rights and claims (irrespective of whether direct or indirect, liquidated or contingent), with respect to the Guarantied Obligations; and (iii) in addition, each Guarantor also hereby postpones any right to proceed or to seek recourse against or with respect to any property or asset of Borrower. (e) WITHOUT LIMITING THE GENERALITY OF ANY OTHER WAIVER OR OTHER PROVISION SET FORTH IN THIS GUARANTY, EACH GUARANTOR HEREBY WAIVES, TO THE MAXIMUM EXTENT SUCH WAIVER IS PERMITTED BY LAW, ANY AND ALL BENEFITS OR DEFENSES ARISING DIRECTLY OR INDIRECTLY UNDER ANY ONE OR MORE OF CALIFORNIA CIVIL CODE SS. 2799, 2808, 2809, 2810, 2815, 2819, 2820, 2821, 2822, 2838, 2839, 2845, 2847, 2848, 2849, AND 2850, CALIFORNIA CODE OF CIVIL PROCEDURE SS. 580a, 580b, 580c, 580d, AND 726, AND CHAPTER 2 OF TITLE 14 OF THE CALIFORNIA CIVIL CODE. (f) WITHOUT LIMITING THE GENERALITY OF ANY OTHER WAIVER OR OTHER PROVISION SET FORTH IN THIS GUARANTY, EACH GUARANTOR WAIVES ALL RIGHTS AND DEFENSES ARISING OUT OF AN ELECTION OF REMEDIES BY THE GUARANTIED PARTY, EVEN THOUGH THAT ELECTION OF REMEDIES, SUCH AS A NONJUDICIAL FORECLOSURE WITH RESPECT TO SECURITY FOR A GUARANTIED OBLIGATION, HAS DESTROYED SUCH GUARANTOR'S RIGHTS OF SUBROGATION AND REIMBURSEMENT AGAINST BORROWER BY THE OPERATION OF SECTION 580d OF THE CALIFORNIA CODE OF CIVIL PROCEDURE OR OTHERWISE. 5 7. Releases. Each Guarantor consents and agrees that, without notice to or by such Guarantor and without affecting or impairing the obligations of such Guarantor hereunder, Guarantied Party may, by action or inaction, compromise or settle, extend the period of duration or the time for the payment, or discharge the performance of, or may refuse to, or otherwise not enforce, or may, by action or inaction, release all or any one or more parties to, any one or more of the terms and provisions of the Loan Agreement or any of the other Loan Documents or may grant other indulgences to Borrower in respect thereof, or may amend or modify in any manner and at any time (or from time to time) any one or more of the Loan Agreement or any of the other Loan Documents, or may, by action or inaction, release or substitute any other guarantor, if any, of the Guarantied Obligations, or may enforce, exchange, release, or waive, by action or inaction, any security for the Guarantied Obligations or any other guaranty of the Guarantied Obligations, or any portion thereof. 8. No Election. Guarantied Party shall have the right to seek recourse against each Guarantor to the fullest extent provided for herein and no election by Guarantied Party to proceed in one form of action or proceeding, or against any party, or on any obligation, shall constitute a waiver of Guarantied Party's right to proceed in any other form of action or proceeding or against other parties unless Guarantied Party has expressly waived such right in writing. Specifically, but without limiting the generality of the foregoing, no action or proceeding by Guarantied Party under any document or instrument evidencing the Guarantied Obligations shall serve to diminish the liability of a Guarantor under this Guaranty except to the extent that Guarantied Party finally and unconditionally shall have realized indefeasible payment by such action or proceeding. 9. Indefeasible Payment. The Guarantied Obligations shall not be considered indefeasibly paid for purposes of this Guaranty unless and until all payments to Guarantied Party are no longer subject to any right on the part of any person whomsoever, including Borrower, Borrower as a debtor in possession, or any trustee (whether appointed under the Bankruptcy Code or otherwise) of any Borrower's assets to invalidate or set aside such payments or to seek to recoup the amount of such payments or any portion thereof, or to declare same to be fraudulent or preferential. In the event that, for any reason, all or any portion of such payments to Guarantied Party is set aside or restored, whether voluntarily or involuntarily, after the making thereof, the obligation or part thereof intended to be satisfied thereby shall be revived and continued in full force and effect as if said payment or payments had not been made and each Guarantor shall be liable for the full amount Guarantied Party is required to repay plus any and all costs and expenses (including reasonable attorneys fees) paid by Guarantied Party in connection therewith. 10. Financial Condition of Borrower. Each Guarantor represents and warrants to Guarantied Party that it is currently informed of the financial condition of Borrower and of all other circumstances which a diligent inquiry would reveal and which bear upon the risk of nonpayment of the Guarantied Obligations. Each Guarantor further represents and warrants to Guarantied Party that it has read and understands the terms and conditions of the Loan Agreement and the other Loan Documents. Each Guarantor hereby covenants that it will continue to keep 6 itself informed of Borrower's financial condition, the financial condition of other guarantors, if any, and of all other circumstances which bear upon the risk of nonpayment or nonperformance of the Guarantied Obligations. 11. Payments; Application. All payments to be made hereunder by a Guarantor shall be made in lawful money of the United States of America at the time of payment, shall be made in immediately available funds, and shall be made without deduction (whether for taxes or otherwise) or offset. All payments made by a Guarantor hereunder shall be applied as follows: first, to all reasonable costs and expenses (including reasonable attorneys fees) incurred by Guarantied Party in enforcing this Guaranty or in collecting the Guarantied Obligations; second, to all accrued and unpaid interest, premium, if any, and fees owing to Guarantied Party constituting Guarantied Obligations; and third, to the balance of the Guarantied Obligations. 12. Attorneys Fees and Costs. Each Guarantor agrees to pay, on demand, all reasonable attorneys fees and all other reasonable costs and expenses which may be incurred by Guarantied Party in the enforcement of this Guaranty or in any way arising out of, or consequential to the protection, assertion, or enforcement of the Guarantied Obligations (or any security therefor), irrespective of whether suit is brought. 13. Notices. Unless otherwise specifically provided in this Guaranty, any notice or other communication relating to this Guaranty shall be made in accordance with the terms of the Loan Agreement. 14. Cumulative Remedies. No remedy under this Guaranty, under the Loan Agreement, or any other Loan Document is intended to be exclusive of any other remedy, but each and every remedy shall be cumulative and in addition to any and every other remedy given under this Guaranty, under the Loan Agreement, or any other Loan Document, and those provided by law. No delay or omission by Guarantied Party to exercise any right under this Guaranty shall impair any such right nor be construed to be a waiver thereof. No failure on the part of Guarantied Party to exercise, and no delay in exercising, any right under this Guaranty shall operate as a waiver thereof; nor shall any single or partial exercise of any right under this Guaranty preclude any other or further exercise thereof or the exercise of any other right. 15. Severability of Provisions. Any provision of this Guaranty which is prohibited or unenforceable under applicable law shall be ineffective to the extent of such prohibition or unenforceability without invalidating the remaining provisions hereof. 16. Entire Agreement; Amendments. This Guaranty constitutes the entire agreement between the Guarantors and Guarantied Party pertaining to the subject matter contained herein. This Guaranty may not be altered, amended, or modified, nor may any provision hereof be waived or noncompliance therewith consented to, except by means of a writing executed by each Guarantor and Guarantied Party. Any such alteration, amendment, modification, waiver, or consent shall be effective only to the extent specified therein and for the specific purpose for which given. No course of dealing and no delay or waiver of any right or default under this Guaranty shall be deemed a waiver of any 7 other, similar or dissimilar, right or default or otherwise prejudice the rights and remedies hereunder. 17. Successors and Assigns. This Guaranty shall be binding upon Guarantor and its successors and assigns and shall inure to the benefit of the successors and assigns of Guarantied Party; provided, however, Guarantor shall not assign this Guaranty or delegate any of its duties hereunder without Guarantied Party's prior written consent and any unconsented to assignment shall be absolutely void. In the event of any assignment or other transfer of rights by Guarantied Party, the rights and benefits herein conferred upon Guarantied Party shall automatically extend to and be vested in such assignee or other transferee. 18. No Third Party Beneficiary. This Guaranty is solely for the benefit of Guarantied Party and its successors and assigns and may not be relied on by any other Person. 19. CHOICE OF LAW AND VENUE; JURY TRIAL WAIVER THE VALIDITY OF THIS GUARANTY, ITS CONSTRUCTION, INTERPRETATION, AND ENFORCEMENT, AND THE RIGHTS OF THE PARTIES HERETO WITH RESPECT TO ALL MATTERS ARISING HEREUNDER OR RELATED HERETO SHALL BE DETERMINED UNDER, GOVERNED BY, AND CONSTRUED IN ACCORDANCE WITH THE LAWS OF THE STATE OF CALIFORNIA. THE PARTIES AGREE THAT ALL ACTIONS OR PROCEEDINGS ARISING IN CONNECTION WITH THIS GUARANTY SHALL BE TRIED AND LITIGATED ONLY IN THE STATE AND FEDERAL COURTS LOCATED IN THE COUNTY OF LOS ANGELES, STATE OF CALIFORNIA. EACH GUARANTOR AND GUARANTIED PARTY WAIVES, TO THE EXTENT PERMITTED UNDER APPLICABLE LAW, ANY RIGHT EACH MAY HAVE TO ASSERT THE DOCTRINE OF FORUM NON CONVENIENS OR TO OBJECT TO VENUE TO THE EXTENT ANY PROCEEDING IS BROUGHT IN ACCORDANCE WITH THIS SECTION 19. EACH GUARANTOR AND GUARANTIED PARTY HEREBY WAIVE THEIR RESPECTIVE RIGHTS TO A JURY TRIAL OF ANY CLAIM OR CAUSE OF ACTION BASED UPON OR ARISING OUT OF THIS GUARANTY OR ANY OF THE TRANSACTIONS CONTEMPLATED HEREIN, INCLUDING CONTRACT CLAIMS, TORT CLAIMS, BREACH OF DUTY CLAIMS, AND ALL OTHER COMMON LAW OR STATUTORY CLAIMS. EACH GUARANTOR AND GUARANTIED PARTY REPRESENT THAT EACH HAS REVIEWED THIS WAIVER AND EACH KNOWINGLY AND VOLUNTARILY WAIVES ITS JURY TRIAL RIGHTS FOLLOWING CONSULTATION WITH LEGAL COUNSEL. IN THE EVENT OF LITIGATION, A COPY OF THIS AGREEMENT MAY BE FILED AS A WRITTEN CONSENT TO A TRIAL BY THE COURT. 8 IN WITNESS WHEREOF, the undersigned has executed and delivered this Guaranty as of the date first written above. MICROSTRATEGY INCORPORATED, a Delaware corporation By: /s/ Eric F. Brown ---------------------------------------- Name: Eric F. Brown Title: President and Chief Financial Officer AVENTINE, INCORPORATED, a Delaware corporation By: /s/ William J. Chatterton, Jr. ---------------------------------------- Name: William J. Chatterton, Jr. Title: Chairman and President MICROSTRATEGY CAPITAL CORPORATION, a Delaware corporation By: /s/ Eric F. Brown ---------------------------------------- Name: Eric F. Brown Title: Treasurer MICROSTRATEGY MANAGEMENT CORPORATION, a Delaware corporation By: /s/ Eric F. Brown ---------------------------------------- Name: Eric F. Brown Title: Treasurer STRATEGY.COM INCORPORATED, a Delaware corporation By: /s/ Eric F. Brown ---------------------------------------- Name: Eric F. Brown Title: Chief Financial Officer 9