255 lines
9.7 KiB
Java
255 lines
9.7 KiB
Java
package com.google.android.gms.internal.gtm;
|
|
|
|
import android.os.SystemClock;
|
|
import android.text.TextUtils;
|
|
import android.view.Gravity;
|
|
import android.view.KeyEvent;
|
|
import android.view.View;
|
|
import android.view.ViewConfiguration;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import com.google.common.primitives.UnsignedBytes;
|
|
import java.lang.reflect.Method;
|
|
import java.util.Locale;
|
|
import o.C4593bdB;
|
|
import o.xzZ;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class zzdp {
|
|
private static final byte[] $$a = {101, -49, 33, 116};
|
|
private static final int $$b = 82;
|
|
private static int $10 = 0;
|
|
private static int $11 = 1;
|
|
private static int e = 0;
|
|
private static int c = 1;
|
|
private static long d = -5975610626120532765L;
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x0028 */
|
|
/* JADX WARN: Removed duplicated region for block: B:7:0x0020 */
|
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0028 -> B:4:0x002d). 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 b(short r7, byte r8, short r9, java.lang.Object[] r10) {
|
|
/*
|
|
int r9 = r9 * 3
|
|
int r9 = r9 + 4
|
|
byte[] r0 = com.google.android.gms.internal.gtm.zzdp.$$a
|
|
int r8 = r8 + 77
|
|
int r7 = r7 * 4
|
|
int r7 = 1 - r7
|
|
byte[] r1 = new byte[r7]
|
|
r2 = 0
|
|
if (r0 != 0) goto L15
|
|
r3 = r7
|
|
r8 = r9
|
|
r5 = r2
|
|
goto L2d
|
|
L15:
|
|
r3 = r2
|
|
L16:
|
|
r6 = r9
|
|
r9 = r8
|
|
r8 = r6
|
|
byte r4 = (byte) r9
|
|
int r5 = r3 + 1
|
|
r1[r3] = r4
|
|
if (r5 != r7) goto L28
|
|
java.lang.String r7 = new java.lang.String
|
|
r7.<init>(r1, r2)
|
|
r10[r2] = r7
|
|
return
|
|
L28:
|
|
r3 = r0[r8]
|
|
r6 = r9
|
|
r9 = r8
|
|
r8 = r6
|
|
L2d:
|
|
int r3 = -r3
|
|
int r9 = r9 + 1
|
|
int r8 = r8 + r3
|
|
r3 = r5
|
|
goto L16
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.gtm.zzdp.b(short, byte, short, java.lang.Object[]):void");
|
|
}
|
|
|
|
public static String encode(byte[] bArr) {
|
|
Object obj;
|
|
int i = 2 % 2;
|
|
StringBuilder sb = new StringBuilder();
|
|
for (byte b : bArr) {
|
|
if ((b & 240) == 0) {
|
|
int i2 = e + 15;
|
|
c = i2 % 128;
|
|
if (i2 % 2 == 0) {
|
|
Object[] objArr = new Object[1];
|
|
a(new char[]{12053}, 55201 - Gravity.getAbsoluteGravity(0, 0), objArr);
|
|
obj = objArr[0];
|
|
} else {
|
|
Object[] objArr2 = new Object[1];
|
|
a(new char[]{12053}, 55201 - Gravity.getAbsoluteGravity(0, 0), objArr2);
|
|
obj = objArr2[0];
|
|
}
|
|
sb.append(((String) obj).intern());
|
|
}
|
|
sb.append(Integer.toHexString(b & UnsignedBytes.MAX_VALUE));
|
|
}
|
|
String upperCase = sb.toString().toUpperCase(Locale.ENGLISH);
|
|
int i3 = c + 91;
|
|
e = i3 % 128;
|
|
if (i3 % 2 == 0) {
|
|
return upperCase;
|
|
}
|
|
throw null;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x004f A[LOOP:0: B:4:0x0010->B:10:0x004f, LOOP_END] */
|
|
/* JADX WARN: Removed duplicated region for block: B:11:0x0063 A[SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public static byte[] decode(java.lang.String r8) {
|
|
/*
|
|
r0 = 2
|
|
int r1 = r0 % r0
|
|
int r1 = r8.length()
|
|
int r2 = r1 % 2
|
|
if (r2 != 0) goto L75
|
|
int r2 = r1 / 2
|
|
byte[] r2 = new byte[r2]
|
|
r3 = 0
|
|
L10:
|
|
if (r3 >= r1) goto L6b
|
|
int r4 = com.google.android.gms.internal.gtm.zzdp.e
|
|
int r4 = r4 + 75
|
|
int r5 = r4 % 128
|
|
com.google.android.gms.internal.gtm.zzdp.c = r5
|
|
int r4 = r4 % r0
|
|
r5 = -1
|
|
if (r4 != 0) goto L37
|
|
char r4 = r8.charAt(r3)
|
|
r6 = 57
|
|
int r4 = java.lang.Character.digit(r4, r6)
|
|
int r6 = r3 >> 1
|
|
char r6 = r8.charAt(r6)
|
|
r7 = 122(0x7a, float:1.71E-43)
|
|
int r6 = java.lang.Character.digit(r6, r7)
|
|
if (r4 == r5) goto L63
|
|
goto L4d
|
|
L37:
|
|
char r4 = r8.charAt(r3)
|
|
r6 = 16
|
|
int r4 = java.lang.Character.digit(r4, r6)
|
|
int r7 = r3 + 1
|
|
char r7 = r8.charAt(r7)
|
|
int r6 = java.lang.Character.digit(r7, r6)
|
|
if (r4 == r5) goto L63
|
|
L4d:
|
|
if (r6 == r5) goto L63
|
|
int r5 = com.google.android.gms.internal.gtm.zzdp.e
|
|
int r5 = r5 + 1
|
|
int r7 = r5 % 128
|
|
com.google.android.gms.internal.gtm.zzdp.c = r7
|
|
int r5 = r5 % r0
|
|
int r5 = r3 / 2
|
|
int r4 = r4 << 4
|
|
int r4 = r4 + r6
|
|
byte r4 = (byte) r4
|
|
r2[r5] = r4
|
|
int r3 = r3 + 2
|
|
goto L10
|
|
L63:
|
|
java.lang.IllegalArgumentException r8 = new java.lang.IllegalArgumentException
|
|
java.lang.String r0 = "purported base16 string has illegal char"
|
|
r8.<init>(r0)
|
|
throw r8
|
|
L6b:
|
|
int r8 = com.google.android.gms.internal.gtm.zzdp.e
|
|
int r8 = r8 + 111
|
|
int r1 = r8 % 128
|
|
com.google.android.gms.internal.gtm.zzdp.c = r1
|
|
int r8 = r8 % r0
|
|
return r2
|
|
L75:
|
|
java.lang.IllegalArgumentException r8 = new java.lang.IllegalArgumentException
|
|
java.lang.String r0 = "purported base16 string has odd number of characters"
|
|
r8.<init>(r0)
|
|
throw r8
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.gtm.zzdp.decode(java.lang.String):byte[]");
|
|
}
|
|
|
|
private static void a(char[] cArr, int i, Object[] objArr) {
|
|
int i2 = 2 % 2;
|
|
C4593bdB c4593bdB = new C4593bdB();
|
|
c4593bdB.a = i;
|
|
int length = cArr.length;
|
|
long[] jArr = new long[length];
|
|
c4593bdB.e = 0;
|
|
while (c4593bdB.e < cArr.length) {
|
|
int i3 = $11 + 45;
|
|
$10 = i3 % 128;
|
|
int i4 = i3 % 2;
|
|
int i5 = c4593bdB.e;
|
|
try {
|
|
Object[] objArr2 = {Integer.valueOf(cArr[c4593bdB.e]), c4593bdB, c4593bdB};
|
|
Object obj = xzZ.y.get(-1229953068);
|
|
if (obj == null) {
|
|
Class cls = (Class) xzZ.c(TextUtils.getOffsetBefore("", 0) + 402, 5 - View.MeasureSpec.makeMeasureSpec(0, 0), (char) (21608 - (ViewConfiguration.getTouchSlop() >> 8)));
|
|
byte b = (byte) 0;
|
|
byte b2 = b;
|
|
Object[] objArr3 = new Object[1];
|
|
b(b, b2, b2, objArr3);
|
|
obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Object.class, Object.class);
|
|
xzZ.y.put(-1229953068, obj);
|
|
}
|
|
jArr[i5] = ((Long) ((Method) obj).invoke(null, objArr2)).longValue() ^ (d ^ (-6958928035870403642L));
|
|
Object[] objArr4 = {c4593bdB, c4593bdB};
|
|
Object obj2 = xzZ.y.get(-1143917229);
|
|
if (obj2 == null) {
|
|
Class cls2 = (Class) xzZ.c(TextUtils.indexOf((CharSequence) "", '0', 0, 0) + 239, (ViewConfiguration.getScrollBarSize() >> 8) + 5, (char) TextUtils.indexOf("", "", 0));
|
|
byte b3 = (byte) 0;
|
|
byte b4 = (byte) (b3 + 1);
|
|
Object[] objArr5 = new Object[1];
|
|
b(b3, b4, (byte) (b4 - 1), objArr5);
|
|
obj2 = cls2.getMethod((String) objArr5[0], Object.class, Object.class);
|
|
xzZ.y.put(-1143917229, obj2);
|
|
}
|
|
((Method) obj2).invoke(null, objArr4);
|
|
} catch (Throwable th) {
|
|
Throwable cause = th.getCause();
|
|
if (cause == null) {
|
|
throw th;
|
|
}
|
|
throw cause;
|
|
}
|
|
}
|
|
char[] cArr2 = new char[length];
|
|
c4593bdB.e = 0;
|
|
while (c4593bdB.e < cArr.length) {
|
|
int i6 = $10 + 103;
|
|
$11 = i6 % 128;
|
|
int i7 = i6 % 2;
|
|
cArr2[c4593bdB.e] = (char) jArr[c4593bdB.e];
|
|
Object[] objArr6 = {c4593bdB, c4593bdB};
|
|
Object obj3 = xzZ.y.get(-1143917229);
|
|
if (obj3 == null) {
|
|
Class cls3 = (Class) xzZ.c(237 - ((byte) KeyEvent.getModifierMetaStateMask()), 6 - (ViewConfiguration.getScrollFriction() > BitmapDescriptorFactory.HUE_RED ? 1 : (ViewConfiguration.getScrollFriction() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), (char) (1 - (SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1))));
|
|
byte b5 = (byte) 0;
|
|
byte b6 = (byte) (b5 + 1);
|
|
Object[] objArr7 = new Object[1];
|
|
b(b5, b6, (byte) (b6 - 1), objArr7);
|
|
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
|
|
xzZ.y.put(-1143917229, obj3);
|
|
}
|
|
((Method) obj3).invoke(null, objArr6);
|
|
int i8 = $11 + 23;
|
|
$10 = i8 % 128;
|
|
int i9 = i8 % 2;
|
|
}
|
|
objArr[0] = new String(cArr2);
|
|
}
|
|
}
|