1500 lines involving lots of undocumented transformations and low-level graphics. Codebase was then modified by three different people to do various things it was never intended to. Codebase broke after a month. A month after that, we noticed. A month after *that*, we disabled it. Now it's my job to fix it up.
First step: remove half of it. Does it work now? No. Do I know why? No. But at least now I know what it's *supposed* to do.