package com.facetec.sdk; import android.graphics.Color; import android.media.AudioTrack; import android.os.Process; import android.os.SystemClock; import android.text.TextUtils; import android.util.TypedValue; import android.view.View; import android.view.ViewConfiguration; import android.widget.ExpandableListView; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import java.lang.reflect.Method; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import javax.crypto.Cipher; import javax.crypto.KeyGenerator; /* loaded from: classes.dex */ abstract class am { private static final byte[] $$d = null; private static final int $$e = 0; private static int $10; private static int $11; private static long a; private static int b; private static int c; private static int d; private static char e; /* JADX WARN: Removed duplicated region for block: B:10:0x0026 */ /* JADX WARN: Removed duplicated region for block: B:7:0x001e */ /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0026 -> B:4:0x0028). Please report as a decompilation issue!!! */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ private static void i(byte r6, byte r7, byte r8, java.lang.Object[] r9) { /* int r6 = r6 << 1 int r6 = r6 + 1 int r8 = r8 << 2 int r8 = 106 - r8 byte[] r0 = com.facetec.sdk.am.$$d int r7 = r7 * 3 int r7 = 4 - r7 byte[] r1 = new byte[r6] r2 = 0 if (r0 != 0) goto L16 r3 = r6 r4 = r2 goto L28 L16: r3 = r2 L17: int r4 = r3 + 1 byte r5 = (byte) r8 r1[r3] = r5 if (r4 != r6) goto L26 java.lang.String r6 = new java.lang.String r6.(r1, r2) r9[r2] = r6 return L26: r3 = r0[r7] L28: int r8 = r8 + r3 int r7 = r7 + 1 r3 = r4 goto L17 */ throw new UnsupportedOperationException("Method not decompiled: com.facetec.sdk.am.i(byte, byte, byte, java.lang.Object[]):void"); } /* JADX INFO: Access modifiers changed from: protected */ public static byte[] b(Cipher cipher, byte[] bArr) throws Exception { b = (c + 15) % 128; try { byte[] doFinal = cipher.doFinal(bArr); int i = b + 93; c = i % 128; if (i % 2 == 0) { return doFinal; } throw null; } catch (Exception e2) { k.a(e2); return null; } } /* JADX INFO: Access modifiers changed from: protected */ public static byte[] d(Cipher cipher, byte[] bArr) throws Exception { int i = c + 41; b = i % 128; try { if (i % 2 != 0) { byte[] doFinal = cipher.doFinal(bArr); c = (b + 21) % 128; return doFinal; } cipher.doFinal(bArr); throw new ArithmeticException(); } catch (Exception e2) { k.a(e2); return null; } } /* JADX INFO: Access modifiers changed from: protected */ public static byte[] c() throws Exception { SecureRandom secureRandom = new SecureRandom(); try { int maximumFlingVelocity = ViewConfiguration.getMaximumFlingVelocity(); Object[] objArr = new Object[1]; h("\ude88㞘퉠", "\u0000\u0000\u0000\u0000", 902045718 - (maximumFlingVelocity >> 16), (char) (52667 - View.getDefaultSize(0, 0)), "ᛣ쐠묵韍", objArr); KeyGenerator keyGenerator = KeyGenerator.getInstance(((String) objArr[0]).intern()); keyGenerator.init(128, secureRandom); byte[] encoded = keyGenerator.generateKey().getEncoded(); int i = b + 13; c = i % 128; if (i % 2 == 0) { return encoded; } throw null; } catch (NoSuchAlgorithmException e2) { throw new Exception(av.e(e2.getMessage())); } } private static void h(String str, String str2, int i, char c2, String str3, Object[] objArr) { char[] cArr; char[] cArr2; char c3; if (str3 != null) { int i2 = $11 + 107; $10 = i2 % 128; if (i2 % 2 != 0) { throw null; } cArr = str3.toCharArray(); } else { cArr = str3; } char[] cArr3 = cArr; char[] charArray = str2 != null ? str2.toCharArray() : str2; if (str != null) { $11 = ($10 + 109) % 128; cArr2 = str.toCharArray(); } else { cArr2 = str; } go goVar = new go(); int length = cArr3.length; char[] cArr4 = new char[length]; int length2 = charArray.length; char[] cArr5 = new char[length2]; System.arraycopy(cArr3, 0, cArr4, 0, length); System.arraycopy(charArray, 0, cArr5, 0, length2); cArr4[0] = (char) (cArr4[0] ^ c2); cArr5[2] = (char) (cArr5[2] + ((char) i)); int length3 = cArr2.length; char[] cArr6 = new char[length3]; goVar.e = 0; while (goVar.e < length3) { try { Object[] objArr2 = {goVar}; Object obj = bo.s.get(1464055633); if (obj == null) { Class cls = (Class) bo.e(Color.argb(0, 0, 0, 0) + 710, (char) (AudioTrack.getMinVolume() > BitmapDescriptorFactory.HUE_RED ? 1 : (AudioTrack.getMinVolume() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), 25 - (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1))); Object[] objArr3 = new Object[1]; i((byte) 0, (byte) 0, (byte) 1, objArr3); obj = cls.getMethod((String) objArr3[0], Object.class); bo.s.put(1464055633, obj); } int intValue = ((Integer) ((Method) obj).invoke(null, objArr2)).intValue(); try { Object[] objArr4 = {goVar}; Object obj2 = bo.s.get(-1197337401); if (obj2 == null) { obj2 = ((Class) bo.e((ViewConfiguration.getGlobalActionKeyTimeout() > 0L ? 1 : (ViewConfiguration.getGlobalActionKeyTimeout() == 0L ? 0 : -1)) + 75, (char) (ViewConfiguration.getScrollBarFadeDuration() >> 16), (ViewConfiguration.getTouchSlop() >> 8) + 24)).getMethod("i", Object.class); bo.s.put(-1197337401, obj2); } int intValue2 = ((Integer) ((Method) obj2).invoke(null, objArr4)).intValue(); try { Object[] objArr5 = {goVar, Integer.valueOf(cArr4[goVar.e % 4] * 32718), Integer.valueOf(cArr5[intValue])}; Object obj3 = bo.s.get(1933927865); if (obj3 == null) { Class cls2 = (Class) bo.e(1020 - ExpandableListView.getPackedPositionType(0L), (char) (TypedValue.complexToFraction(0, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFraction(0, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), 23 - ((Process.getThreadPriority(0) + 20) >> 6)); Object[] objArr6 = new Object[1]; i((byte) 0, (byte) 0, (byte) 0, objArr6); obj3 = cls2.getMethod((String) objArr6[0], Object.class, Integer.TYPE, Integer.TYPE); bo.s.put(1933927865, obj3); } ((Method) obj3).invoke(null, objArr5); try { Object[] objArr7 = {Integer.valueOf(cArr4[intValue2] * 32718), Integer.valueOf(cArr5[intValue])}; Object obj4 = bo.s.get(854524359); if (obj4 == null) { c3 = 2; obj4 = ((Class) bo.e(Color.red(0) + 1877, (char) (23952 - TextUtils.indexOf("", "", 0, 0)), 24 - (Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1)))).getMethod("n", Integer.TYPE, Integer.TYPE); bo.s.put(854524359, obj4); } else { c3 = 2; } cArr5[intValue2] = ((Character) ((Method) obj4).invoke(null, objArr7)).charValue(); cArr4[intValue2] = goVar.c; cArr6[goVar.e] = (char) ((((int) (d ^ 7648925806061772164L)) ^ ((cArr4[intValue2] ^ r5[goVar.e]) ^ (a ^ 7648925806061772164L))) ^ ((char) (e ^ 7648925806061772164L))); goVar.e++; $10 = ($11 + 113) % 128; cArr5 = cArr5; } catch (Throwable th) { Throwable cause = th.getCause(); if (cause == null) { throw th; } throw cause; } } catch (Throwable th2) { Throwable cause2 = th2.getCause(); if (cause2 == null) { throw th2; } throw cause2; } } catch (Throwable th3) { Throwable cause3 = th3.getCause(); if (cause3 == null) { throw th3; } throw cause3; } } catch (Throwable th4) { Throwable cause4 = th4.getCause(); if (cause4 == null) { throw th4; } throw cause4; } } objArr[0] = new String(cArr6); } static void init$0() { $$d = new byte[]{38, 47, 46, 118}; $$e = 118; } static { init$0(); $10 = 0; $11 = 1; c = 0; b = 1; d = -1348379260; e = (char) 13610; a = 7648925806061772164L; } }