EXHIBIT 10.4 STOCK TRANSFER RESTRICTION AGREEMENT AND AMENDMENTS TO SITE ACQUISITION AGREEMENT DATED: June 14, 2006 AMONG: VERASUN ENERGY CORPORATION Attn: President 100 22nd Ave. Brookings, SD 57006 Fax no.: (605) 696-7250 "VERASUN" AND: AMERICAN MILLING, LP Attn: President P.O. Box 5005 Fox Terminal Road Cahokia, IL 62206 Fax no.: (618) 337-8848 "AMERICAN" AND: Other Parties Listed on the Signature Pages "INVESTORS" c/o President, American Milling, LP P.O. Box 5005 Fox Terminal Road Cahokia, IL 62206 Fax No.: (618) 337-8848 RECITALS A. VeraSun and American are parties to the Site Acquisition Agreement dated May 22, 2006 (the "SITE AGREEMENT") governing the acquisition of rights by VeraSun to purchase or lease greenfield sites designated by American for the construction of fuel-grade ethanol production facilities, on the terms and conditions set forth in the Site Agreement, and to a separate agreement relating to consulting and other services (the "SERVICES AGREEMENT"). Capitalized terms not otherwise defined herein shall have the meanings set forth in the Site Agreement. B. As of the date of this Stock Transfer Restriction Agreement and Amendments to Site Acquisition Agreement (this "AGREEMENT"), the United States Securities and Exchange Commission has declared VeraSun's Registration Statement on Form S-1 (File No. 333-132861) effective. C. Morgan Stanley & Co. Incorporated ("MS&CO") and Lehman Brothers, Inc., the underwriters of the IPO (the "UNDERWRITERS"), have offered to sell an aggregate of 1,086,955 shares of VeraSun Stock to American and the Investors in the IPO (the "IPO SHARES") subject to their execution and delivery of a "lock up" agreement with the Underwriters substantially in the form attached hereto as EXHIBIT 1. D. American and the Investors executed and delivered the "lock up" agreement to the Underwriters. E. VeraSun, American and the Investors desire to impose additional restrictions on the transferability of the IPO Shares and to amend the Site Agreement. In consideration of the mutual promises and covenants contained in this Agreement and for other good and valuable consideration, the receipt and sufficiency of which is hereby acknowledged, the parties agree as follows: AGREEMENT 1. RESTRICTIONS ON TRANSFER. In addition to the restrictions contained in the "lock up" agreement referenced in Recitals C and D above, the IPO Shares shall be subject to the additional restrictions described in this Section 1. No IPO Shares, nor any interest in such shares, may be assigned, encumbered, disposed of, or transferred (including transfer by operation of law) until the Restriction Period with respect to such IPO Shares has lapsed. "RESTRICTION PERIOD" means, (a) with respect to 50% of the IPO Shares, the first anniversary of the settlement date of purchase of such shares (the "PURCHASE DATE"), (b) with respect to 25% of the IPO Shares, the second anniversary of the Purchase Date, and (c) with respect to 25% of the IPO Shares, the third anniversary of the Purchase Date. VeraSun will not be required (a) to transfer on its books any IPO Shares that have been sold or transferred in violation of any of the provisions set forth in this Section 1 or (b) to treat as owner of such IPO Shares or to accord the right to vote as such owner or to pay dividends to any transferee to whom such IPO Shares purport to have been so transferred. American will hold the IPO Shares with MS&Co in custody until the applicable Restriction Period has lapsed in accordance with a Custody Agreement substantially in the form attached as EXHIBIT 2. While the IPO shares are custodied at MS&Co, American will direct MS&Co to send duplicate statements for the account to VeraSun. Immediately prior to the end of the applicable Restriction Period, American and each Investor will deliver to VeraSun a statement certifying to VeraSun that American, the Investors and the Covered Persons (as defined in the Services Agreement) are in compliance with this Section 1 and with Section 5.03 of the Site Agreement. 2. REMEDY FOR BREACHES OF SECTION 5.03 OF THE SITE AGREEMENT. If American or any Covered Person breaches Section 5.03 of the Site Agreement, VeraSun shall have the right to repurchase any or all of the IPO Shares at the per share price to the public for such shares in the IPO. Such repurchase shall be completed promptly after notice to American and the Investors, and in any event within 10 days after such notice. 3. LEGENDS. The certificates evidencing the IPO Shares shall bear the following legend, with the last day of the applicable Restriction Period inserted in such legend: "UNTIL _____, 200_, THE SHARES REPRESENTED BY THIS CERTIFICATE ARE SUBJECT TO CERTAIN RESTRICTIONS UPON TRANSFER AS SET FORTH IN A STOCK TRANSFER RESTRICTION AGREEMENT AND AMENDMENTS TO SITE ACQUISITION AGREEMENT BETWEEN THE CORPORATION AND THE REGISTERED HOLDER, COPIES OF EACH OF WHICH ARE ON FILE AT THE PRINCIPAL OFFICE OF THE CORPORATION, AND MAY NOT BE SOLD OR OTHERWISE TRANSFERRED BEFORE THAT DATE EXCEPT PURSUANT TO A 2 REPURCHASE BY THE CORPORATION IN ACCORDANCE WITH SECTION 1 OF THAT AGREEMENT." As soon as practicable after the applicable Restriction Period with respect to IPO Shares has lapsed and VeraSun has received the applicable certification described in Section 1 of this Agreement, VeraSun shall direct its transfer agent to remove the foregoing legend from the certificate representing such IPO Shares. 4. AMENDMENTS TO THE SITE AGREEMENT. 4.1 Section 1.01 of the Site Agreement is hereby amended to read in its entirety as follows: "1.01 DESIGNATED SITES. American shall designate at least four sites for purchase or lease from among the five sites (the "PRIMARY SITES") listed on Schedule 1 hereto or other additional sites after American has obtained options or other rights ("PROPERTY RIGHTS") that would enable VeraSun or its designee, as an assignee of American, to purchase or lease the sites (each, a "DESIGNATED SITE"); provided that American shall submit one of the Primary Sites to VeraSun for purchase or lease within three months after the date of this Agreement. The Property Rights must not expire earlier than 120 days after submission of a Designated Site for approval pursuant to Section 1.03 unless VeraSun otherwise agrees in writing." 4.2 The first sentence of Section 1.03 of the Site Agreement is hereby amended to read in its entirety as follows: "After American has identified a Designated Site, conducted an evaluation and obtained the associated Property Rights, American shall submit such Designated Site to VeraSun for acceptance." 4.3 Section 5.03 is hereby added to the Site Agreement as follows: 5.03 EXCLUSIVITY. During the Term of this Agreement (as defined below) and for a period of three years thereafter, American agrees that neither American nor any of the Covered Persons (as defined in the Services Agreement, dated June 14, 2006, among the parties) will, either directly or indirectly, solicit, entertain or conduct discussions with any person with respect to any offer for the purchase or sale of any site for construction of an ethanol facility, including the sites identified on Schedule 1. For this purpose, the term "PERSON" shall include any corporation, company, group, partnership or other entity or individual. The restrictions contained in this Section 5.03 shall terminate immediately if VeraSun rejects three of the Primary Sites or two of the three sites identified in Schedule 1 as "KEY SITES" (a "REJECTION EVENT"). 4.4 Section 8.01 of the Site Agreement is hereby amended to read in its entirety as follows: 3 "8.01 TERM; RIGHT OF PARTIES TO TERMINATE. This Agreement will terminate two years after the date hereof (the "TERM OF THIS AGREEMENT") and may be terminated earlier as follows: 8.01-1 by mutual written agreement of VeraSun and American; 8.01-2 by VeraSun, if American shall have breached any of its obligations or representations hereunder in any material respect; or 8.01-3 by American, if VeraSun shall have breached any of its obligations or representations hereunder in any material respect." 4.5 The following clause is hereby added to the second sentence of Section 8.02 of the Site Agreement: , and except for Section 5.03 which section will continue for a period of three years after termination of this Agreement, but only upon a termination by VeraSun pursuant to Section 8.01-2. 5. EFFECT OF AMENDMENTS. The amendments to the Site Agreement set forth in Section 4 of this Agreement are not intended to supersede or amend the Site Agreement, except as specifically set forth in Section 4 of this Agreement. All other terms of the Site Agreement shall remain in full force and effect. In the event of a conflict, then the terms of this Agreement shall govern. The termination of the Site Agreement shall have no effect on this Agreement which shall remain in full force and effect. 6. BENEFIT AND ASSIGNMENT. This Agreement shall be binding upon and shall inure to the benefit of the parties hereto and their respective successors and assigns. No party hereto may voluntarily or involuntarily assign such party's interest under this Agreement without the prior written consent of the other parties; provided, however, that VeraSun may assign its purchase rights to an Accepted Site to an affiliate of VeraSun. 7. ENTIRE AGREEMENT. This Agreement, the Site Agreement, the Services Agreement and the Schedules and Exhibits referred to therein, and the Confidentiality Agreement between VeraSun and American dated March 14, 2006, embody the entire agreement and understanding of the parties and supersede any and all prior agreements, arrangements and understandings relating to matters provided for herein and therein. 8. AMENDMENT, WAIVER, ETC. The provisions of this Agreement may be amended or waived only by an instrument in writing signed by the party against which enforcement of such amendment or waiver is sought. Any waiver of any term or condition of this Agreement or any breach hereof shall not operate as a waiver of any other such term, condition or breach, and no failure to enforce any provision hereof shall operate as a waiver of such provision or of any other provision hereof. 9. GOVERNING LAW. The construction and performance of this Agreement will be governed by the laws of the state of South Dakota (except for the conflicts of law provisions thereof). 4 10. NOTICES. All notices required or permitted to be given under this Agreement shall be in writing. Notices may be delivered by certified or registered mail, postage paid with return receipt requested; by private courier prepaid; by facsimile or other telecommunication device capable of transmitting or creating a written record; or personally. Mailed notices shall be deemed received five days after mailing, properly addressed. Couriered notices shall be deemed received on the date that the courier warrants that delivery will occur. Telecommunicated notices shall be deemed received when receipt is either confirmed by confirming transmission equipment or acknowledged by the addressee or its office. Personal delivery shall be effective when accomplished. If a notice is provided under this Agreement, it shall be delivered, mailed or sent to the address for the relevant party set forth on the first page of this Agreement or to such other address for such party as shall be furnished in accordance with this Section 10. 11. ATTORNEYS' FEES. If suit or action is filed by any party to enforce the provisions of this Agreement or otherwise with respect to the subject matter of this Agreement, the prevailing party shall be entitled to recover reasonable attorneys' fees as fixed by the trial court and, if any appeal is taken from the decision of the trial court, reasonable attorneys' fees as fixed by the appellate court. For purposes of this Agreement, the term "PREVAILING PARTY" shall be deemed to include a party that successfully opposes a petition for review filed with an appellate court. 12. COUNTERPARTS. This Agreement may be executed in one or more counterparts, each of which will be deemed an original but all of which together will constitute one and the same instrument. [SIGNATURE PAGE FOLLOWS ON NEXT PAGE] 5 IN WITNESS WHEREOF, the parties have executed this Agreement as of the day and year first written above. VERASUN: VERASUN ENERGY CORPORATION By: /s/ Donald L. Endres ------------------------------------ Name: Donald L. Endres Title: Chief Executive Officer AMERICAN: AMERICAN MILLING, LP By: /s/ David Jump ------------------------------------ Name: David Jump Title: President INVESTORS: BAAKA L.L.C. By: /s/ Michael Heiy ------------------------------------ Name: Michael Heiy Title: Authorized Signer DAVID JUMP IRA By: /s/ David Jump ------------------------------------ Name: David Jump Title: Authorized Signer DAVID JUMP ROTH IRA By: /s/ David Jump ------------------------------------ Name: David Jump Title: Authorized Signer 6 The following exhibits to the Agreement have been omitted and will be provided to the Securities and Exchange Commission upon request: Exhibit 1 Lock-up Agreement Exhibit 2 Custody Agreement 7