Hey, yes you can apply for a green card even though you are currently working illegally in short because you originally had a “proper entry” under your F1 visa.
Your marriage to a US Citizen qualifies you for a green card and thus for adjustment of status. I would suggest that you apply as soon as possible because the wait time could be somewhat lengthy.
There are many other factors to be considered here, but suffice it to say that working illegally in the US will not by itself disqualify you for adjustment of status to a permanent green card IF you originally had a proper entry.
Of course you will need to speak with an immigration attorney to find out more about adjusting your status. For that, I suggest that you check out. You will get a free initial consultation with an experienced immigration attorney who can tell you more about your qualifications. If you decide to move forward, you will receive affordable, transparent, flat-fee pricing along with flexible payment options. Good luck and don’t hesitate to reach out for more info!