Program for converting single skybox texture to cubemap?

I have a single tiling space-texture (4096x4096) I would like to be used as a (cubemap) skybox.

I need the program to output the parts (-x, +x, +y, -y, +z, -z) of the cubemap which I then can arrange in photoshop according to this pattern: Creating Cubemaps | Unreal Engine Documentation

Could someone recommend a program for doing this? If you happen to know of any tutorials/explanations for this <program> I’d greatly appreciate it.