Probably waterfall stuff that have actual clear functions and integrations (if you can extract all that system gets and what it does with it there is no reason to agile it) then slowly get thru the current mess, documenting it at each step while trying to replace it with something better.
Replacing existing system (and especially one you didn't write) is pretty much always the hardest case.
Replacing existing system (and especially one you didn't write) is pretty much always the hardest case.