Rewrite or Refactor?
gstar: A lot depends on whether the code is unusable as-is - but it's a well established rule of thumb that a re-write of any codebase takes 3 times the back of the envelope calculation.