I mean, they did have the htmlpurifier library in there.
Ahem, *snort*, I'm sorry. I tried to type that with a straight face but...
Write some scripts to convert and reimport the old database into whatever the new system uses, if you want to keep all the past posts, and be done with it. That code base would be far more work to update than to just replace.
I mean, I'd love to because I enjoy writing high-use software. Lots of little tricks and techniques I can use. It's almost a hobbyist thing to me. For as unsophisticated as 4chan is, I could do a whole new system from scratch in under a month that would have rigorous unit tests, DevOps processes, architectured so it could just scale up or down dynamically using EC2 instances or whatever. None of it is ground breaking stuff but I enjoy it the same way, I don't know, someone enjoys painting little miniatures or carving a piece of wood.
But I'm not sure 4chan should be resurrected and I'm doubly sure that nobody would pay me for my time even if I discounted my rates.