An example of a plugin developed to decrypt (and potentially uncompress) files from IMG archives at runtime. And also applications to pack IMG archive. In this example, the encryption is quite heavy, which will cause a significant drop in FPS.
Usage:
rimg_app <input_file_path> [output_file_path]
And install rimg_plugin.asi
in the game folder.
The source code is published under GPLv3, the license is available here.