Gameloft interview question

How would you handle taking over someone else's spaghetti code?