The investors petition showing the investment has been made can be filed whether you are in the U.S.or not.However, you cannot file your application for conditional permanent residency in the U.S.if you are out of status. Therefore if you are now out if status you will have to leave the U.S.and upon the approval of the I-526 investors petition you can apply for the conditional permanent residency visa at the U.S. Consulate in your home country.