That's a tough situation. Clearly, the company needs a developer who is better than the code :-)
Since this is workplace and not software development: What you need to do is clarify everyone's expectations. With bad quality source code that you don't know, you can either muddle through as best as you can, or you can start improving things. The latter is better in the long term.
So clarify with your manager whether the software has a "long term". If the software will be thrown out in a year's time, muddling through is not very efficient, but it's the most efficient that you can do. If the software will be used for another ten years, agree with your manager that it is currently in an unmaintainable state, and start improving it.
But the most important thing is that you talk to your manager, agree with them on the path you are going to take, and notify them that small changes and bug fixes will take disproportionately long time due to the nature of the software.