what-the-bank/sources/com/huawei/hms/hatool/f0.java

237 lines
9.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.hatool;
import android.graphics.drawable.Drawable;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.lang.reflect.Method;
import net.sf.scuba.smartcards.ISOFileInfo;
import o.C3614bBe;
import o.xzZ;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class f0 extends k0 {
private String g = "";
private static final byte[] $$a = {76, 73, -112, -126};
private static final int $$b = 117;
private static int $10 = 0;
private static int $11 = 1;
private static int m = 0;
private static int k = 1;
private static char[] j = {16066};
private static int i = 1934311089;
private static boolean h = true;
/* renamed from: o, reason: collision with root package name */
private static boolean f6494o = true;
/* JADX WARN: Removed duplicated region for block: B:10:0x0024 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001c */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0024 -> 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 n(int r6, int r7, byte r8, java.lang.Object[] r9) {
/*
byte[] r0 = com.huawei.hms.hatool.f0.$$a
int r8 = r8 * 57
int r8 = 122 - r8
int r6 = r6 * 2
int r6 = r6 + 4
int r7 = r7 * 3
int r1 = r7 + 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) r8
r1[r3] = r4
if (r3 != r7) goto L24
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L24:
int r3 = r3 + 1
r4 = r0[r6]
r5 = r3
r3 = r8
r8 = r4
r4 = r5
L2c:
int r8 = -r8
int r8 = r8 + r3
int r6 = r6 + 1
r3 = r4
goto L17
*/
throw new UnsupportedOperationException("Method not decompiled: com.huawei.hms.hatool.f0.n(int, int, byte, java.lang.Object[]):void");
}
private static void l(char[] cArr, byte[] bArr, int[] iArr, int i2, Object[] objArr) {
char[] cArr2;
int i3 = 2 % 2;
C3614bBe c3614bBe = new C3614bBe();
char[] cArr3 = j;
if (cArr3 != null) {
int i4 = $10 + 35;
$11 = i4 % 128;
int i5 = i4 % 2;
int length = cArr3.length;
char[] cArr4 = new char[length];
for (int i6 = 0; i6 < length; i6++) {
try {
Object[] objArr2 = {Integer.valueOf(cArr3[i6])};
Object obj = xzZ.y.get(-950481649);
if (obj == null) {
Class cls = (Class) xzZ.c(337 - (ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)), 5 - Drawable.resolveOpacity(0, 0), (char) (KeyEvent.getMaxKeyCode() >> 16));
byte b = (byte) 0;
byte b2 = b;
Object[] objArr3 = new Object[1];
n(b, b2, (byte) (b2 + 1), objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
xzZ.y.put(-950481649, obj);
}
cArr4[i6] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
cArr3 = cArr4;
}
try {
Object[] objArr4 = {Integer.valueOf(i)};
Object obj2 = xzZ.y.get(-1521625011);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c(TextUtils.indexOf((CharSequence) "", '0') + 284, 4 - TextUtils.indexOf((CharSequence) "", '0'), (char) (39813 - TextUtils.getTrimmedLength("")));
byte b3 = (byte) 0;
byte b4 = b3;
Object[] objArr5 = new Object[1];
n(b3, b4, b4, objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE);
xzZ.y.put(-1521625011, obj2);
}
int intValue = ((Integer) ((Method) obj2).invoke(null, objArr4)).intValue();
if (!(!f6494o)) {
int i7 = $10 + 101;
$11 = i7 % 128;
if (i7 % 2 == 0) {
c3614bBe.c = bArr.length;
cArr2 = new char[c3614bBe.c];
c3614bBe.a = 1;
} else {
c3614bBe.c = bArr.length;
cArr2 = new char[c3614bBe.c];
c3614bBe.a = 0;
}
while (c3614bBe.a < c3614bBe.c) {
cArr2[c3614bBe.a] = (char) (cArr3[bArr[(c3614bBe.c - 1) - c3614bBe.a] + i2] - intValue);
Object[] objArr6 = {c3614bBe, c3614bBe};
Object obj3 = xzZ.y.get(1779759091);
if (obj3 == null) {
obj3 = ((Class) xzZ.c((ViewConfiguration.getTouchSlop() >> 8) + 40, 5 - KeyEvent.normalizeMetaState(0), (char) (ViewConfiguration.getTouchSlop() >> 8))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj3);
}
((Method) obj3).invoke(null, objArr6);
int i8 = $11 + 7;
$10 = i8 % 128;
int i9 = i8 % 2;
}
objArr[0] = new String(cArr2);
return;
}
if (!h) {
c3614bBe.c = iArr.length;
char[] cArr5 = new char[c3614bBe.c];
c3614bBe.a = 0;
while (c3614bBe.a < c3614bBe.c) {
int i10 = $10 + 95;
$11 = i10 % 128;
int i11 = i10 % 2;
cArr5[c3614bBe.a] = (char) (cArr3[iArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - intValue);
c3614bBe.a++;
}
objArr[0] = new String(cArr5);
return;
}
c3614bBe.c = cArr.length;
char[] cArr6 = new char[c3614bBe.c];
c3614bBe.a = 0;
int i12 = $10 + 39;
$11 = i12 % 128;
int i13 = i12 % 2;
while (c3614bBe.a < c3614bBe.c) {
cArr6[c3614bBe.a] = (char) (cArr3[cArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - intValue);
Object[] objArr7 = {c3614bBe, c3614bBe};
Object obj4 = xzZ.y.get(1779759091);
if (obj4 == null) {
obj4 = ((Class) xzZ.c(TextUtils.lastIndexOf("", '0', 0) + 41, 5 - KeyEvent.normalizeMetaState(0), (char) View.MeasureSpec.makeMeasureSpec(0, 0))).getMethod("D", Object.class, Object.class);
xzZ.y.put(1779759091, obj4);
}
((Method) obj4).invoke(null, objArr7);
}
objArr[0] = new String(cArr6);
} catch (Throwable th2) {
Throwable cause2 = th2.getCause();
if (cause2 == null) {
throw th2;
}
throw cause2;
}
}
public void g(String str) {
int i2 = 2 % 2;
int i3 = k;
int i4 = i3 + 39;
m = i4 % 128;
int i5 = i4 % 2;
this.g = str;
if (i5 != 0) {
throw null;
}
int i6 = i3 + 7;
m = i6 % 128;
if (i6 % 2 != 0) {
int i7 = 98 / 0;
}
}
@Override // com.huawei.hms.hatool.o1
public JSONObject a() {
int i2 = 2 % 2;
JSONObject jSONObject = new JSONObject();
jSONObject.put("protocol_version", "3");
Object[] objArr = new Object[1];
l(null, new byte[]{ISOFileInfo.DATA_BYTES2}, null, 127 - (ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)), objArr);
jSONObject.put("compress_mode", ((String) objArr[0]).intern());
jSONObject.put("serviceid", this.d);
jSONObject.put(HiAnalyticsConstant.HaKey.BI_KEY_APPID, this.a);
jSONObject.put("hmac", this.g);
jSONObject.put("chifer", this.f);
jSONObject.put("timestamp", this.b);
jSONObject.put("servicetag", this.c);
jSONObject.put("requestid", this.e);
int i3 = k + 123;
m = i3 % 128;
if (i3 % 2 == 0) {
return jSONObject;
}
throw null;
}
}