You can't file I-485 if you are out of status.You have to maintain your status in order to adjust it .
How long have you been out of status?
8 CFR § 245.1 Eligibility.
(a) General.
Any alien who is physically present in the United States, except for an alien who is ineligible to apply for adjustment of status under paragraph (b) or (c) of this section, may apply for adjustment of status to that of a lawful permanent resident of the United States
if the applicant is eligible to receive an immigrant visa and an immigrant visa is immediately available at the time of filing of the application. A special immigrant described under section 101(a)(27)(J) of the Act shall be deemed, for the purpose of applying the adjustment to status provisions of section 245(a) of the Act, to have been paroled into the United States, regardless of the actual method of entry into the United States.
.....
(b)
Restricted aliens
......
(3) Any alien who was
not admitted or paroled following inspection by an immigration officer;
(4) Any alien who, on or after January 1, 1977, was employed in the United States without authorization prior to filing an application for adjustment of status. This
restriction shall not apply to an alien who is:
(i) An
immediate relative as defined in section 201(b) of the Act;
......
(7) Any alien admitted as a visitor under the visa waiver provisions of 8 CFR 212.1(e) or (q),
other than an immediate relative as defined in section 201(b) of the Act;
(8) Any alien admitted as a Visa Waiver Pilot Program visitor under the provisions of section 217 of the Act and part 217 of this chapter
other than an immediate relative as defined in section 201(b) of the Act;
(9) Any alien who seeks adjustment of status pursuant to an e
mployment-based immigrant visa petition under section 203(b) of the Act and
who is not maintaining a lawful nonimmigrant status at the time he or she files an application for adjustment of status; and
An immediate relative of a USC must make a lawful ebtry, but may still apply for adjustment even after the I-94 expires. The issue of a VWP overstay being eligible for AOS is currently an issue being litigated. The current USCIS stance is that a VWP overstay may not file to adjust status in the U.S.