You can always submit an I-526 Petition. However, if that is approved, you will have to obtain conditional permanent residency by going through consular processing at the US Consulate in your home country. If you were in valid US status, you could adjust from within the US.
You may file an I-526 petition and if approved, you must return to your home country to go through consulate processing. You may only adjust status in the U.S if you are under a valid status. Please note that overstaying on a visa may cause admissibility problems. Please consult an experienced attorney to assist you.
The immediate answer is you cannot apply for conditional permanent residency in the U.S. on the basis of an approved I-526 petition, if you are in the U. S. and ore out of status. However, if you are in a position to marry a U.S. citizen for good faith reasons you may be in a position to apply for permanent residency in the U.S. even if you are out of status.