@flash
At least what we can asses from this is this is routine that takes an input, it converts a number of bytes from its original data, to new data using a lookup table.
This type code, can used hide some code, or hide data, for example don’t want anyone to rip your mod files, or some data is packed into exe file.
https://www.geeksforgeeks.org/caesar-cipher-in-cryptography/It can be interesting if we changes the code, to decode it, and write out data chunks as data files. We have better understanding of what this data chunks are for.
Also it be interesting to dump out the conversion table.
this means that you can replace data, by encoding data using the same convertion table.