Out-of-status nationals are not permitted to apply for permanent residency from within the United States. They must first return to their country of origin and apply through the United States Embassy there.
You can still petition for EB-5 investment immigration. However once it is approved, you must use consular processing to adjust your status. This means you will need to return to your home country to wait for consular processing of an approved EB-5 petition.
Eligibility for any adjustment of status is not a simple matter to understand. It is fact specific. A "preference" visa applicant may only file for adjustment of status if they have an approved visa petition (for EB-5 it is form I-526) OR be among the classes that are allowed to file "concurrently". Right now, there is no concurrent filing allowed for an I-526 and I-485. (This could change.) In addition, any preference visa applicant MUST currently be "in a valid status" and have a "current priority date" in order to file for adjustment of status (AOS). EB-5 has always been current from day-one of the creation of the visa category and it is nowhere near being oversubscribed any time soon. THAT SAID, the real question is have you been out of status for 180 days or more? IF yes, you have "unlawful presence" and if you depart, you will trigger a bar to re-entry for 3 years. IF you have unlawful presence of one year or more the bar jumps to 10 years. It is POSSIBLE to get a "hardship waiver" but only if you have a qualifying relative and that relative will be subjected to a severe hardship by your deportation or being found inadmissible due to unlawful presence. The simple answer is: "It's just not that simple!"