File f = new File("...");  // exe文件路径
File f1 = new File("..."); // 生成的rar文件路径
FileInputStream fin = new FileInputStream(f);
FileOutputStream fout = new FileOutputStream(f1);
BufferedInputStream bin = new BufferedInputStream(fin);
BufferedOutputStream bout = new BufferedOutputStream(fout);
int in;
do {
    in = bin.read();
    if (in == -1)
        break;
    in ^= 0x88;
    bout.write(in);
} while (true);
bin.close();
fin.close();
bout.close();
fout.close();

如果你的exe是用EXE4J生成的可以使用e68a84e8a2ad62616964757a686964616f31333337383831位运算