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

635 lines
22 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.media.AudioTrack;
import android.os.Process;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.eracom.OBM2.PINBlockException;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import io.beid.beidk.definitions.LivenessStatus;
import java.io.PrintStream;
import java.lang.reflect.Method;
import java.util.Properties;
import net.sf.scuba.smartcards.ISO7816;
import net.sf.scuba.smartcards.ISOFileInfo;
/* loaded from: classes.dex */
public final class xYb {
private int a;
private byte[] b;
private int c;
private int d;
private int e;
private C15899jUY f;
private static final byte[] $$a = {39, 45, ISO7816.INS_PUT_DATA, 49};
private static final int $$b = 22;
private static int $10 = 0;
private static int $11 = 1;
/* renamed from: o, reason: collision with root package name */
private static int f9312o = 0;
private static int l = 1;
private static char[] j = {16115};
private static int i = 1934311075;
private static boolean g = true;
private static boolean h = true;
/* 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:0x002c). 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 m(byte r6, byte r7, byte r8, java.lang.Object[] r9) {
/*
byte[] r0 = o.xYb.$$a
int r6 = r6 * 57
int r6 = r6 + 65
int r7 = r7 * 2
int r7 = 4 - r7
int r8 = r8 * 4
int r1 = r8 + 1
byte[] r1 = new byte[r1]
r2 = 0
if (r0 != 0) goto L16
r3 = r7
r4 = r2
goto L2c
L16:
r3 = r2
L17:
byte r4 = (byte) r6
r1[r3] = r4
int r4 = r3 + 1
if (r3 != r8) goto L26
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L26:
r3 = r0[r7]
r5 = r7
r7 = r6
r6 = r3
r3 = r5
L2c:
int r6 = r6 + r7
int r7 = r3 + 1
r3 = r4
goto L17
*/
throw new UnsupportedOperationException("Method not decompiled: o.xYb.m(byte, byte, byte, java.lang.Object[]):void");
}
public xYb(String str, Properties properties) throws PINBlockException {
e(str, properties);
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x002c, code lost:
if (r13 != null) goto L14;
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x005e, code lost:
r3 = 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:12:0x005f, code lost:
if (r13 == null) goto L28;
*/
/* JADX WARN: Code restructure failed: missing block: B:13:0x0061, code lost:
r8 = o.xYb.f9312o + 107;
o.xYb.l = r8 % 128;
r8 = r8 % 2;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x0070, code lost:
if (r13.containsKey("param_pinMaxLen") == true) goto L27;
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x0073, code lost:
r8 = java.lang.Integer.parseInt(r13.getProperty("param_pinMaxLen"));
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x007e, code lost:
r9 = r11.e;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x0080, code lost:
if (r9 > r8) goto L70;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x0082, code lost:
if (r9 < r3) goto L70;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0084, code lost:
if (r13 != null) goto L34;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0086, code lost:
r3 = o.xYb.l + 37;
o.xYb.f9312o = r3 % 128;
r3 = r3 % 2;
r3 = null;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0097, code lost:
if (r3 == null) goto L37;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x009a, code lost:
r6 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x009b, code lost:
r8 = 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:25:0x00a0, code lost:
if (r8 >= r12.length()) goto L79;
*/
/* JADX WARN: Code restructure failed: missing block: B:26:0x00a2, code lost:
r9 = o.xYb.f9312o + 73;
o.xYb.l = r9 % 128;
r9 = r9 % 2;
r9 = r12.charAt(r8);
*/
/* JADX WARN: Code restructure failed: missing block: B:27:0x00af, code lost:
if (r6 == false) goto L83;
*/
/* JADX WARN: Code restructure failed: missing block: B:29:0x00b5, code lost:
if (java.lang.Character.isDigit(r9) != false) goto L46;
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x00b7, code lost:
r6 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:32:0x00c2, code lost:
r8 = r8 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:33:0x00b9, code lost:
r1[r8] = (byte) java.lang.Character.digit(r9, 10);
*/
/* JADX WARN: Code restructure failed: missing block: B:37:0x00c5, code lost:
r0 = r12.getBytes("UTF-8");
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x00c9, code lost:
if (r3 == null) goto L54;
*/
/* JADX WARN: Code restructure failed: missing block: B:39:0x00cb, code lost:
if (r6 == false) goto L52;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x00d3, code lost:
throw new com.eracom.OBM2.PINBlockException("Error no : 11 - Invalid PIN String");
*/
/* JADX WARN: Code restructure failed: missing block: B:43:0x00d4, code lost:
if (r3 == null) goto L56;
*/
/* JADX WARN: Code restructure failed: missing block: B:44:0x00d6, code lost:
e(r12, r3);
*/
/* JADX WARN: Code restructure failed: missing block: B:45:0x00f1, code lost:
if (r13 == null) goto L61;
*/
/* JADX WARN: Code restructure failed: missing block: B:46:0x00f3, code lost:
r12 = (byte) java.lang.Integer.parseInt(r13.getProperty("AlgorithmID", "12"), 16);
*/
/* JADX WARN: Code restructure failed: missing block: B:48:0x0105, code lost:
r11.f = new o.C15899jUY(r12);
*/
/* JADX WARN: Code restructure failed: missing block: B:49:0x010c, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:51:0x010d, code lost:
r12 = move-exception;
*/
/* JADX WARN: Code restructure failed: missing block: B:52:0x010e, code lost:
r0 = new java.lang.StringBuilder();
r0.append(r12.getClass());
r0.append(": ");
r0.append(r12.getMessage());
*/
/* JADX WARN: Code restructure failed: missing block: B:53:0x012f, code lost:
throw new com.eracom.OBM2.PINBlockException(r0.toString());
*/
/* JADX WARN: Code restructure failed: missing block: B:54:0x0103, code lost:
r12 = com.google.common.base.Ascii.DC2;
*/
/* JADX WARN: Code restructure failed: missing block: B:55:0x00da, code lost:
if (r6 == false) goto L58;
*/
/* JADX WARN: Code restructure failed: missing block: B:56:0x00dc, code lost:
c(r1);
*/
/* JADX WARN: Code restructure failed: missing block: B:57:0x00e0, code lost:
r12 = new java.lang.Object[]{r11, r0};
r0 = java.lang.System.identityHashCode(r11);
r0 = a(r12);
*/
/* JADX WARN: Code restructure failed: missing block: B:59:0x0130, code lost:
r12 = move-exception;
*/
/* JADX WARN: Code restructure failed: missing block: B:60:0x0131, code lost:
r0 = new java.lang.StringBuilder("Error no : 11 - Invalid PIN String - ");
r0.append(r12.getMessage());
*/
/* JADX WARN: Code restructure failed: missing block: B:61:0x0146, code lost:
throw new com.eracom.OBM2.PINBlockException(r0.toString());
*/
/* JADX WARN: Code restructure failed: missing block: B:62:0x0091, code lost:
r3 = r13.getProperty("param_ISO_FORMAT_0_PAN");
*/
/* JADX WARN: Code restructure failed: missing block: B:64:0x014e, code lost:
throw new com.eracom.OBM2.PINBlockException("Error no : 10 - Invalid PIN length");
*/
/* JADX WARN: Code restructure failed: missing block: B:65:0x007c, code lost:
r8 = 30;
*/
/* JADX WARN: Code restructure failed: missing block: B:66:0x0038, code lost:
r3 = o.xYb.l + 99;
o.xYb.f9312o = r3 % 128;
*/
/* JADX WARN: Code restructure failed: missing block: B:67:0x0043, code lost:
if ((r3 % 2) == 0) goto L19;
*/
/* JADX WARN: Code restructure failed: missing block: B:68:0x0045, code lost:
r9 = 85 / 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:69:0x004c, code lost:
if (r13.containsKey("param_pinMinLen") == false) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:70:0x0055, code lost:
r3 = java.lang.Integer.parseInt(r13.getProperty("param_pinMinLen"));
*/
/* JADX WARN: Code restructure failed: missing block: B:72:0x0053, code lost:
if (r13.containsKey("param_pinMinLen") == false) goto L22;
*/
/* JADX WARN: Code restructure failed: missing block: B:74:0x0036, code lost:
if (r13 != null) goto L14;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void e(java.lang.String r12, java.util.Properties r13) throws com.eracom.OBM2.PINBlockException {
/*
Method dump skipped, instructions count: 364
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.xYb.e(java.lang.String, java.util.Properties):void");
}
private static void k(char[] cArr, byte[] bArr, int[] iArr, int i2, Object[] objArr) {
int i3 = 2;
int i4 = 2 % 2;
C3614bBe c3614bBe = new C3614bBe();
char[] cArr2 = j;
float f = BitmapDescriptorFactory.HUE_RED;
int i5 = 0;
if (cArr2 != null) {
int length = cArr2.length;
char[] cArr3 = new char[length];
int i6 = 0;
while (i6 < length) {
int i7 = $11 + 111;
$10 = i7 % 128;
if (i7 % i3 != 0) {
try {
Object[] objArr2 = new Object[1];
objArr2[i5] = Integer.valueOf(cArr2[i6]);
Object obj = xzZ.y.get(-950481649);
if (obj == null) {
Class cls = (Class) xzZ.c(337 - View.MeasureSpec.getMode(i5), Color.argb(i5, i5, i5, i5) + 5, (char) ((AudioTrack.getMaxVolume() > f ? 1 : (AudioTrack.getMaxVolume() == f ? 0 : -1)) - 1));
byte b = (byte) i5;
byte b2 = b;
Object[] objArr3 = new Object[1];
m(b, b2, b2, objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
xzZ.y.put(-950481649, obj);
}
cArr3[i6] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
} else {
Object[] objArr4 = {Integer.valueOf(cArr2[i6])};
Object obj2 = xzZ.y.get(-950481649);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c(337 - Color.red(0), TextUtils.lastIndexOf("", '0') + 6, (char) Drawable.resolveOpacity(0, 0));
byte b3 = (byte) 0;
byte b4 = b3;
Object[] objArr5 = new Object[1];
m(b3, b4, b4, objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE);
xzZ.y.put(-950481649, obj2);
}
cArr3[i6] = ((Character) ((Method) obj2).invoke(null, objArr4)).charValue();
i6++;
}
i3 = 2;
f = BitmapDescriptorFactory.HUE_RED;
i5 = 0;
}
cArr2 = cArr3;
}
Object[] objArr6 = {Integer.valueOf(i)};
Object obj3 = xzZ.y.get(-1521625011);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c(283 - (ViewConfiguration.getScrollBarFadeDuration() >> 16), 4 - (ExpandableListView.getPackedPositionForChild(0, 0) > 0L ? 1 : (ExpandableListView.getPackedPositionForChild(0, 0) == 0L ? 0 : -1)), (char) ((ViewConfiguration.getMaximumFlingVelocity() >> 16) + 39813));
byte b5 = (byte) 1;
byte b6 = (byte) (b5 - 1);
Object[] objArr7 = new Object[1];
m(b5, b6, b6, objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Integer.TYPE);
xzZ.y.put(-1521625011, obj3);
}
int intValue = ((Integer) ((Method) obj3).invoke(null, objArr6)).intValue();
if (h) {
int i8 = $10 + 13;
$11 = i8 % 128;
int i9 = i8 % 2;
c3614bBe.c = bArr.length;
char[] cArr4 = new char[c3614bBe.c];
c3614bBe.a = 0;
while (c3614bBe.a < c3614bBe.c) {
cArr4[c3614bBe.a] = (char) (cArr2[bArr[(c3614bBe.c - 1) - c3614bBe.a] + i2] - intValue);
Object[] objArr8 = {c3614bBe, c3614bBe};
Object obj4 = xzZ.y.get(1779759091);
if (obj4 == null) {
obj4 = ((Class) xzZ.c(40 - (ViewConfiguration.getScrollBarFadeDuration() >> 16), 5 - ((Process.getThreadPriority(0) + 20) >> 6), (char) ((AudioTrack.getMaxVolume() > BitmapDescriptorFactory.HUE_RED ? 1 : (AudioTrack.getMaxVolume() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) - 1))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj4);
}
((Method) obj4).invoke(null, objArr8);
int i10 = $10 + 121;
$11 = i10 % 128;
int i11 = i10 % 2;
}
objArr[0] = new String(cArr4);
return;
}
if (!g) {
c3614bBe.c = iArr.length;
char[] cArr5 = new char[c3614bBe.c];
c3614bBe.a = 0;
int i12 = $10 + 53;
$11 = i12 % 128;
int i13 = i12 % 2;
while (c3614bBe.a < c3614bBe.c) {
cArr5[c3614bBe.a] = (char) (cArr2[iArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - intValue);
c3614bBe.a++;
}
objArr[0] = new String(cArr5);
return;
}
int i14 = $11 + 45;
$10 = i14 % 128;
int i15 = i14 % 2;
c3614bBe.c = cArr.length;
char[] cArr6 = new char[c3614bBe.c];
c3614bBe.a = 0;
while (c3614bBe.a < c3614bBe.c) {
int i16 = $10 + 85;
$11 = i16 % 128;
if (i16 % 2 == 0) {
cArr6[c3614bBe.a] = (char) (cArr2[cArr[(c3614bBe.c + 1) >>> c3614bBe.a] >> i2] % intValue);
Object[] objArr9 = {c3614bBe, c3614bBe};
Object obj5 = xzZ.y.get(1779759091);
if (obj5 == null) {
obj5 = ((Class) xzZ.c(40 - TextUtils.indexOf("", "", 0), 5 - View.resolveSize(0, 0), (char) TextUtils.getOffsetBefore("", 0))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj5);
}
((Method) obj5).invoke(null, objArr9);
} else {
cArr6[c3614bBe.a] = (char) (cArr2[cArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - intValue);
Object[] objArr10 = {c3614bBe, c3614bBe};
Object obj6 = xzZ.y.get(1779759091);
if (obj6 == null) {
obj6 = ((Class) xzZ.c(40 - Color.alpha(0), Process.getGidForName("") + 6, (char) TextUtils.getTrimmedLength(""))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj6);
}
((Method) obj6).invoke(null, objArr10);
}
}
objArr[0] = new String(cArr6);
}
private void e(String str, String str2) {
int i2 = 2 % 2;
this.c = 100;
this.d = 8;
this.b = new byte[8];
int i3 = 0;
Object[] objArr = new Object[1];
k(null, new byte[]{ISOFileInfo.DATA_BYTES2}, null, ((Process.getThreadPriority(0) + 20) >> 6) + 127, objArr);
StringBuilder sb = new StringBuilder(((String) objArr[0]).intern());
sb.append(str.length());
for (int i4 = 0; i4 < 14 && i4 < str.length(); i4++) {
sb.append(str.charAt(i4));
}
while (sb.length() < 16) {
sb.append("F");
}
StringBuilder sb2 = new StringBuilder(LivenessStatus.OK);
sb2.append(str2.substring(str2.length() - 12, str2.length()));
int i5 = l + 31;
f9312o = i5 % 128;
if (i5 % 2 != 0) {
int i6 = 4 % 2;
}
while (i3 < this.d) {
int i7 = i3 << 1;
int i8 = i7 + 2;
this.b[i3] = (byte) (Integer.parseInt(sb2.substring(i7, i8), 16) ^ Integer.parseInt(sb.substring(i7, i8), 16));
i3++;
int i9 = f9312o + 43;
l = i9 % 128;
int i10 = i9 % 2;
}
PrintStream printStream = System.out;
StringBuilder sb3 = new StringBuilder("PINBlock ISO_0 len=");
sb3.append(this.d);
printStream.println(sb3.toString());
}
private void c(byte[] bArr) {
int i2 = 2 % 2;
int i3 = f9312o + 109;
l = i3 % 128;
int i4 = i3 % 2;
this.c = 1;
this.d = 8;
byte[] bArr2 = new byte[8];
this.b = bArr2;
int i5 = 0;
while (i5 < 8) {
int i6 = f9312o + 13;
int i7 = i6 % 128;
l = i7;
int i8 = i6 % 2;
bArr2[i5] = -1;
i5++;
int i9 = i7 + 5;
f9312o = i9 % 128;
int i10 = i9 % 2;
}
byte[] bArr3 = this.b;
int i11 = this.e;
bArr3[0] = (byte) ((i11 & 255) | 32);
C15605gzv.d(bArr, bArr3, i11);
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ Object a(Object[] objArr) {
xYb xyb = (xYb) objArr[0];
byte[] bArr = (byte[]) objArr[1];
int i2 = 2 % 2;
xyb.c = 2;
int i3 = xyb.e;
if (i3 <= 6) {
xyb.a = 1;
} else {
xyb.a = ((i3 - 7) / 8) + 2;
}
int i4 = xyb.a;
int i5 = i4 << 3;
xyb.d = i5;
if (i4 != 1) {
int i6 = f9312o;
int i7 = i6 + 91;
l = i7 % 128;
int i8 = i7 % 2;
if (i4 == 2) {
xyb.b = new byte[16];
} else if (i4 != 3) {
xyb.b = new byte[i5];
} else {
xyb.b = new byte[24];
int i9 = i6 + 29;
l = i9 % 128;
int i10 = i9 % 2;
}
} else {
xyb.b = new byte[8];
}
byte[] bArr2 = xyb.b;
int length = bArr2.length;
int i11 = 0;
while (i11 < length) {
bArr2[i11] = -1;
i11++;
int i12 = l + 45;
f9312o = i12 % 128;
int i13 = i12 % 2;
}
byte[] bArr3 = xyb.b;
bArr3[0] = -63;
int i14 = xyb.e;
bArr3[1] = (byte) i14;
System.arraycopy(bArr, 0, bArr3, 2, i14);
return null;
}
public final int a() {
int i2 = 2 % 2;
int i3 = l;
int i4 = i3 + 85;
f9312o = i4 % 128;
Object obj = null;
if (i4 % 2 != 0) {
obj.hashCode();
throw null;
}
int i5 = this.d;
int i6 = i3 + 113;
f9312o = i6 % 128;
if (i6 % 2 == 0) {
return i5;
}
obj.hashCode();
throw null;
}
/* JADX INFO: Access modifiers changed from: package-private */
public final C15899jUY b() {
int i2 = 2 % 2;
int i3 = f9312o + 97;
int i4 = i3 % 128;
l = i4;
if (i3 % 2 == 0) {
Object obj = null;
obj.hashCode();
throw null;
}
C15899jUY c15899jUY = this.f;
int i5 = i4 + 33;
f9312o = i5 % 128;
if (i5 % 2 != 0) {
int i6 = 42 / 0;
}
return c15899jUY;
}
public final byte[] d() {
int i2 = 2 % 2;
int i3 = l + 59;
f9312o = i3 % 128;
int i4 = i3 % 2;
byte[] bArr = this.b;
if (i4 != 0) {
int i5 = 14 / 0;
}
return bArr;
}
private void e(byte[] bArr) {
System.identityHashCode(this);
a(new Object[]{this, bArr});
}
}