Uncovering what the hell was actually happening was like peering into the mind of a psychopath.
Once myself and 3 other engineers spent 4.5 hours trying to figure out how to send an email from this treacherous app (a feature which had stopped working months before we showed up). After those 4.5 hours, none of us even came close.
To top the whole thing off, page load times were in the minutes. The standard joke from the users was that they "get to take lots of coffee breaks."
Much to the (new) manager's credit (and my sanity), we got buy in to just build a new version and let the old one die. I left the team shortly after the 2.0 beta launch, but God I wish I would have stuck around a little longer so I could have seen the official end of life for that calamity of an app.