1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
| public class View$OnClickListenerC1003a implements View.OnClickListener { public View$OnClickListenerC1003a() { }
@Override
public void onClick(View view) { byte[] bArr; byte[] bArr2; byte[] byteArray; byte[] bArr3; byte[] byteArray2; String obj = MainActivity.this.f3918o.getText().toString(); if (obj.length() != 24) { Toast.makeText(MainActivity.this, "Nono, try again please", 0).show(); return; } byte[] bytes = obj.getBytes(); byte[] bArr4 = new byte[8]; try { DataInputStream dataInputStream = new DataInputStream(MainActivity.this.getAssets().open("data.bin")); byte[] bArr5 = new byte[dataInputStream.available()]; dataInputStream.readFully(bArr5); System.arraycopy(bytes, 0, bArr4, 0, 8); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); byte[] bArr6 = null; try { GZIPInputStream gZIPInputStream = new GZIPInputStream(new ByteArrayInputStream(bArr5)); byte[] bArr7 = new byte[256]; while (true) { int read = gZIPInputStream.read(bArr7); if (read < 0) { break; } byteArrayOutputStream.write(bArr7, 0, read); } byteArray2 = byteArrayOutputStream.toByteArray(); } catch (IOException unused) { } if (byteArray2.length >= 8) { byte[] bArr8 = new byte[8]; System.arraycopy(byteArray2, 0, bArr8, 0, 8); byte[] bArr9 = new byte[byteArray2.length - 8]; System.arraycopy(byteArray2, 8, bArr9, 0, byteArray2.length - 8); if (Arrays.equals(bArr8, bArr4)) { try { Cipher cipher = Cipher.getInstance("DES"); cipher.init(2, C0766a.m422j(bArr4)); bArr = cipher.doFinal(bArr9); } catch (InvalidKeyException e) { e.printStackTrace(); } catch (NoSuchAlgorithmException e2) { e2.printStackTrace(); } catch (BadPaddingException e3) { e3.printStackTrace(); } catch (IllegalBlockSizeException e4) { e4.printStackTrace(); } catch (NoSuchPaddingException e5) { e5.printStackTrace(); } if (bArr != null) { Toast.makeText(MainActivity.this, "The first step incorrect, try again please", 0).show(); return; } System.arraycopy(bytes, 8, bArr4, 0, 8); Inflater inflater = new Inflater(); inflater.setInput(bArr); ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream(bArr.length); try { try { byte[] bArr10 = new byte[1024]; while (!inflater.finished()) { byteArrayOutputStream2.write(bArr10, 0, inflater.inflate(bArr10)); } try { byteArrayOutputStream2.close(); } catch (IOException e6) { e6.printStackTrace(); } inflater.end(); byteArray = byteArrayOutputStream2.toByteArray(); } catch (Throwable th) { try { byteArrayOutputStream2.close(); } catch (IOException e7) { e7.printStackTrace(); } throw th; } } catch (Exception e8) { e8.printStackTrace(); try { byteArrayOutputStream2.close(); } catch (IOException e9) { e9.printStackTrace(); } } if (byteArray.length >= 8) { byte[] bArr11 = new byte[8]; System.arraycopy(byteArray, 0, bArr11, 0, 8); byte[] bArr12 = new byte[byteArray.length - 8]; System.arraycopy(byteArray, 8, bArr12, 0, byteArray.length - 8); if (Arrays.equals(bArr11, bArr4)) { try { Cipher cipher2 = Cipher.getInstance("DES"); cipher2.init(2, C0766a.m422j(bArr4)); bArr3 = cipher2.doFinal(bArr12); } catch (InvalidKeyException e10) { e10.printStackTrace(); bArr3 = null; bArr2 = bArr3; if (bArr2 == null) { } } catch (NoSuchAlgorithmException e11) { e11.printStackTrace(); bArr3 = null; bArr2 = bArr3; if (bArr2 == null) { } } catch (BadPaddingException e12) { e12.printStackTrace(); bArr3 = null; bArr2 = bArr3; if (bArr2 == null) { } } catch (IllegalBlockSizeException e13) { e13.printStackTrace(); bArr3 = null; bArr2 = bArr3; if (bArr2 == null) { } } catch (NoSuchPaddingException e14) { e14.printStackTrace(); bArr3 = null; bArr2 = bArr3; if (bArr2 == null) { } } bArr2 = bArr3; if (bArr2 == null) { Toast.makeText(MainActivity.this, "The first step has been taken, try again please", 0).show(); return; } System.arraycopy(bytes, 16, bArr4, 0, 8); LZ4SafeDecompressor safeDecompressor = LZ4Factory.safeInstance().safeDecompressor(); byte[] bArr13 = new byte[bArr2.length * 5]; int decompress = safeDecompressor.decompress(bArr2, 0, bArr2.length, bArr13, 0); byte[] bArr14 = new byte[decompress]; System.arraycopy(bArr13, 0, bArr14, 0, decompress); if (decompress >= 8) { byte[] bArr15 = new byte[8]; System.arraycopy(bArr14, 0, bArr15, 0, 8); int i = decompress - 8; byte[] bArr16 = new byte[i]; System.arraycopy(bArr14, 8, bArr16, 0, i); if (Arrays.equals(bArr15, bArr4)) { try { Cipher cipher3 = Cipher.getInstance("DES"); cipher3.init(2, C0766a.m422j(bArr4)); bArr6 = cipher3.doFinal(bArr16); } catch (InvalidKeyException e15) { e15.printStackTrace(); } catch (NoSuchAlgorithmException e16) { e16.printStackTrace(); } catch (BadPaddingException e17) { e17.printStackTrace(); } catch (IllegalBlockSizeException e18) { e18.printStackTrace(); } catch (NoSuchPaddingException e19) { e19.printStackTrace(); } } } MainActivity mainActivity = MainActivity.this; if (bArr6 == null) { Toast.makeText(mainActivity, "Almost succeeded, try again please", 0).show(); return; } Toast.makeText(mainActivity, "Each step is correct, Congs!", 0).show(); MainActivity.this.f3919p.setImageBitmap(BitmapFactory.decodeByteArray(bArr6, 0, bArr6.length)); return; } } bArr2 = null; if (bArr2 == null) { } } } bArr = null; if (bArr != null) { } } catch (IOException e20) { Toast.makeText(MainActivity.this, "Get data error", 0).show(); e20.printStackTrace(); } } }
|