rip off decryption support from bspload.c