If you inherit a large code base that is badly written AND you are planning to stick around in that company. I would strongly suggest to immediately start re-writing that legacy code even if you have to burn extra hours. Otherwise you would be doing nothing but firefighting in that job with limited control over your situation.