It's like living in the same apartment with alcoholic gorilla prone to random outbursts of violence. One day it eats too much of fermented fruit and you're toast. And you have no way of knowing when it happens. Maybe you'll get lucky and you'll be out that day. Maybe you won't.
If I had code that is that bad and unpredictable and nobody knew if it would work or not except by seeking an opinion of a soothsayer which nobody can validate until it's too late, and it would be prone to random catastrophic failures which nobody can predict or find out why they happened, even seasoned professionals, I'd say not even refactor it. Just bury it and start from the design up again and redo the whole thing. That's pretty much the financial code we have now, as far as I can see. Good thing I have to deal just with segfaults and buffer overruns...