package com.ironsource.adqualitysdk.sdk.i; import android.os.SystemClock; import android.util.Base64; import com.facebook.internal.FacebookRequestErrorClassification; import java.io.ByteArrayInputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.HashSet; import java.util.List; import java.util.concurrent.Executors; import javax.crypto.Cipher; import javax.crypto.CipherInputStream; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.PBEKeySpec; /* loaded from: classes4.dex */ public class jp { /* renamed from: ﻛ, reason: contains not printable characters */ private static char[] f2733 = {142, 283, 287, 295, 280, 277, 287, 283, 288, 267, 259, 267, 276, 284, 136, 276, 271, 271, 239, 230, 269, 280, 283, 271, 229, 232, 271, 272, 275, 281, 273, 265, 275, 275, 231, 238, 277, 277, 279, 256, ')', 'R', 'I', 'Q', '\\', 'S', 'd', 'z', '{', 'v', 't', 'r', 'h', 'R', 'T', '[', 'W', ']', 'O', 'I', '+', 'P', 'N', 'N', 'J', 'H', '<', ';', 'G', 'I', ';', '3', '5', '<', 'E', 'N', 'J', 'C', 'L', '@', '8', 'B', 'B', '8', '>', 'O', 'J', 'I', 'P', 'S', 'O', 'N', 'I', 'C', '!', 'B', 137, 274, 267, 247, 240, ']', 228, 267, 267, 269, 246, 241, 261, 262, 264, 270, 270, 228, 222, 261, 262, 265, 269, 271, 272, 261, 255, 255, 'O', 157, 163, 174, 173, 171, 131, 'y', 159, 162, 164, 147, 148, 171, 169, 169, 130, 'z', 163, 164, 156, 163, 167, 164, 163, '|', '{'}; /* renamed from: k, reason: contains not printable characters */ private static int f2734 = 1; /* renamed from: メ, reason: contains not printable characters */ private static int f2735; /* renamed from: ﻛ, reason: contains not printable characters */ public static void m3252(io ioVar) { int i = f2735 + 91; f2734 = i % 128; try { if (i % 2 != 0) { Executors.newSingleThreadExecutor().execute(ioVar); int i2 = f2734 + 55; f2735 = i2 % 128; if (i2 % 2 != 0) { throw null; } return; } Executors.newSingleThreadExecutor().execute(ioVar); throw null; } catch (Throwable th) { jw.m3315(m3255("\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0000\u0000", false, new int[]{0, 14, 177, 9}).intern(), m3255("\u0000\u0000\u0000\u0001\u0000\u0001\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0001\u0000\u0001", true, new int[]{14, 26, 165, 0}).intern(), th, false); } } /* renamed from: k, reason: contains not printable characters */ public static long m3253() { int i = f2734 + 53; f2735 = i % 128; int i2 = i % 2; long timeInMillis = Calendar.getInstance().getTimeInMillis(); int i3 = f2734 + 27; f2735 = i3 % 128; int i4 = i3 % 2; return timeInMillis; } /* renamed from: ヌ, reason: contains not printable characters */ public static long m3254() { int i = f2735 + 85; f2734 = i % 128; int i2 = i % 2; long elapsedRealtime = SystemClock.elapsedRealtime(); int i3 = f2734 + 87; f2735 = i3 % 128; int i4 = i3 % 2; return elapsedRealtime; } /* renamed from: メ, reason: contains not printable characters */ public static String m3257(String str, String str2, String str3, String str4) { int i; CipherInputStream cipherInputStream; CipherInputStream cipherInputStream2; StringBuilder sb = new StringBuilder(); try { byte[] decode = Base64.decode(str.getBytes(), 0); byte[] copyOfRange = Arrays.copyOfRange(decode, 16, decode.length); try { try { byte[] m3256 = m3256(str3); byte[] m32562 = m3256(str4); Cipher cipher = Cipher.getInstance(m3255("\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0001\u0001\u0000", true, new int[]{40, 20, 16, 6}).intern()); cipher.init(2, SecretKeyFactory.getInstance(m3255("\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0000\u0001\u0000\u0000\u0001\u0001\u0000\u0001\u0001\u0001\u0000\u0000\u0000\u0000\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0000\u0001\u0000\u0000\u0001", false, new int[]{60, 34, 0, 31}).intern(), m3255("\u0000\u0001", false, new int[]{94, 2, 0, 2}).intern()).generateSecret(new PBEKeySpec(str2.toCharArray(), m32562, 1, 256)), new IvParameterSpec(m3256, 0, cipher.getBlockSize())); cipherInputStream2 = new CipherInputStream(new ByteArrayInputStream(copyOfRange), cipher); } catch (Throwable th) { th = th; i = 9; cipherInputStream = null; } } catch (Throwable unused) { } try { m3255("\u0001\u0001\u0000\u0001\u0001", false, new int[]{96, 5, FacebookRequestErrorClassification.EC_INVALID_TOKEN, 0}).intern(); byte[] bArr = new byte[8192]; int read = cipherInputStream2.read(bArr); while (read >= 0) { sb.append(new String(bArr, 0, read, m3255("\u0001\u0001\u0000\u0001\u0001", false, new int[]{96, 5, FacebookRequestErrorClassification.EC_INVALID_TOKEN, 0}).intern())); read = cipherInputStream2.read(bArr); int i2 = f2735 + 39; f2734 = i2 % 128; int i3 = i2 % 2; } cipherInputStream2.close(); } catch (Throwable th2) { th = th2; cipherInputStream = cipherInputStream2; i = 9; try { jw.m3315(m3255("\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0000\u0000", false, new int[]{0, 14, 177, i}).intern(), m3255("\u0001\u0000\u0001\u0001\u0000\u0001\u0000\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0000\u0001", true, new int[]{101, 23, 155, 6}).intern(), th, false); if (cipherInputStream != null) { cipherInputStream.close(); int i4 = f2735 + 57; f2734 = i4 % 128; int i5 = i4 % 2; } return sb.toString(); } catch (Throwable th3) { if (cipherInputStream != null) { try { cipherInputStream.close(); } catch (Throwable unused2) { } } throw th3; } } } catch (Throwable th4) { jw.m3315(m3255("\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0000\u0000", false, new int[]{0, 14, 177, 9}).intern(), m3255("\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0000\u0000\u0001\u0000\u0001\u0001\u0000\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0000", false, new int[]{124, 27, 57, 11}).intern(), th4, false); } return sb.toString(); } /* renamed from: ヌ, reason: contains not printable characters */ private static byte[] m3256(String str) { int i = f2734 + 117; f2735 = i % 128; int i2 = i % 2; int length = str.length(); byte[] bArr = new byte[length / 2]; int i3 = 0; while (i3 < length) { int i4 = f2734 + 17; f2735 = i4 % 128; if (i4 % 2 != 0) { bArr[i3 >>> 2] = (byte) ((Character.digit(str.charAt(i3), 1) / 3) % Character.digit(str.charAt(i3), 32)); i3 += 86; } else { bArr[i3 / 2] = (byte) ((Character.digit(str.charAt(i3), 16) << 4) + Character.digit(str.charAt(i3 + 1), 16)); i3 += 2; } } return bArr; } /* renamed from: ﻐ, reason: contains not printable characters */ public static List m3251(List list, List list2) { HashSet hashSet = new HashSet(list); if (list2 != null) { int i = f2735 + 41; f2734 = i % 128; if (i % 2 == 0) { hashSet.addAll(list2); throw null; } hashSet.addAll(list2); } ArrayList arrayList = new ArrayList(hashSet); int i2 = f2735 + 117; f2734 = i2 % 128; int i3 = i2 % 2; return arrayList; } /* renamed from: ヌ, reason: contains not printable characters */ private static String m3255(String str, boolean z, int[] iArr) { String str2; byte[] bArr = str; if (str != null) { bArr = str.getBytes("ISO-8859-1"); } byte[] bArr2 = bArr; synchronized (g.f2033) { try { int i = iArr[0]; int i2 = iArr[1]; int i3 = iArr[2]; int i4 = iArr[3]; char[] cArr = new char[i2]; System.arraycopy(f2733, i, cArr, 0, i2); if (bArr2 != null) { char[] cArr2 = new char[i2]; g.f2032 = 0; char c = 0; while (true) { int i5 = g.f2032; if (i5 >= i2) { break; } if (bArr2[i5] == 1) { cArr2[i5] = (char) (((cArr[i5] << 1) + 1) - c); } else { cArr2[i5] = (char) ((cArr[i5] << 1) - c); } c = cArr2[i5]; g.f2032 = i5 + 1; } cArr = cArr2; } if (i4 > 0) { char[] cArr3 = new char[i2]; System.arraycopy(cArr, 0, cArr3, 0, i2); int i6 = i2 - i4; System.arraycopy(cArr3, 0, cArr, i6, i4); System.arraycopy(cArr3, i4, cArr, 0, i6); } if (z) { char[] cArr4 = new char[i2]; g.f2032 = 0; while (true) { int i7 = g.f2032; if (i7 >= i2) { break; } cArr4[i7] = cArr[(i2 - i7) - 1]; g.f2032 = i7 + 1; } cArr = cArr4; } if (i3 > 0) { g.f2032 = 0; while (true) { int i8 = g.f2032; if (i8 >= i2) { break; } cArr[i8] = (char) (cArr[i8] - iArr[2]); g.f2032 = i8 + 1; } } str2 = new String(cArr); } catch (Throwable th) { throw th; } } return str2; } }