Exhibit 10.4

                                                                  EXECUTION COPY

                      FIRST AMENDMENT TO SECURITY AGREEMENT
                      -------------------------------------

         This FIRST AMENDMENT TO SECURITY AGREEMENT (this "Amendment"), dated as
of August 3, 2007, is by and between SONTERRA RESOURCES, INC., a Delaware
corporation ("Debtor"), and VIKING ASSET MANAGEMENT, LLC, a California limited
liability company, in its capacity as Collateral Agent (together with its
successors and assigns in such capacity, the "Secured Party") for the benefit of
itself and The Longview Fund, L.P., a California limited partnership (the
"Buyer").

                                R E C I T A L S:

         WHEREAS, Debtor and Secured Party are parties to that certain Security
Agreement dated as of July 9, 2007 (as the same has been and hereafter may be
amended, restated, supplemented or otherwise modified from time to time, the
"Security Agreement"), pursuant to which Debtor granted security interests in
substantially all of its assets to Secured Party in order to secure the
Liabilities (as defined in the Security Agreement);

         WHEREAS, Debtor and Secured Party have agreed to amend, supplement and
modify the Security Agreement in the manner set forth below.

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

         1        Incorporation of Recitals. The Recitals set forth above are
incorporated herein and are made a part hereof.

         2        Definitions. All capitalized terms used herein but not
elsewhere defined shall have the respective meanings ascribed to such terms in
that that certain Amended and Restated Securities Purchase Agreement dated as of
August 3, 2007 among Debtor, the Principals (as defined therein) and Buyer (as
the same may be amended, restated, supplemented or otherwise modified from time
to time, the "Purchase Agreement").

         3        Amendments to Security Agreement.
                  --------------------------------

                  3.1      The Recitals to the Security Agreement are hereby
amended and restated in their entirety to read as follows:

                  "WHEREAS, the Company, The Longview Fund, L.P., a California
                  limited partnership ("Buyer"), and certain officers of the
                  Company are parties to that certain Amended and Restated
                  Securities Purchase Agreement, dated effective as of July 9,
                  2007 (as amended, restated, supplemented, or otherwise
                  modified from time to time, the "Purchase Agreement"),
                  pursuant to which Buyer purchased (i) 333 shares (the "New
                  Sonterra Shares") of common stock, no par value, of the
                  Company ("Sonterra Common Stock"); for an aggregate amount of

                                       1
<PAGE>

                  $9,990, which shares constitute 100% of the issued and
                  outstanding Capital Stock of the Company, and (ii) a senior
                  secured note of the Company in the initial principal amount of
                  $322,500 (the "Deposit Note");

                  WHEREAS, contemporaneously with the execution and delivery of
                  this Agreement and that certain Securities Exchange and
                  Additional Note Purchase Agreement, dated as of August 3, 2007
                  (as amended, restated, supplemented, or otherwise modified
                  from time to time, the "Exchange Agreement"), between RCGI (as
                  defined below) and Buyer, the transactions contemplated by the
                  Purchase Agreement to occur at the Equity Closing (as defined
                  in the Purchase Agreement) and the transactions contemplated
                  by the Cinco Purchase Agreement were consummated; without
                  limiting the foregoing, pursuant to the Purchase Agreement,
                  Buyer purchased from the Company a senior secured note of the
                  Company in the initial principal amount of $5,990,010 (of
                  which $322,500 represents refinancing of the Deposit Note,
                  which is now being surrendered to the Company and is being
                  cancelled) (as amended, restated, supplemented, or otherwise
                  modified from time to time, the "Sonterra Equity Note") and a
                  warrant to purchase 50 shares of Sonterra Common Stock (as
                  amended, restated, supplemented, or otherwise modified from
                  time to time, the "Sonterra Warrants");

                  WHEREAS, if the Flash Acquisition Closing is completed, the
                  transactions contemplated by the Purchase Agreement to occur
                  at the Flash Acquisition Closing and the transactions
                  contemplated by the Flash Purchase Agreement will be
                  consummated subject to the terms and conditions of the
                  Purchase Agreement; without limiting the foregoing, pursuant
                  to the Purchase Agreement, at the Flash Acquisition Closing
                  Buyer will purchase an additional senior secured note of the
                  Company in the initial principal amount of $2,000,000 (as
                  amended, restated, supplemented, or otherwise modified from
                  time to time, the "Sonterra Non-Equity Note");

                  WHEREAS, at the Exchange Closing (as defined in the Exchange
                  Agreement), subject to the terms and conditions thereof, Buyer
                  (i) will exchange all of its Sonterra Common Stock and the
                  Sonterra Equity Note for common stock of RCGI, par value
                  $0.001 per share (the common stock of RCGI being referred to
                  herein as "RCGI Common Stock"; and any shares thereof being
                  referred to herein as "RCGI Common Shares") (the RCGI Common
                  Shares received by Buyer in such exchange being referred to as
                  the "New RCGI Common Shares"), (ii) will exchange the Sonterra
                  Warrant for a warrant (such warrant, together with any
                  warrants or other securities issued in exchange or
                  substitution therefor or replacement thereof, and as any of
                  the same may be amended or modified and in effect from time to
                  time, the "RCGI Warrant") to purchase RCGI Common Shares (the
                  "Warrant Shares"), which RCGI Warrant shall have a term of

                                       2
<PAGE>

                  five years and be exercisable into the Warrant Shares at a
                  price per Warrant Share (the "Warrant Exercise Price") equal
                  to 110% of the quotient of $6,000,000 divided by the number of
                  New RCGI Common Shares issued to Buyer at the Exchange
                  Closing; and (iii) will exchange the Sonterra Non-Equity Note,
                  if issued, for a senior secured note of RCGI in an initial
                  principal amount equal to the principal amount owing under the
                  Sonterra Non-Equity Note on the Exchange Closing Date (such
                  note, together with any promissory notes or other securities
                  issued in exchange or substitution therefor or replacement
                  thereof, and as any of the same may be amended or modified
                  from time to time, the "Initial RCGI Note");

                  WHEREAS, subject to the terms and conditions set forth in the
                  Exchange Agreement, during the Additional Note Issuance Period
                  (as defined in the Exchange Agreement), RCGI will have the
                  option to sell, and if RCGI exercises such option Buyer shall
                  be obligated to purchase, additional senior secured notes
                  (including any promissory notes or other securities issued in
                  exchange or substitution for such senior secured notes or
                  replacement thereof, and as any of the same may be amended,
                  restated, modified or supplemented and in effect from time to
                  time, the "Additional RCGI Notes"), each with a maturity date
                  of August 31, 2010, in an original aggregate principal amount
                  of up to the result of $10,000,000 minus the original
                  principal amount of the Initial RCGI Note;

                  WHEREAS, (a) prior to the Transition Date, each Debtor (other
                  than the Company) that from time to time may be a party hereto
                  is a direct or indirect subsidiary of the Company and (b) on
                  and after the Transition Date, each Debtor that from time to
                  time may be a party hereto is a direct or indirect subsidiary
                  of RCGI, as such, each Debtor will derive substantial benefit
                  and advantage from the financial accommodations to the Company
                  set forth in the Purchase Agreement and the Sonterra Notes
                  and, on and after the Transition Date, the financial
                  accommodations to RCGI set forth in the Exchange Agreement and
                  the RCGI Notes, and it will be to each such Debtor's direct
                  interest and economic benefit to assist the Company (and, on
                  and after the Transition Date, RCGI) in procuring said
                  financial accommodations from Buyer; and

                  WHEREAS, to induce Buyer to enter into the Purchase Agreement
                  and purchase the Sonterra Notes (and, on and after the
                  Transition Date, to enter into the Exchange Agreement and
                  purchase the RCGI Notes), each Debtor has agreed to pledge and
                  grant a security interest in all of its right, title and
                  interest in and to the Collateral (as hereinafter defined) as
                  security for its Liabilities for the benefit of the Secured
                  Party, Buyer and their respective successors and assigns."

                  3.2      Section 1 of the Security Agreement is hereby further
amended by amending and restating the definition of the following terms in their
entirety to read as follows:

                                       3
<PAGE>

                  "Event of Default" shall have the meaning set forth in the
                  Sonterra Notes and, on and after the Transition Date, the RCGI
                  Notes.

                  "Liabilities" shall mean (i) prior to the Transition Date, all
                  obligations, liabilities and indebtedness of every nature of
                  Debtors from time to time owed or owing under or in respect of
                  this Agreement, the Purchase Agreement, the Sonterra Notes,
                  the Sonterra Warrants, any of the other Security Documents and
                  any of the other Transaction Documents, as the case may be,
                  and (ii) on and after the Transition Date, all obligations,
                  liabilities and indebtedness of every nature of Debtors from
                  time to time owed or owing under or in respect of this
                  Agreement, the Purchase Agreement, the remaining liabilities
                  (if any) under the Sonterra Notes, as applicable, the Exchange
                  Agreement, the RCGI Notes, the RCGI Warrants, the Registration
                  Right Agreement, the remaining liabilities (if any) under any
                  of the other Security Documents, any of the other Security
                  Documents (as defined in the Exchange Agreement), the Guaranty
                  (as defined in the Exchange Agreement), the remaining
                  liabilities (if any) under any of the other Transaction
                  Documents and any of the other Transaction Documents (as
                  defined in the Exchange Agreement), as the case may be, in
                  each case, including, without limitation, the principal amount
                  of all debts, claims and indebtedness, accrued and unpaid
                  interest and all fees, costs and expenses, whether primary,
                  secondary, direct, contingent, fixed or otherwise, heretofore,
                  now and/or from time to time hereafter owing, due or payable
                  whether before or after the filing of a bankruptcy, insolvency
                  or similar proceeding under applicable federal, state, foreign
                  or other law and whether or not an allowed claim in any such
                  proceeding."

                  "Lien" shall have the meaning set forth in the Purchase
                  Agreement and, on and after the Transition Date, the Exchange
                  Agreement.

                  "Permitted Lien" shall have the meaning set forth in the
                  Purchase Agreement and, on and after the Transition Date, the
                  Exchange Agreement.

                  3.3      Section 1 of the Security Agreement is hereby further
amended by inserting the following defined term therein in appropriate
alphabetical order:

                  "RCGI" shall mean River Capital Group, Inc., a Delaware
                  corporation.

                  "RCGI Notes" shall mean, collectively, the Initial RCGI Note
                  and the Additional RCGI Notes.

                  "Sonterra Notes" shall mean, collectively, the Sonterra Equity
                  Note and the Sonterra Non-Equity Note.

                  "Transition Date" shall mean the date on which RCGI and the
                  Included Subsidiaries (as defined in the Exchange Agreement)
                  become parties to this Agreement by execution of a joinder in
                  the form of Exhibit A attached hereto.

                                       4
<PAGE>


                  3.4      Clauses (a), (b), (g) and (i) of Section 3 of the
Security Agreement are hereby amended and restated in their entirety to read as
follows:

                  "(a)     all Instruments, together with all payments thereon
                  or thereunder (other than, on or after the Transition Date,
                  Instruments issued by River Sub (as defined in the Exchange
                  Agreement) or Holdings Sub (as defined in the Exchange
                  Agreement) or both);

                  (b)      all Accounts (other than, on or after the Transition
                  Date, Accounts on which the Account Debtor is River Sub or
                  Holdings Sub or both);

                  ...

                  (g)      all Contracts (other than, on or after the Transition
                  Date, Contracts with or relating to River Sub or Holding Sub
                  or both);

                  ...

                  (i)      all Investment Property (other than, on or after the
                  Transition Date, Investment Property consisting of securities
                  issued by River Sub or Holding Sub or both)."

                  3.5      Section 4.4(a) of the Security Agreement is hereby
amended by (i) deleting each reference to the phrase "Security Documents"
thereof and inserting the phrase "Security Documents (or, on and after the
Transition Date, the Security Documents (as defined in the Exchange Agreement))"
in its place therefor and (ii) deleting each reference to the phrase
"Transaction Documents" thereof and inserting the phrase "Transaction Documents
(or, on and after the Transition Date, the Transaction Documents (as defined in
the Exchange Agreement))" in its place therefor.

                  3.6      Section 4.4(c) of the Security Agreement is hereby
amended by deleting each reference to the phrase "Purchase Agreement" thereof
and inserting the phrase "Purchase Agreement (or, on and after the Transition
Date, the Exchange Agreement)" in its place therefor.

                  3.7      Section 4.6(g) of the Security Agreement is hereby
amended by deleting each reference to the phrase "Transaction Document" thereof
and inserting the phrase "Transaction Document (or, on and after the Transition
Date, the Transaction Document (as defined in the Exchange Agreement))" in its
place therefor.

                  3.8      Section 4.9 of the Security Agreement is hereby
amended and restated in its entirety to read as follows:

                  "4.9     Application of Proceeds. The proceeds of any
                  collection, sale or other realization of all or any part of
                  the Collateral, and any other cash at the time held by the
                  Secured Party under this Agreement, shall be applied in the
                  manner set forth in the Sonterra Notes (or, on and after the
                  Transition Date, the RCGI Notes) (or, if not so set forth, in
                  a manner acceptable to, and at the election of, the Secured
                  Party)."

                                       5
<PAGE>

                  3.9      Section 4.12 of the Security Agreement is hereby
amended by amending and restating the first sentence thereof in its entirety to
read as follows:

                  "This Agreement and the Liens and security interests granted
                  hereunder shall not terminate until the termination of the
                  Sonterra Notes (and, on and after the Transition Date, the
                  RCGI Notes) and the full and complete performance and
                  indefeasible satisfaction of all the Liabilities (i) in
                  respect of the Sonterra Notes (and, on and after the
                  Transition Date, the RCGI Notes) (including, without
                  limitation, the indefeasible payment in full in cash of all
                  such Liabilities) and (ii) with respect to which claims have
                  been asserted by Collateral Agent and/or Buyer, whereupon the
                  Secured Party shall forthwith cause to be assigned,
                  transferred and delivered, against receipt but without any
                  recourse, warranty or representation whatsoever, any remaining
                  Collateral to or on the order of Debtors."

                  3.10     Section 5.3 of the Security Agreement is hereby
amended by deleting each reference to the phrase "Purchase Agreement" thereof
and inserting the phrase "Purchase Agreement (or, on and after the Transition
Date, the Exchange Agreement)" in its place therefor.

                  3.11     Section 5.12(a) of the Security Agreement is hereby
amended by (i) deleting each reference to the phrase "Security Documents"
thereof and inserting the phrase "Security Documents (or, on and after the
Transition Date, the Security Documents (as defined in the Exchange Agreement))"
in its place therefor and (ii) deleting each reference to the phrase
"Transaction Documents" thereof and inserting the phrase "Transaction Documents
(or, on and after the Transition Date, the Transaction Documents (as defined in
the Exchange Agreement))" in its place therefor.

                  3.12     Section 5.12(b) of the Security Agreement is hereby
amended by (i) deleting each reference to the phrase "Notes" thereof and
inserting the phrase "Sonterra Notes (or, on and after the Transition Date, the
RCGI Notes)" in its place therefor and (ii) deleting each reference to the
phrase "Transaction Document" thereof and inserting the phrase "Transaction
Document (or, on and after the Transition Date, the Transaction Document (as
defined in the Exchange Agreement))" in its place therefor.

                  3.13     Sections 5.12(c) and (d) of the Security Agreement
are hereby amended by deleting each reference to the phrase "Transaction
Documents" thereof and inserting the phrase "Transaction Documents (or, on and
after the Transition Date, the Transaction Documents (as defined in the Exchange
Agreement))" in its place therefor.

                  3.14     Section 5.14 of the Security Agreement is hereby
amended by deleting each reference to the phrase "Transaction Documents" thereof
and inserting the phrase "Transaction Documents (or, on and after the Transition
Date, the Transaction Document (as defined in the Exchange Agreement))" in its
place therefor.

         4        Representations and Warranties. To induce Secured Party to
enter into this Amendment, Debtor represents and warrants to Secured Party that:

                                       6
<PAGE>

                  4.1      that the execution, delivery and performance of this
Amendment has been duly authorized by all requisite organizational action on the
part of Debtor and that this Amendment has been duly executed and delivered by
Debtor; and

                  4.2      that each of the representations and warranties set
forth in the Security Agreement (after giving effect to this Amendment) (other
than those which, by their terms, specifically are made as of certain date prior
to the date hereof) are true and correct in all material respects as of the date
hereof.

         5        Counterparts. This Amendment may be executed in any number of
counterparts, all of which taken together shall constitute one and the same
instrument and any of the parties hereto may execute this Amendment by signing
any such counterpart.



                 - Remainder of Page Intentionally Left Blank -
                            [Signature Page Follows]



                                       7
<PAGE>



IN WITNESS WHEREOF, Debtors and Secured Party have caused this Amendment to be
duly executed and delivered as of the date first above written.


                                       DEBTOR:
                                       -------

                                       SONTERRA RESOURCES, INC., a Delaware
                                       corporation


                                       By:     /s/ Michael J. Pawelek
                                               ---------------------------------
                                       Name:   Michael J. Pawelek
                                       Title:  President




<PAGE>

                                       SECURED PARTY:
                                       --------------

                                       VIKING ASSET MANAGEMENT, LLC, a
                                       California limited liability company, in
                                       its capacity as Collateral Agent for
                                       Buyer


                                       By:     /s/ Wayne H. Coleson
                                               ---------------------------------
                                       Name:   Wayne H. Coleson
                                       Title:  Chief Investment Officer