At some point, competent people will have to be involved. And one of the first things those people will have to decide is if there is anything worth saving in all of that code, or it is better to start over again.
Given the complexity of what the software is supposed to do, patching a broken core will be very difficult.