Thank you for your query.
I understand that your wife has permanent residence, and she has a child from her first relationship. You are also an overstayer.
You have two options. You make an in-country application to the Home Office on the basis that you have a genuine and subsisting relationship under Appendix FM of the Immigration Rules. However, as you are an overstayer, these applications are very difficult to succeed in as you will have to show the following:
EX.2. For the purposes of paragraph EX.1.(b) “insurmountable obstacles” means the very significant difficulties which would be faced by the applicant or their partner in continuing their family life together outside the UK and which could not be overcome or would entail very serious hardship for the applicant or their partner.
In this application, you could also argue that you have a parental relationship with your child, and you will have to satisfy the following requirement:
EX.1. This paragraph applies if
In essence, you will have to show why you cannot enjoy family life outside the UK. This is a very complex application, and you should seek a specialist advice.
Your other option is to return to your country of origin and get your wife to sponsor you. This application again will be made under Appendix FM of the Immigration Rules, and your sponsor will have to show that she earns £18,600 gross income per year.
Please do not forget to kindly rate my answer.
Thank you for your second question, which was not part of your initial questions.
The Home Office is now getting tough on sham marriages and marriage of convenience. In summary, the first step is to give notice of your intention to get married. The registrar will automatically inform the Home Office and the Home Office will have 70 days to investigate. If nothing happens after 70 days, then you can get married.
This link will provide you with more information: https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/256257/Sham_Marriage_and_Civil_Partnerships.pdf
Please kindly do not forget to rate my answer.