Situations like this would have more of an effect when applying for your conditional permanent residency than for the initial I-526 petition. Retaining qualified US immigration counsel will help you prepare for that portion of the process and how to best proceed to allow for approval.
The petition I-526 can be approved regardless your status in the U.S. If you are in the U.S.and out of status you can not apply for Adjustment to conditional permanent residency. However, if you have been in unauthorized stay in the U.S.for either more than 6 months or one year, then you may not be able to obtain conditional permanent residency to the U.S.through the U.S.Consulate.