I'm going to guess that it's originally had one of the handheld/pendant self-contained controllers that's connected directly to that (very basic!) breakout board.

I'd start with working out what the existing wires do.
The step/dir wiring looks like it's already labelled, although it would be good to know if they've simply paired the twin axis together, rather than run it as a master/slave pair.

What voltage is available at the breakout board?

It would also be good to see what's connected to the VFD, to see how they've implemented that.

It should be a relatively easy retrofit to another controller, but I'd recommend that you add an E-stop controlled contactor, and I'm guessing you'll need to add a 24VDC (and possibly a 5VDC) power supply for the new controller.