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

268 lines
10 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.hatool;
import android.content.Context;
import android.os.Process;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.AndroidRuntimeException;
import android.util.Pair;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import net.sf.scuba.smartcards.ISO7816;
import o.xzZ;
import o.zUI;
import org.bouncycastle.crypto.tls.CipherSuite;
/* loaded from: classes2.dex */
public class x0 extends o {
private static final byte[] $$a = {85, 123, 51, ISO7816.INS_READ_RECORD2};
private static final int $$b = 234;
private static int $10 = 0;
private static int $11 = 1;
private static int e = 0;
private static int b = 1;
private static int c = 2015661728;
/* JADX WARN: Removed duplicated region for block: B:10:0x0029 */
/* JADX WARN: Removed duplicated region for block: B:7:0x0021 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0029 -> 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 r7, byte r8, int r9, java.lang.Object[] r10) {
/*
int r9 = r9 * 7
int r9 = 76 - r9
int r8 = r8 * 3
int r8 = 3 - r8
int r7 = r7 * 4
int r7 = r7 + 1
byte[] r0 = com.huawei.hms.hatool.x0.$$a
byte[] r1 = new byte[r7]
r2 = 0
if (r0 != 0) goto L17
r3 = r7
r9 = r8
r5 = r2
goto L2e
L17:
r3 = r2
L18:
int r8 = r8 + 1
byte r4 = (byte) r9
int r5 = r3 + 1
r1[r3] = r4
if (r5 != r7) goto L29
java.lang.String r7 = new java.lang.String
r7.<init>(r1, r2)
r10[r2] = r7
return
L29:
r3 = r0[r8]
r6 = r9
r9 = r8
r8 = r6
L2e:
int r8 = r8 + r3
r3 = r5
r6 = r9
r9 = r8
r8 = r6
goto L18
*/
throw new UnsupportedOperationException("Method not decompiled: com.huawei.hms.hatool.x0.g(int, byte, int, java.lang.Object[]):void");
}
private static void f(int i, int i2, int i3, char[] cArr, boolean z, Object[] objArr) {
char[] cArr2;
int i4 = 2 % 2;
zUI zui = new zUI();
char[] cArr3 = new char[i];
zui.d = 0;
while (zui.d < i) {
int i5 = $10 + 99;
$11 = i5 % 128;
int i6 = i5 % 2;
zui.c = cArr[zui.d];
cArr3[zui.d] = (char) (i3 + zui.c);
int i7 = zui.d;
try {
Object[] objArr2 = {Integer.valueOf(cArr3[i7]), Integer.valueOf(c)};
Object obj = xzZ.y.get(880493502);
if (obj == null) {
Class cls = (Class) xzZ.c(TextUtils.indexOf((CharSequence) "", '0') + CipherSuite.TLS_DHE_PSK_WITH_AES_128_CBC_SHA, (ViewConfiguration.getMinimumFlingVelocity() >> 16) + 7, (char) (ViewConfiguration.getJumpTapTimeout() >> 16));
byte b2 = (byte) 0;
byte b3 = b2;
Object[] objArr3 = new Object[1];
g(b2, b3, (byte) (b3 + 1), objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Integer.TYPE);
xzZ.y.put(880493502, obj);
}
cArr3[i7] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
Object[] objArr4 = {zui, zui};
Object obj2 = xzZ.y.get(1294990079);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c(341 - TextUtils.indexOf((CharSequence) "", '0', 0), ((Process.getThreadPriority(0) + 20) >> 6) + 5, (char) (TypedValue.complexToFloat(0) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFloat(0) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)));
byte b4 = (byte) 0;
byte b5 = b4;
Object[] objArr5 = new Object[1];
g(b4, b5, b5, objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Object.class, Object.class);
xzZ.y.put(1294990079, obj2);
}
((Method) obj2).invoke(null, objArr4);
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
if (i2 > 0) {
int i8 = $11 + 53;
$10 = i8 % 128;
int i9 = i8 % 2;
zui.a = i2;
char[] cArr4 = new char[i];
System.arraycopy(cArr3, 0, cArr4, 0, i);
System.arraycopy(cArr4, 0, cArr3, i - zui.a, zui.a);
System.arraycopy(cArr4, zui.a, cArr3, 0, i - zui.a);
}
if (z) {
int i10 = $10 + 63;
$11 = i10 % 128;
if (i10 % 2 == 0) {
cArr2 = new char[i];
zui.d = 1;
} else {
cArr2 = new char[i];
zui.d = 0;
}
while (zui.d < i) {
cArr2[zui.d] = cArr3[(i - zui.d) - 1];
Object[] objArr6 = {zui, zui};
Object obj3 = xzZ.y.get(1294990079);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c(342 - TextUtils.indexOf("", ""), 5 - (ViewConfiguration.getMaximumDrawingCacheSize() >> 24), (char) View.resolveSizeAndState(0, 0, 0));
byte b6 = (byte) 0;
byte b7 = b6;
Object[] objArr7 = new Object[1];
g(b6, b7, b7, objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
xzZ.y.put(1294990079, obj3);
}
((Method) obj3).invoke(null, objArr6);
}
cArr3 = cArr2;
}
objArr[0] = new String(cArr3);
}
public static Pair<String, String> e(Context context) {
int i = 2 % 2;
if (c0.a(context, "android.permission.READ_PHONE_STATE")) {
v.f("hmsSdk", "getMccAndMnc() Pair value is empty");
return new Pair<>("", "");
}
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService("phone");
if (telephonyManager == null) {
Pair<String, String> pair = new Pair<>("", "");
int i2 = b + 85;
e = i2 % 128;
int i3 = i2 % 2;
return pair;
}
if (telephonyManager.getSimState() != 5) {
return new Pair<>("", "");
}
String networkOperator = telephonyManager.getNetworkOperator();
if (!TextUtils.isEmpty(networkOperator)) {
int i4 = e + 27;
b = i4 % 128;
int i5 = i4 % 2;
Object[] objArr = new Object[1];
f((ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)) + 4, TextUtils.getTrimmedLength("") + 3, 244 - MotionEvent.axisFromString(""), new char[]{65534, 7, 0, 65534}, true, objArr);
if (!TextUtils.equals(networkOperator, ((String) objArr[0]).intern())) {
return networkOperator.length() > 3 ? new Pair<>(networkOperator.substring(0, 3), networkOperator.substring(3)) : new Pair<>("", "");
}
}
Pair<String, String> pair2 = new Pair<>("", "");
int i6 = b + 111;
e = i6 % 128;
int i7 = i6 % 2;
return pair2;
}
public static String c() {
String str;
int i = 2 % 2;
int i2 = b + 51;
e = i2 % 128;
int i3 = i2 % 2;
String str2 = "";
try {
String str3 = (String) Class.forName("com.huawei.android.os.BuildEx").getMethod("getUDID", new Class[0]).invoke(null, new Object[0]);
try {
v.c("hmsSdk", "getUDID success");
return str3;
} catch (AndroidRuntimeException unused) {
str2 = str3;
str = "getUDID getudid failed, RuntimeException is AndroidRuntimeException";
String str4 = str2;
v.f("hmsSdk", str);
return str4;
} catch (ClassNotFoundException unused2) {
str2 = str3;
str = "getUDID method invoke failed";
String str42 = str2;
v.f("hmsSdk", str);
return str42;
} catch (IllegalAccessException unused3) {
str2 = str3;
str = "getUDID method invoke failed : Illegal AccessException";
String str422 = str2;
v.f("hmsSdk", str);
return str422;
} catch (IllegalArgumentException unused4) {
str2 = str3;
int i4 = b + 63;
e = i4 % 128;
int i5 = i4 % 2;
str = "getUDID method invoke failed : Illegal ArgumentException";
String str4222 = str2;
v.f("hmsSdk", str);
return str4222;
} catch (NoSuchMethodException unused5) {
str2 = str3;
str = "getUDID method invoke failed : NoSuchMethodException";
String str42222 = str2;
v.f("hmsSdk", str);
return str42222;
} catch (InvocationTargetException unused6) {
str2 = str3;
int i6 = b + 71;
e = i6 % 128;
int i7 = i6 % 2;
str = "getUDID method invoke failed : InvocationTargetException";
String str422222 = str2;
v.f("hmsSdk", str);
return str422222;
}
} catch (AndroidRuntimeException unused7) {
} catch (ClassNotFoundException unused8) {
} catch (IllegalAccessException unused9) {
} catch (IllegalArgumentException unused10) {
} catch (NoSuchMethodException unused11) {
} catch (InvocationTargetException unused12) {
}
}
}