public class Test3 { public static void encode(byte[] in, byte[] out, int password) {
int len = in.length; int seed = password ^ 0x52401c6c;
for (int i = 0; i < len; ++i) {
byte a = (byte) ((in[i] ^ seed) >>> 5);
byte b = (byte) (((((int) in[i]) << 13) ^ seed) >>> (13 - 3));
a &= 0x7;
b &= 0xf8;
out[i] = (byte) (a | b);
seed = ((seed ^ out[i]) * 7321 + out[i]);
}
} public static void decode(byte[] in, byte[] out, int password) {
int len = in.length; int seed = password ^ 0x52401c6c;
for (int i = 0; i < len; ++i) {

}
} public static void main(String[] args) throws Exception {
int password = 0x90b08f34;
byte[] buf1 = { 124, 118, 98, 99, -1, -17, -123, 73, 119, 123, 126,
126, 56, -97, -30, -122, -68, 124, 24, -99, -50, 113, -24, 2,
-26, 0, -109, -116, -36, 2, 59, -97, 62, -41, 112, 10, -101,
-75, -35, 10, 48, 91, -87, -93, 122, -40, -68, -112, -81, 41,
67, 105, -58, -113, };
byte[] buf2 = new byte[buf1.length];
decode(buf1, buf2, password);
System.out.println(new String(buf2, "GBK"));
}}