494 lines
19 KiB
Java
494 lines
19 KiB
Java
package o;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Color;
|
|
import android.media.AudioTrack;
|
|
import android.nfc.tech.IsoDep;
|
|
import android.os.AsyncTask;
|
|
import android.os.Process;
|
|
import android.text.TextUtils;
|
|
import android.util.TypedValue;
|
|
import android.view.KeyEvent;
|
|
import android.view.ViewConfiguration;
|
|
import com.airbnb.deeplinkdispatch.UrlTreeKt;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
import com.google.common.base.Ascii;
|
|
import com.google.common.primitives.Bytes;
|
|
import io.beid.beidk.parcelable.PassportDataParcelable;
|
|
import java.io.ByteArrayInputStream;
|
|
import java.io.ByteArrayOutputStream;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.lang.reflect.Method;
|
|
import java.util.Arrays;
|
|
import net.sf.scuba.smartcards.ISOFileInfo;
|
|
import org.bouncycastle.crypto.tls.CipherSuite;
|
|
import org.jmrtd.BACKeySpec;
|
|
import org.jmrtd.PassportService;
|
|
import org.jmrtd.lds.CVCAFile;
|
|
import org.jmrtd.lds.icao.DG1File;
|
|
import org.jmrtd.lds.icao.MRZInfo;
|
|
|
|
/* renamed from: o.fRa, reason: case insensitive filesystem */
|
|
/* loaded from: classes5.dex */
|
|
public final class AsyncTaskC13119fRa extends AsyncTask<Void, RVV, RVV> {
|
|
public static int b;
|
|
public static int c;
|
|
private BACKeySpec a;
|
|
private Context d;
|
|
private IsoDep e;
|
|
private RVV f;
|
|
private InterfaceC13081fQA i;
|
|
private static final byte[] $$a = {CVCAFile.CAR_TAG, 74, -6, Ascii.DEL};
|
|
private static final int $$b = 69;
|
|
private static int $10 = 0;
|
|
private static int $11 = 1;
|
|
private static int n = 0;
|
|
|
|
/* renamed from: o, reason: collision with root package name */
|
|
private static int f9107o = 1;
|
|
private static char[] g = {16342};
|
|
private static int h = 1934311302;
|
|
private static boolean j = true;
|
|
private static boolean l = true;
|
|
|
|
/* renamed from: o.fRa$RVV */
|
|
/* loaded from: classes5.dex */
|
|
public static class RVV {
|
|
public byte[] a;
|
|
public byte[] b;
|
|
public byte[] d;
|
|
public Exception i;
|
|
public byte[] j;
|
|
public Integer c = 1;
|
|
public Integer e = 1;
|
|
}
|
|
|
|
/* 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:0x002f). 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(int r6, byte r7, int r8, java.lang.Object[] r9) {
|
|
/*
|
|
byte[] r0 = o.AsyncTaskC13119fRa.$$a
|
|
int r8 = r8 * 4
|
|
int r8 = r8 + 4
|
|
int r6 = r6 * 3
|
|
int r1 = r6 + 1
|
|
int r7 = r7 * 57
|
|
int r7 = r7 + 65
|
|
byte[] r1 = new byte[r1]
|
|
r2 = 0
|
|
if (r0 != 0) goto L17
|
|
r4 = r6
|
|
r7 = r8
|
|
r3 = r2
|
|
goto L2f
|
|
L17:
|
|
r3 = r2
|
|
L18:
|
|
r5 = r8
|
|
r8 = r7
|
|
r7 = r5
|
|
byte r4 = (byte) r8
|
|
r1[r3] = r4
|
|
if (r3 != r6) goto L28
|
|
java.lang.String r6 = new java.lang.String
|
|
r6.<init>(r1, r2)
|
|
r9[r2] = r6
|
|
return
|
|
L28:
|
|
int r3 = r3 + 1
|
|
r4 = r0[r7]
|
|
r5 = r8
|
|
r8 = r7
|
|
r7 = r5
|
|
L2f:
|
|
int r8 = r8 + 1
|
|
int r7 = r7 + r4
|
|
goto L18
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.AsyncTaskC13119fRa.m(int, byte, int, java.lang.Object[]):void");
|
|
}
|
|
|
|
private static void k(char[] cArr, byte[] bArr, int[] iArr, int i, Object[] objArr) {
|
|
char[] cArr2;
|
|
int i2;
|
|
char[] cArr3;
|
|
int i3 = 2 % 2;
|
|
C3614bBe c3614bBe = new C3614bBe();
|
|
char[] cArr4 = g;
|
|
char c2 = '0';
|
|
float f = BitmapDescriptorFactory.HUE_RED;
|
|
int i4 = 0;
|
|
if (cArr4 != null) {
|
|
int length = cArr4.length;
|
|
char[] cArr5 = new char[length];
|
|
int i5 = 0;
|
|
while (i5 < length) {
|
|
try {
|
|
Object[] objArr2 = new Object[1];
|
|
objArr2[i4] = Integer.valueOf(cArr4[i5]);
|
|
Object obj = xzZ.y.get(-950481649);
|
|
if (obj == null) {
|
|
Class cls = (Class) xzZ.c(337 - (TypedValue.complexToFraction(i4, f, f) > f ? 1 : (TypedValue.complexToFraction(i4, f, f) == f ? 0 : -1)), 6 - (ViewConfiguration.getScrollFriction() > f ? 1 : (ViewConfiguration.getScrollFriction() == f ? 0 : -1)), (char) ((-1) - TextUtils.lastIndexOf("", c2, i4)));
|
|
byte b2 = (byte) i4;
|
|
byte b3 = b2;
|
|
Object[] objArr3 = new Object[1];
|
|
m(b2, b3, b3, objArr3);
|
|
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
|
|
xzZ.y.put(-950481649, obj);
|
|
}
|
|
cArr5[i5] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
|
|
i5++;
|
|
c2 = '0';
|
|
f = BitmapDescriptorFactory.HUE_RED;
|
|
i4 = 0;
|
|
} catch (Throwable th) {
|
|
Throwable cause = th.getCause();
|
|
if (cause == null) {
|
|
throw th;
|
|
}
|
|
throw cause;
|
|
}
|
|
}
|
|
cArr4 = cArr5;
|
|
}
|
|
Object[] objArr4 = {Integer.valueOf(h)};
|
|
Object obj2 = xzZ.y.get(-1521625011);
|
|
if (obj2 == null) {
|
|
Class cls2 = (Class) xzZ.c((ViewConfiguration.getPressedStateDuration() >> 16) + 283, 6 - (ViewConfiguration.getScrollFriction() > BitmapDescriptorFactory.HUE_RED ? 1 : (ViewConfiguration.getScrollFriction() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), (char) (39814 - (ViewConfiguration.getScrollFriction() > BitmapDescriptorFactory.HUE_RED ? 1 : (ViewConfiguration.getScrollFriction() == BitmapDescriptorFactory.HUE_RED ? 0 : -1))));
|
|
byte b4 = (byte) 0;
|
|
byte b5 = (byte) (b4 + 1);
|
|
Object[] objArr5 = new Object[1];
|
|
m(b4, b5, (byte) (b5 - 1), objArr5);
|
|
obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE);
|
|
xzZ.y.put(-1521625011, obj2);
|
|
}
|
|
int intValue = ((Integer) ((Method) obj2).invoke(null, objArr4)).intValue();
|
|
if (l) {
|
|
int i6 = $11 + 45;
|
|
$10 = i6 % 128;
|
|
if (i6 % 2 != 0) {
|
|
c3614bBe.c = bArr.length;
|
|
cArr3 = new char[c3614bBe.c];
|
|
i2 = 0;
|
|
} else {
|
|
i2 = 0;
|
|
c3614bBe.c = bArr.length;
|
|
cArr3 = new char[c3614bBe.c];
|
|
}
|
|
c3614bBe.a = i2;
|
|
while (c3614bBe.a < c3614bBe.c) {
|
|
int i7 = $11 + 65;
|
|
$10 = i7 % 128;
|
|
int i8 = i7 % 2;
|
|
cArr3[c3614bBe.a] = (char) (cArr4[bArr[(c3614bBe.c - 1) - c3614bBe.a] + i] - intValue);
|
|
try {
|
|
Object[] objArr6 = {c3614bBe, c3614bBe};
|
|
Object obj3 = xzZ.y.get(1779759091);
|
|
if (obj3 == null) {
|
|
obj3 = ((Class) xzZ.c(40 - (ViewConfiguration.getKeyRepeatDelay() >> 16), TextUtils.lastIndexOf("", '0') + 6, (char) (1 - (AudioTrack.getMaxVolume() > BitmapDescriptorFactory.HUE_RED ? 1 : (AudioTrack.getMaxVolume() == BitmapDescriptorFactory.HUE_RED ? 0 : -1))))).getMethod("D", Object.class, Object.class);
|
|
xzZ.y.put(1779759091, obj3);
|
|
}
|
|
((Method) obj3).invoke(null, objArr6);
|
|
} catch (Throwable th2) {
|
|
Throwable cause2 = th2.getCause();
|
|
if (cause2 == null) {
|
|
throw th2;
|
|
}
|
|
throw cause2;
|
|
}
|
|
}
|
|
objArr[0] = new String(cArr3);
|
|
return;
|
|
}
|
|
if (j) {
|
|
int i9 = $10 + 57;
|
|
$11 = i9 % 128;
|
|
if (i9 % 2 == 0) {
|
|
c3614bBe.c = cArr.length;
|
|
cArr2 = new char[c3614bBe.c];
|
|
c3614bBe.a = 1;
|
|
} else {
|
|
c3614bBe.c = cArr.length;
|
|
cArr2 = new char[c3614bBe.c];
|
|
c3614bBe.a = 0;
|
|
}
|
|
while (c3614bBe.a < c3614bBe.c) {
|
|
cArr2[c3614bBe.a] = (char) (cArr4[cArr[(c3614bBe.c - 1) - c3614bBe.a] - i] - intValue);
|
|
Object[] objArr7 = {c3614bBe, c3614bBe};
|
|
Object obj4 = xzZ.y.get(1779759091);
|
|
if (obj4 == null) {
|
|
obj4 = ((Class) xzZ.c(40 - KeyEvent.normalizeMetaState(0), (ViewConfiguration.getWindowTouchSlop() >> 8) + 5, (char) ((-16777216) - Color.rgb(0, 0, 0)))).getMethod("D", Object.class, Object.class);
|
|
xzZ.y.put(1779759091, obj4);
|
|
}
|
|
((Method) obj4).invoke(null, objArr7);
|
|
int i10 = $11 + 97;
|
|
$10 = i10 % 128;
|
|
int i11 = i10 % 2;
|
|
}
|
|
objArr[0] = new String(cArr2);
|
|
return;
|
|
}
|
|
int i12 = 0;
|
|
c3614bBe.c = iArr.length;
|
|
char[] cArr6 = new char[c3614bBe.c];
|
|
while (true) {
|
|
c3614bBe.a = i12;
|
|
if (c3614bBe.a >= c3614bBe.c) {
|
|
objArr[0] = new String(cArr6);
|
|
return;
|
|
}
|
|
int i13 = $10 + 99;
|
|
$11 = i13 % 128;
|
|
int i14 = i13 % 2;
|
|
cArr6[c3614bBe.a] = (char) (cArr4[iArr[(c3614bBe.c - 1) - c3614bBe.a] - i] - intValue);
|
|
i12 = c3614bBe.a + 1;
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public static /* synthetic */ Object b(Object[] objArr) {
|
|
AsyncTaskC13119fRa asyncTaskC13119fRa = (AsyncTaskC13119fRa) objArr[0];
|
|
Object[] objArr2 = (Object[]) objArr[1];
|
|
int i = 2 % 2;
|
|
int i2 = f9107o + 59;
|
|
n = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
RVV c2 = asyncTaskC13119fRa.c();
|
|
if (i3 != 0) {
|
|
int i4 = 26 / 0;
|
|
}
|
|
return c2;
|
|
}
|
|
|
|
@Override // android.os.AsyncTask
|
|
protected final /* synthetic */ void onProgressUpdate(RVV[] rvvArr) {
|
|
int i = 2 % 2;
|
|
int i2 = f9107o + 79;
|
|
n = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
d(rvvArr);
|
|
int i4 = n + 47;
|
|
f9107o = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
int i5 = 96 / 0;
|
|
}
|
|
}
|
|
|
|
@Override // android.os.AsyncTask
|
|
protected final /* synthetic */ void onPostExecute(RVV rvv) {
|
|
int i = 2 % 2;
|
|
int i2 = f9107o + 51;
|
|
n = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
a(rvv);
|
|
int i4 = f9107o + 115;
|
|
n = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r4v2, types: [o.fRa$RVV, java.lang.Object] */
|
|
@Override // android.os.AsyncTask
|
|
protected final /* synthetic */ RVV doInBackground(Void[] voidArr) {
|
|
System.identityHashCode(this);
|
|
?? b2 = b(new Object[]{this, voidArr});
|
|
return b2;
|
|
}
|
|
|
|
private void d(RVV... rvvArr) {
|
|
int i = 2 % 2;
|
|
if (this.i != null) {
|
|
int length = rvvArr.length;
|
|
int i2 = 0;
|
|
while (i2 < length) {
|
|
int i3 = f9107o + 41;
|
|
n = i3 % 128;
|
|
if (i3 % 2 != 0) {
|
|
this.i.b(rvvArr[i2]);
|
|
i2 += 22;
|
|
} else {
|
|
this.i.b(rvvArr[i2]);
|
|
i2++;
|
|
}
|
|
}
|
|
}
|
|
super.onProgressUpdate(rvvArr);
|
|
int i4 = n + 45;
|
|
f9107o = i4 % 128;
|
|
if (i4 % 2 != 0) {
|
|
return;
|
|
}
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
private void a(RVV rvv) {
|
|
int i = 2 % 2;
|
|
if (rvv == null) {
|
|
return;
|
|
}
|
|
Object obj = null;
|
|
if (rvv.i != null) {
|
|
int i2 = n + 65;
|
|
f9107o = i2 % 128;
|
|
try {
|
|
if (i2 % 2 != 0) {
|
|
this.i.a(rvv.i, null);
|
|
return;
|
|
} else {
|
|
this.i.a(rvv.i, null);
|
|
int i3 = 82 / 0;
|
|
return;
|
|
}
|
|
} catch (Exception unused) {
|
|
}
|
|
}
|
|
if (rvv.d != null) {
|
|
try {
|
|
MRZInfo mRZInfo = new DG1File(new ByteArrayInputStream(rvv.d)).getMRZInfo();
|
|
Long l2 = 0L;
|
|
PassportDataParcelable passportDataParcelable = new PassportDataParcelable();
|
|
passportDataParcelable.dg1 = C13096fQj.d(rvv.d);
|
|
passportDataParcelable.dg2 = C13096fQj.d(rvv.a);
|
|
if (rvv.j != null) {
|
|
int i4 = f9107o + 25;
|
|
n = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
passportDataParcelable.dg13 = C13096fQj.d(rvv.j);
|
|
}
|
|
passportDataParcelable.sod = C13096fQj.d(rvv.b);
|
|
passportDataParcelable.passportNumber = this.a.getDocumentNumber();
|
|
passportDataParcelable.firstNameEng = c(mRZInfo.getSecondaryIdentifier());
|
|
passportDataParcelable.lastNameEng = c(mRZInfo.getPrimaryIdentifier());
|
|
if (rvv.j != null) {
|
|
passportDataParcelable.nameThai = d(new ByteArrayInputStream(rvv.j));
|
|
}
|
|
passportDataParcelable.gender = mRZInfo.getGender().toString();
|
|
passportDataParcelable.nationality = mRZInfo.getNationality();
|
|
passportDataParcelable.placeOfBirth = "";
|
|
passportDataParcelable.issuingAuthority = mRZInfo.getIssuingState();
|
|
passportDataParcelable.citizenID = mRZInfo.getOptionalData1().substring(0, 13);
|
|
passportDataParcelable.dateOfBirth = PassportDataParcelable.parseDate(mRZInfo.getDateOfBirth());
|
|
passportDataParcelable.dateOfBirth = PassportDataParcelable.parseDate(mRZInfo.getDateOfExpiry());
|
|
Object[] objArr = new Object[1];
|
|
k(null, new byte[]{ISOFileInfo.DATA_BYTES2}, null, 126 - Process.getGidForName(""), objArr);
|
|
passportDataParcelable.verificationResult = true ^ ((String) objArr[0]).intern().equals(l2);
|
|
passportDataParcelable.profileId = l2.toString();
|
|
passportDataParcelable.result = "";
|
|
passportDataParcelable.errorCode = "";
|
|
passportDataParcelable.error = "";
|
|
this.i.a(rvv.i, passportDataParcelable);
|
|
int i6 = n + 79;
|
|
f9107o = i6 % 128;
|
|
if (i6 % 2 != 0) {
|
|
return;
|
|
}
|
|
obj.hashCode();
|
|
throw null;
|
|
} catch (IOException unused2) {
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:20:0x0058, code lost:
|
|
|
|
if (r6.size() > 0) goto L24;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:21:0x0063, code lost:
|
|
|
|
r6 = r6.iterator().next();
|
|
r5.doPACE(r11.a, r6.getObjectIdentifier(), org.jmrtd.lds.PACEInfo.toParameterSpec(r6.getParameterId()));
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:28:0x0061, code lost:
|
|
|
|
if (r6.size() > 0) goto L24;
|
|
*/
|
|
/* JADX WARN: Removed duplicated region for block: B:32:0x00a6 */
|
|
/* JADX WARN: Removed duplicated region for block: B:45:0x010b */
|
|
/* JADX WARN: Removed duplicated region for block: B:49:0x0138 */
|
|
/* JADX WARN: Removed duplicated region for block: B:55:0x0179 */
|
|
/* JADX WARN: Removed duplicated region for block: B:71:0x008e A[Catch: Exception -> 0x01fc, TryCatch #2 {Exception -> 0x01fc, blocks: (B:9:0x0024, B:12:0x0036, B:16:0x0052, B:19:0x0057, B:21:0x0063, B:27:0x005d, B:30:0x00a1, B:38:0x00b6, B:41:0x00be, B:42:0x00c3, B:43:0x00c4, B:46:0x0114, B:47:0x011d, B:50:0x0141, B:52:0x014b, B:53:0x016f, B:56:0x0181, B:59:0x0196, B:60:0x01b8, B:62:0x01c2, B:65:0x01d7, B:66:0x01f9, B:69:0x0081, B:71:0x008e, B:74:0x0096, B:75:0x009f, B:36:0x00b0), top: B:8:0x0024, inners: #1, #3 }] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private o.AsyncTaskC13119fRa.RVV c() {
|
|
/*
|
|
Method dump skipped, instructions count: 533
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.AsyncTaskC13119fRa.c():o.fRa$RVV");
|
|
}
|
|
|
|
private static byte[] b(InputStream inputStream) throws IOException {
|
|
int i = 2 % 2;
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
byte[] bArr = new byte[16384];
|
|
int i2 = f9107o + 73;
|
|
n = i2 % 128;
|
|
if (i2 % 2 != 0) {
|
|
int i3 = 3 % 2;
|
|
}
|
|
while (true) {
|
|
int read = inputStream.read(bArr, 0, 16384);
|
|
if (read == -1) {
|
|
break;
|
|
}
|
|
byteArrayOutputStream.write(bArr, 0, read);
|
|
}
|
|
byteArrayOutputStream.flush();
|
|
byte[] byteArray = byteArrayOutputStream.toByteArray();
|
|
int i4 = n + 107;
|
|
f9107o = i4 % 128;
|
|
if (i4 % 2 != 0) {
|
|
return byteArray;
|
|
}
|
|
throw null;
|
|
}
|
|
|
|
private static String c(String str) {
|
|
int i = 2 % 2;
|
|
int i2 = n + 5;
|
|
f9107o = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
String replace = str.replace(UrlTreeKt.configurablePathSegmentPrefix, "");
|
|
int i4 = f9107o + 59;
|
|
n = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
return replace;
|
|
}
|
|
Object obj = null;
|
|
obj.hashCode();
|
|
throw null;
|
|
}
|
|
|
|
private static String d(InputStream inputStream) {
|
|
int i = 2 % 2;
|
|
try {
|
|
byte[] bArr = {Integer.valueOf(PassportService.DEFAULT_MAX_BLOCKSIZE).byteValue(), Integer.valueOf(CipherSuite.TLS_RSA_PSK_WITH_NULL_SHA256).byteValue()};
|
|
byte[] b2 = b(inputStream);
|
|
int indexOf = Bytes.indexOf(b2, bArr);
|
|
String str = new String(Arrays.copyOfRange(b2, indexOf, Byte.valueOf(b2[indexOf - 1]).intValue() + indexOf), "utf-8");
|
|
int i2 = f9107o + 33;
|
|
n = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
return str;
|
|
} catch (Exception unused) {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
public AsyncTaskC13119fRa(Context context, IsoDep isoDep, BACKeySpec bACKeySpec, InterfaceC13081fQA interfaceC13081fQA) {
|
|
this.e = isoDep;
|
|
this.a = bACKeySpec;
|
|
this.d = context;
|
|
this.i = interfaceC13081fQA;
|
|
}
|
|
}
|