You need to
1. Understand the business rules.
You need to know what the system / application does before you can begin making changes to the code.
2. Get an overview of the system design / code structure. If there is any (otherwise it is going to be very difficult).
Break down the system into use cases and try to see what part of the code each case covers.
That should give you an idea of the business logic and the class structures (assuming it is not one big bowl of spaghetti).
3. Create a working document with your diagrams and development plans.
Put all your observations on a whiteboard, paper or a napkin as needed. But remember to draw it Visio, Word or OpenOffice.Writer too.
You don't have to do this all at once. It can be done as you move into the code to fix bugs or when making changes.
It will probably take you between 6 to 18 months to get fully acquainted with 30-40K lines of code.
It also depends on how hard business is pushing you. The more pressure on bug fixing and system changes, the less time you will have to learn about the system as a whole.
Even though 30-40K lines isn't that much it is probably more than a one man job.
If it is a business critical system. It is more likely to be a 2-3 headcount.
You should have you own exit strategy ready and get out of there, in case business wont take your challenges seriously.
Anyways i hope they pay you well.
Good luck with it.