what-the-bank/sources/o/Ymn.java

511 lines
17 KiB
Java

package o;
import android.graphics.ImageFormat;
import android.os.Process;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewConfiguration;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Method;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes3.dex */
public final class Ymn {
private static final byte[] $$a = {104, 69, 71, -100};
private static final int $$b = CipherSuite.TLS_PSK_WITH_RC4_128_SHA;
private static int $10 = 0;
private static int $11 = 1;
private static int b = 0;
private static int e = 1;
private static char[] c = {40099};
/* JADX WARN: Removed duplicated region for block: B:10:0x002c */
/* JADX WARN: Removed duplicated region for block: B:7:0x0024 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x002c -> B:4:0x002e). 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 g(int r6, int r7, int r8, java.lang.Object[] r9) {
/*
byte[] r0 = o.Ymn.$$a
int r6 = r6 * 3
int r6 = r6 + 4
int r8 = r8 * 2
int r8 = 73 - r8
int r7 = r7 * 3
int r1 = 1 - r7
byte[] r1 = new byte[r1]
r2 = 0
int r7 = 0 - r7
if (r0 != 0) goto L19
r8 = r6
r3 = r7
r4 = r2
goto L2e
L19:
r3 = r2
r5 = r8
r8 = r6
r6 = r5
L1d:
byte r4 = (byte) r6
r1[r3] = r4
int r4 = r3 + 1
if (r3 != r7) goto L2c
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L2c:
r3 = r0[r8]
L2e:
int r6 = r6 + r3
int r8 = r8 + 1
r3 = r4
goto L1d
*/
throw new UnsupportedOperationException("Method not decompiled: o.Ymn.g(int, int, int, java.lang.Object[]):void");
}
private static byte[] c(byte[] bArr) {
int i = 2 % 2;
int i2 = b + 97;
e = i2 % 128;
if (i2 % 2 == 0) {
LWm.a(bArr);
throw null;
}
byte[] a = LWm.a(bArr);
int i3 = e + 125;
b = i3 % 128;
if (i3 % 2 != 0) {
int i4 = 70 / 0;
}
return a;
}
public static byte[] b(String str) {
int i = 2 % 2;
int i2 = e + 69;
b = i2 % 128;
int i3 = i2 % 2;
byte[] d = d(str);
if (i3 != 0) {
c(d);
Object obj = null;
obj.hashCode();
throw null;
}
byte[] c2 = c(d);
int i4 = b + 33;
e = i4 % 128;
int i5 = i4 % 2;
return c2;
}
public static byte[] d(byte[] bArr) {
int i = 2 % 2;
int i2 = b + 81;
e = i2 % 128;
if (i2 % 2 == 0) {
Sts.d(bArr);
throw null;
}
byte[] d = Sts.d(bArr);
int i3 = b + 113;
e = i3 % 128;
int i4 = i3 % 2;
return d;
}
public static String b(byte[] bArr) {
int i = 2 % 2;
int i2 = e + 81;
b = i2 % 128;
int i3 = i2 % 2;
String a = a(Sts.d(bArr));
int i4 = b + 69;
e = i4 % 128;
if (i4 % 2 != 0) {
return a;
}
throw null;
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ Object c(Object[] objArr) {
byte[] bArr = (byte[]) objArr[0];
int i = 2 % 2;
int i2 = b + 9;
e = i2 % 128;
int i3 = i2 % 2;
byte[] c2 = Sts.c(bArr);
if (i3 == 0) {
int i4 = 94 / 0;
}
int i5 = b + 21;
e = i5 % 128;
int i6 = i5 % 2;
return c2;
}
public static byte[] a(String str) {
int i = 2 % 2;
int i2 = b + 3;
e = i2 % 128;
if (i2 % 2 != 0 ? str.length() % 2 == 1 : (str.length() << 3) == 0) {
Object[] objArr = new Object[1];
f(null, new int[]{0, 1, 120, 1}, true, objArr);
StringBuilder sb = new StringBuilder(((String) objArr[0]).intern());
sb.append(str);
str = sb.toString();
}
Object[] objArr2 = {d(str)};
byte[] bArr = (byte[]) c(objArr2);
int i3 = b + 23;
e = i3 % 128;
if (i3 % 2 == 0) {
int i4 = 55 / 0;
}
return bArr;
}
public static byte[] d(String str) {
int i = 2 % 2;
int i2 = b;
int i3 = i2 + 123;
e = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
if (str != null) {
try {
return str.getBytes("UTF-8");
} catch (UnsupportedEncodingException unused) {
return str.getBytes();
}
}
int i4 = i2 + 27;
e = i4 % 128;
int i5 = i4 % 2;
return null;
}
public static String a(byte[] bArr) {
int i = 2 % 2;
int i2 = b + 125;
int i3 = i2 % 128;
e = i3;
int i4 = i2 % 2;
Object obj = null;
if (bArr == null) {
int i5 = i3 + 85;
b = i5 % 128;
int i6 = i5 % 2;
return null;
}
try {
String str = new String(bArr, "UTF-8");
int i7 = e + 27;
b = i7 % 128;
if (i7 % 2 == 0) {
return str;
}
obj.hashCode();
throw null;
} catch (UnsupportedEncodingException unused) {
return new String(bArr);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes3.dex */
public static final class LWm {
private static byte[] a;
static {
Ymn.d("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");
a = new byte[256];
for (int i = 0; i < 256; i++) {
a[i] = -1;
}
for (int i2 = 65; i2 <= 90; i2++) {
a[i2] = (byte) (i2 - 65);
}
for (int i3 = 97; i3 <= 122; i3++) {
a[i3] = (byte) (i3 - 71);
}
for (int i4 = 48; i4 <= 57; i4++) {
a[i4] = (byte) (i4 + 4);
}
byte[] bArr = a;
bArr[43] = 62;
bArr[47] = 63;
}
public static byte[] a(byte[] bArr) {
try {
int length = bArr.length;
for (byte b : bArr) {
if (b > 255 || a[b] < 0) {
length--;
}
}
int i = (length / 4) * 3;
if (length % 4 == 3) {
i += 2;
}
if (length % 4 == 2) {
i++;
}
byte[] bArr2 = new byte[i];
int i2 = 0;
int i3 = 0;
int i4 = 0;
for (int i5 = 0; i5 < bArr.length; i5++) {
byte b2 = bArr[i5];
byte b3 = b2 > 255 ? (byte) -1 : a[b2];
if (b3 >= 0) {
int i6 = i3 + 6;
i4 = (i4 << 6) | b3;
if (i6 >= 8) {
i3 -= 2;
bArr2[i2] = (byte) (i4 >> i3);
i2++;
} else {
i3 = i6;
}
}
}
if (i2 == i) {
return bArr2;
}
StringBuilder sb = new StringBuilder();
sb.append("Miscalculated data length (wrote ");
sb.append(i2);
sb.append(" instead of ");
sb.append(i);
sb.append(")");
throw new IllegalArgumentException(sb.toString());
} catch (ArrayIndexOutOfBoundsException unused) {
StringBuilder sb2 = new StringBuilder("Data is not base64 encoded, data=");
sb2.append(Ymn.a(bArr));
throw new IllegalArgumentException(sb2.toString());
}
}
}
private static void f(byte[] bArr, int[] iArr, boolean z, Object[] objArr) {
int length;
char[] cArr;
char[] cArr2;
int i = 2 % 2;
TVH tvh = new TVH();
int i2 = 0;
int i3 = iArr[0];
int i4 = iArr[1];
int i5 = iArr[2];
int i6 = iArr[3];
char[] cArr3 = c;
if (cArr3 != null) {
int i7 = $10 + 115;
$11 = i7 % 128;
if (i7 % 2 == 0) {
length = cArr3.length;
cArr = new char[length];
} else {
length = cArr3.length;
cArr = new char[length];
}
int i8 = 0;
while (i8 < length) {
try {
Object[] objArr2 = new Object[1];
objArr2[i2] = Integer.valueOf(cArr3[i8]);
Object obj = xzZ.y.get(1645349359);
if (obj != null) {
cArr2 = cArr3;
} else {
Class cls = (Class) xzZ.c(223 - TextUtils.indexOf("", "", i2, i2), (ViewConfiguration.getKeyRepeatDelay() >> 16) + 5, (char) (41978 - (ViewConfiguration.getGlobalActionKeyTimeout() > 0L ? 1 : (ViewConfiguration.getGlobalActionKeyTimeout() == 0L ? 0 : -1))));
byte b2 = (byte) i2;
byte b3 = b2;
cArr2 = cArr3;
Object[] objArr3 = new Object[1];
g(b2, b3, (byte) (b3 + 1), objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
xzZ.y.put(1645349359, obj);
}
cArr[i8] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
i8++;
cArr3 = cArr2;
i2 = 0;
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
cArr3 = cArr;
}
char[] cArr4 = new char[i4];
System.arraycopy(cArr3, i3, cArr4, 0, i4);
if (bArr != null) {
char[] cArr5 = new char[i4];
tvh.c = 0;
char c2 = 0;
while (tvh.c < i4) {
if (bArr[tvh.c] == 1) {
int i9 = tvh.c;
try {
Object[] objArr4 = {Integer.valueOf(cArr4[tvh.c]), Integer.valueOf(c2)};
Object obj2 = xzZ.y.get(850398076);
if (obj2 == null) {
obj2 = ((Class) xzZ.c(502 - (ViewConfiguration.getTouchSlop() >> 8), (SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1)) + 4, (char) (54 - TextUtils.getTrimmedLength("")))).getMethod("F", Integer.TYPE, Integer.TYPE);
xzZ.y.put(850398076, obj2);
}
cArr5[i9] = ((Character) ((Method) obj2).invoke(null, objArr4)).charValue();
} catch (Throwable th2) {
Throwable cause2 = th2.getCause();
if (cause2 == null) {
throw th2;
}
throw cause2;
}
} else {
int i10 = tvh.c;
Object[] objArr5 = {Integer.valueOf(cArr4[tvh.c]), Integer.valueOf(c2)};
Object obj3 = xzZ.y.get(1084521042);
if (obj3 == null) {
obj3 = ((Class) xzZ.c(TextUtils.getOffsetBefore("", 0) + 15, (Process.myTid() >> 22) + 5, (char) (58133 - ImageFormat.getBitsPerPixel(0)))).getMethod("H", Integer.TYPE, Integer.TYPE);
xzZ.y.put(1084521042, obj3);
}
cArr5[i10] = ((Character) ((Method) obj3).invoke(null, objArr5)).charValue();
}
c2 = cArr5[tvh.c];
try {
Object[] objArr6 = {tvh, tvh};
Object obj4 = xzZ.y.get(1698744941);
if (obj4 == null) {
Class cls2 = (Class) xzZ.c(402 - View.resolveSizeAndState(0, 0, 0), 4 - TextUtils.indexOf((CharSequence) "", '0'), (char) (TextUtils.indexOf("", "", 0) + 21608));
byte b4 = (byte) 0;
byte b5 = b4;
Object[] objArr7 = new Object[1];
g(b4, b5, b5, objArr7);
obj4 = cls2.getMethod((String) objArr7[0], Object.class, Object.class);
xzZ.y.put(1698744941, obj4);
}
((Method) obj4).invoke(null, objArr6);
} catch (Throwable th3) {
Throwable cause3 = th3.getCause();
if (cause3 == null) {
throw th3;
}
throw cause3;
}
}
cArr4 = cArr5;
}
if (i6 > 0) {
int i11 = $11 + 59;
$10 = i11 % 128;
int i12 = i11 % 2;
char[] cArr6 = new char[i4];
System.arraycopy(cArr4, 0, cArr6, 0, i4);
int i13 = i4 - i6;
System.arraycopy(cArr6, 0, cArr4, i13, i6);
System.arraycopy(cArr6, i6, cArr4, 0, i13);
}
if (z) {
int i14 = $11 + 29;
$10 = i14 % 128;
int i15 = i14 % 2;
char[] cArr7 = new char[i4];
int i16 = 0;
while (true) {
tvh.c = i16;
if (tvh.c >= i4) {
break;
}
cArr7[tvh.c] = cArr4[(i4 - tvh.c) - 1];
i16 = tvh.c + 1;
}
cArr4 = cArr7;
}
if (i5 > 0) {
int i17 = 0;
while (true) {
tvh.c = i17;
if (tvh.c >= i4) {
break;
}
cArr4[tvh.c] = (char) (cArr4[tvh.c] - iArr[2]);
i17 = tvh.c + 1;
}
}
objArr[0] = new String(cArr4);
}
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes3.dex */
public static final class Sts {
private static byte[] d = new byte[255];
private static final byte[] c = Ymn.d("0123456789ABCDEF");
static {
for (int i = 0; i < 255; i++) {
d[i] = -1;
}
for (int i2 = 57; i2 >= 48; i2--) {
d[i2] = (byte) (i2 - 48);
}
for (int i3 = 70; i3 >= 65; i3--) {
d[i3] = (byte) (i3 - 55);
}
for (int i4 = 102; i4 >= 97; i4--) {
d[i4] = (byte) (i4 - 87);
}
}
public static byte[] d(byte[] bArr) {
int length = bArr.length;
byte[] bArr2 = new byte[length << 1];
for (int i = 0; i < length; i++) {
int i2 = i << 1;
byte[] bArr3 = c;
bArr2[i2] = bArr3[(bArr[i] & 240) >> 4];
bArr2[i2 + 1] = bArr3[bArr[i] & 15];
}
return bArr2;
}
public static byte[] c(byte[] bArr) {
return b(bArr, bArr.length);
}
private static byte[] b(byte[] bArr, int i) {
try {
int i2 = i / 2;
byte[] bArr2 = new byte[i2];
for (int i3 = 0; i3 < i2; i3++) {
byte[] bArr3 = d;
int i4 = i3 << 1;
bArr2[i3] = (byte) (bArr3[bArr[i4 + 1]] | (bArr3[bArr[i4]] << 4));
}
return bArr2;
} catch (ArrayIndexOutOfBoundsException unused) {
StringBuilder sb = new StringBuilder("Data is not hexbin encoded, data=");
sb.append(Ymn.a(bArr));
throw new IllegalArgumentException(sb.toString());
}
}
}
private static byte[] e(byte[] bArr) {
return (byte[]) c(new Object[]{bArr});
}
}