|
@@ -0,0 +1,56 @@
|
|
|
|
+package QuickVerifyCrap;
|
|
|
|
+
|
|
|
|
+import java.io.FileNotFoundException;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.io.RandomAccessFile;
|
|
|
|
+
|
|
|
|
+public class Unwiggler {
|
|
|
|
+ public static void main(String[] args) throws IOException {
|
|
|
|
+ RandomAccessFile r = new RandomAccessFile("D:\\LOA\\000024\\emumm\\cgc.so","r");
|
|
|
|
+ RandomAccessFile rw = new RandomAccessFile("D:\\LOA\\000024\\emumm\\cgc.so.boobs","rw");
|
|
|
|
+ byte[] key1 = new byte[]{0x0a,0x43,(byte)0xc2,0x00};
|
|
|
|
+ byte[] key2 = new byte[]{
|
|
|
|
+ (byte) 0xbd,0x5e, (byte) 0xb0,0x17,
|
|
|
|
+ (byte) 0xcf, (byte) 0x9b,0x63,0x00,
|
|
|
|
+};
|
|
|
|
+ byte[] key3 = new byte[]{
|
|
|
|
+ (byte) 0xe7, (byte) 0xe2,0x77, (byte) 0x90,
|
|
|
|
+ (byte) 0xa5,0x22, (byte) 0xcc, (byte) 0xd0,
|
|
|
|
+ 0x24, (byte) 0xc7, (byte) 0xa6,0x14,
|
|
|
|
+ (byte) 0x85,0x00,};
|
|
|
|
+ byte[] key4 = new byte[]{
|
|
|
|
+ 0x11,0x37,0x74,0x38,
|
|
|
|
+ (byte) 0xca, (byte) 0xec,0x25, (byte) 0xf6,
|
|
|
|
+ (byte) 0xd3, (byte) 0x98,0x47, (byte) 0x9b,
|
|
|
|
+ 0x55,0x67, (byte) 0xd1,0x29,
|
|
|
|
+ (byte) 0x91,0x00,};//
|
|
|
|
+ byte[] key5 = new byte[]{
|
|
|
|
+ 0x70,(byte)0xA3,(byte)0x81,(byte)0xC5,
|
|
|
|
+ (byte)0xF4,0x07,(byte)0xCB,0x32,
|
|
|
|
+ 0x73,(byte)0xc0,0x55,0x12,
|
|
|
|
+ (byte)0x87,(byte)0xb5,0x44,(byte)0x8c,
|
|
|
|
+ 0x72,0x08,(byte)0xf3,0x00,
|
|
|
|
+ };
|
|
|
|
+ long filelen = r.length();
|
|
|
|
+ long lim = filelen-0x10;
|
|
|
|
+ byte[] filer = new byte[(int) filelen];
|
|
|
|
+ byte[] filew = new byte[(int) filelen];
|
|
|
|
+ r.read(filer);
|
|
|
|
+ for(int i=0;i<lim;i++)
|
|
|
|
+ {
|
|
|
|
+ byte wiggledByte =
|
|
|
|
+ (byte) (key1[i % 3] ^
|
|
|
|
+ filer[i+4] ^
|
|
|
|
+ key5[i % 0x13] ^
|
|
|
|
+ key4[i % 0x11] ^
|
|
|
|
+ key3[i % 0xd] ^
|
|
|
|
+ key2[i % 7]);
|
|
|
|
+ int weirdTrigger = i - (i / 5);
|
|
|
|
+ if ((weirdTrigger & 1) != 0) {
|
|
|
|
+ wiggledByte = (byte) (((wiggledByte & 0x1f) << 3) | (wiggledByte >> 5)&0b00000111);
|
|
|
|
+ }
|
|
|
|
+ filew[i] = wiggledByte;
|
|
|
|
+ }
|
|
|
|
+ rw.write(filew);
|
|
|
|
+ }
|
|
|
|
+}
|