AMENDED AND RESTATED INVESTMENT AGREEMENT by and among