Since it's beyond 90 days, there is no option to restore status from within Canada.
Only other option is if you qualify for any PR program (under economic class, or sponsored by a spouse, etc), then once the PR app is fully approve you can "land' as a PR and would then be legal.
No other ways I see. If it's a 2 year overstay, any contact with IRCC or CBSA on any issue would alert them to the illegal status and could start removal proceedings.