Maybe you can get the S5 program listing in LAD (aka KOP).
Not all of the STL code can be converted to LAD (there are limitations on how wide the rungs can be, what instructions are allowed etc.), but if a major part can, then it will help you tremendously.
When printing each rung in LAD mode, STEP5 will try to print as LAD, if it cannot it will print as STL.