258 lines
14 KiB
Java
258 lines
14 KiB
Java
package com.huawei.agconnect.core;
|
|
|
|
import android.app.Service;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.graphics.Color;
|
|
import android.graphics.ImageFormat;
|
|
import android.os.IBinder;
|
|
import android.os.SystemClock;
|
|
import android.telephony.cdma.CdmaCellLocation;
|
|
import android.text.AndroidCharacter;
|
|
import android.text.TextUtils;
|
|
import android.view.KeyEvent;
|
|
import android.view.View;
|
|
import android.view.ViewConfiguration;
|
|
import android.widget.ExpandableListView;
|
|
import com.pingan.ai.p;
|
|
import java.lang.reflect.Method;
|
|
import net.sf.scuba.smartcards.ISO7816;
|
|
import o.Nhs;
|
|
import o.xzZ;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class ServiceDiscovery extends Service {
|
|
private static final byte[] $$a = {39, 45, ISO7816.INS_PUT_DATA, 49};
|
|
private static final int $$b = 27;
|
|
private static int $10 = 0;
|
|
private static int $11 = 1;
|
|
private static int e = 0;
|
|
private static int b = 1;
|
|
private static long a = 9051040786702654117L;
|
|
private static int d = 452713125;
|
|
private static char c = 38231;
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x0025 */
|
|
/* JADX WARN: Removed duplicated region for block: B:7:0x001d */
|
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0025 -> B:4:0x0027). 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) {
|
|
/*
|
|
int r6 = r6 + 114
|
|
int r7 = r7 * 4
|
|
int r7 = r7 + 1
|
|
int r8 = r8 + 4
|
|
byte[] r0 = com.huawei.agconnect.core.ServiceDiscovery.$$a
|
|
byte[] r1 = new byte[r7]
|
|
r2 = 0
|
|
if (r0 != 0) goto L13
|
|
r3 = r6
|
|
r6 = r7
|
|
r4 = r2
|
|
goto L27
|
|
L13:
|
|
r3 = r2
|
|
L14:
|
|
int r4 = r3 + 1
|
|
int r8 = r8 + 1
|
|
byte r5 = (byte) r6
|
|
r1[r3] = r5
|
|
if (r4 != r7) goto L25
|
|
java.lang.String r6 = new java.lang.String
|
|
r6.<init>(r1, r2)
|
|
r9[r2] = r6
|
|
return
|
|
L25:
|
|
r3 = r0[r8]
|
|
L27:
|
|
int r6 = r6 + r3
|
|
r3 = r4
|
|
goto L14
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.huawei.agconnect.core.ServiceDiscovery.g(int, int, int, java.lang.Object[]):void");
|
|
}
|
|
|
|
@Override // android.app.Service, android.content.ContextWrapper
|
|
public void attachBaseContext(Context context) {
|
|
Context context2;
|
|
int i = 2 % 2;
|
|
int i2 = e + 55;
|
|
b = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
super.attachBaseContext(context);
|
|
Object[] objArr = new Object[1];
|
|
f((char) ((SystemClock.elapsedRealtimeNanos() > 0L ? 1 : (SystemClock.elapsedRealtimeNanos() == 0L ? 0 : -1)) + 51792), new char[]{4886, 29416, 46763, 64858, 2397, 13103, 50930, 33180, 29689, 56800, 4966, 55447, 54938, 32640, 50086, 56369, 12889, 57392}, new char[]{46397, 11610, 20885, 1226}, new char[]{0, 0, 0, 0}, View.resolveSizeAndState(0, 0, 0), objArr);
|
|
Class<?> cls = Class.forName((String) objArr[0]);
|
|
Object[] objArr2 = new Object[1];
|
|
f((char) ((ViewConfiguration.getWindowTouchSlop() >> 8) + 8690), new char[]{33441, 32114, 50889, 56486, 21028}, new char[]{37904, 34296, 61984, 13601}, new char[]{0, 0, 0, 0}, KeyEvent.getDeadChar(0, 0) + 545650836, objArr2);
|
|
int intValue = ((Integer) cls.getDeclaredMethod((String) objArr2[0], new Class[0]).invoke(null, new Object[0])).intValue() % 100000;
|
|
if (intValue < 99000 || intValue > 99999) {
|
|
if (context != null) {
|
|
int i4 = e + 27;
|
|
b = i4 % 128;
|
|
if (i4 % 2 == 0) {
|
|
context2 = context.getApplicationContext();
|
|
int i5 = 1 / 0;
|
|
} else {
|
|
context2 = context.getApplicationContext();
|
|
}
|
|
int i6 = b + 69;
|
|
e = i6 % 128;
|
|
int i7 = i6 % 2;
|
|
} else {
|
|
context2 = context;
|
|
}
|
|
if (context2 != null) {
|
|
int i8 = b + 121;
|
|
e = i8 % 128;
|
|
int i9 = i8 % 2;
|
|
try {
|
|
Object obj = xzZ.y.get(125943855);
|
|
if (obj == null) {
|
|
obj = ((Class) xzZ.c(491 - TextUtils.indexOf((CharSequence) "", '0', 0, 0), 6 - (ViewConfiguration.getZoomControlsTimeout() > 0L ? 1 : (ViewConfiguration.getZoomControlsTimeout() == 0L ? 0 : -1)), (char) Color.green(0))).getMethod("a", null);
|
|
xzZ.y.put(125943855, obj);
|
|
}
|
|
Object invoke = ((Method) obj).invoke(null, null);
|
|
Object[] objArr3 = new Object[1];
|
|
f((char) View.MeasureSpec.getSize(0), new char[]{58560, 54768, 26706, 44802, 45212, 57771, 44802, 31878, 61524, 23962, 47521, 5127, 16661, 29788, 7220, 54069, 53802, 1206, 3501, 58782, 30993, 47451, 31197, 51245, 27370, 54521, 31642, 38128, 61695, 52550, 9637, 22994, 57559, 6502, 13077, 5446, 34117, 64934, 26087, 51542, 30549, 57584, 1624, 60319, 11687, 11662, 57282, 26865}, new char[]{55383, 58345, 41396, 22530}, new char[]{0, 0, 0, 0}, TextUtils.lastIndexOf("", '0', 0) + 1, objArr3);
|
|
String str = (String) objArr3[0];
|
|
Object[] objArr4 = new Object[1];
|
|
f((char) (ImageFormat.getBitsPerPixel(0) + 1), new char[]{18972, 7964, 16646, 8446, 53660, 26542, 21141, 9968, 8206, 27836, 29914, 46515, 38905, 34272, 27718, 33170, 10538, 16862, 20441, 25954, 58056, 24984, 34622, 46323, 20916, 18229, 19447, 20251, 3343, 61759, 42500, 55503, 23604, 41638, 58375, 22026, 43861, 39928, 19705, 27848, 19255, 1758, 56310, 50034, 43718, 40720, 41103, 52647, 10973, 58095, 62737, 11942, 2472, 61052, 20093, 1691, 41988, 33286, 65231, 10131, 44120, 30293, 63177, 6681}, new char[]{29098, 920, 25372, 1253}, new char[]{0, 0, 0, 0}, ViewConfiguration.getMaximumFlingVelocity() >> 16, objArr4);
|
|
String str2 = (String) objArr4[0];
|
|
Object[] objArr5 = new Object[1];
|
|
f((char) ExpandableListView.getPackedPositionGroup(0L), new char[]{3036, 6164, 45962, 64764, 7543, 5692, 19687, 14682, 15679, 12530, 64499, 2757, 28193, 11869, 38873, 6652, 35996, 35071, 51884, 31637, 21806, 53553, 35697, 49769, 37268, 19383, 9349, 48006, 42822, 30013, 7950, 29090, 56686, 6754, 22980, 33662, 53109, 14496, 23352, 26464, 7882, 65137, 45003, 37284, 30622, 39529, 38848, 54902, 16634, 6301, 26227, 16156, 14231, 14406, 5695, 7993, 54712, 6662, 28088, 427, 21536, 65116, 17734, 25626}, new char[]{15534, 53619, 41218, 45003}, new char[]{0, 0, 0, 0}, AndroidCharacter.getMirror('0') - '0', objArr5);
|
|
String str3 = (String) objArr5[0];
|
|
Object[] objArr6 = new Object[1];
|
|
f((char) (TextUtils.lastIndexOf("", '0') + 1), new char[]{29492, 5242, 60246, 36345, 57701, 28731, 23843, 52941, 52238, 58548, 25775, 22180, 59686, 43542, 47895, 5773, 26012, 17728, 30236, 38775, 22469, 15280, 23554, 10118, 47820, 3326, 54784, 54555, 58596, 62928, 62395, 27713, 2322, 48486, 8305, 63428, 55670, 53039, 6212, 18385, 41850, 40928, 60459, 37658, 63219, 668, 28790, 14835, 19147, 52764, 61627, 22790, 27638, 17460, 11866, 39577, 29218, 58977, 7819, 36579, 55292, 15807, 9480, 32651, 533, 32001, 8625, 25896, 40108, 1122, 1351, 37005, 10220, 48556}, new char[]{25503, 64698, 61630, 29815}, new char[]{0, 0, 0, 0}, (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1)) - 1, objArr6);
|
|
String str4 = (String) objArr6[0];
|
|
Object[] objArr7 = new Object[1];
|
|
f((char) (View.resolveSizeAndState(0, 0, 0) + 7643), new char[]{52474, 9876, 16148, 7750, 24043}, new char[]{52771, 24447, 56231, 49437}, new char[]{0, 0, 0, 0}, (-1486913585) - (SystemClock.uptimeMillis() > 0L ? 1 : (SystemClock.uptimeMillis() == 0L ? 0 : -1)), objArr7);
|
|
String str5 = (String) objArr7[0];
|
|
Object[] objArr8 = new Object[1];
|
|
f((char) TextUtils.getOffsetAfter("", 0), new char[]{60354, 55916, 2664, 38412, 46747, 38346, 25071, 13648, 35456, 16548, 63041, 8849, 2958, 19534, 48424, 32515, 18983, 26381, 23510, 6690, 31723, 60601, 19716, 11250, 53890, 22002, 15728, 55163, 55324, 28403, 13219, 4969, 39103, 1995, 27447, 23653}, new char[]{1798, 16590, 62545, 15322}, new char[]{0, 0, 0, 0}, ExpandableListView.getPackedPositionGroup(0L), objArr8);
|
|
Object[] objArr9 = {context2, str, str2, str3, str4, true, str5, (String) objArr8[0]};
|
|
Object obj2 = xzZ.y.get(1656189573);
|
|
if (obj2 == null) {
|
|
obj2 = ((Class) xzZ.c(ExpandableListView.getPackedPositionChild(0L) + 488, '5' - AndroidCharacter.getMirror('0'), (char) ((-1) - TextUtils.lastIndexOf("", '0')))).getMethod("e", Context.class, String.class, String.class, String.class, String.class, Boolean.TYPE, String.class, String.class);
|
|
xzZ.y.put(1656189573, obj2);
|
|
}
|
|
((Method) obj2).invoke(invoke, objArr9);
|
|
} catch (Throwable th) {
|
|
Throwable cause = th.getCause();
|
|
if (cause == null) {
|
|
throw th;
|
|
}
|
|
throw cause;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private static void f(char c2, char[] cArr, char[] cArr2, char[] cArr3, int i, Object[] objArr) {
|
|
int i2 = 2;
|
|
int i3 = 2 % 2;
|
|
Nhs nhs = new Nhs();
|
|
int length = cArr2.length;
|
|
char[] cArr4 = new char[length];
|
|
int length2 = cArr3.length;
|
|
char[] cArr5 = new char[length2];
|
|
System.arraycopy(cArr2, 0, cArr4, 0, length);
|
|
System.arraycopy(cArr3, 0, cArr5, 0, length2);
|
|
cArr4[0] = (char) (cArr4[0] ^ c2);
|
|
cArr5[2] = (char) (cArr5[2] + ((char) i));
|
|
int length3 = cArr.length;
|
|
char[] cArr6 = new char[length3];
|
|
nhs.a = 0;
|
|
while (nhs.a < length3) {
|
|
int i4 = $11 + 53;
|
|
$10 = i4 % 128;
|
|
int i5 = i4 % i2;
|
|
try {
|
|
Object[] objArr2 = {nhs};
|
|
Object obj = xzZ.y.get(263693715);
|
|
if (obj == null) {
|
|
obj = ((Class) xzZ.c((ViewConfiguration.getMaximumFlingVelocity() >> 16) + 45, 5 - TextUtils.getOffsetAfter("", 0), (char) (1 - (SystemClock.uptimeMillis() > 0L ? 1 : (SystemClock.uptimeMillis() == 0L ? 0 : -1))))).getMethod("t", Object.class);
|
|
xzZ.y.put(263693715, obj);
|
|
}
|
|
int intValue = ((Integer) ((Method) obj).invoke(null, objArr2)).intValue();
|
|
Object[] objArr3 = {nhs};
|
|
Object obj2 = xzZ.y.get(-484664112);
|
|
if (obj2 == null) {
|
|
Class cls = (Class) xzZ.c(351 - TextUtils.lastIndexOf("", '0'), TextUtils.indexOf((CharSequence) "", '0') + 6, (char) ((CdmaCellLocation.convertQuartSecToDecDegrees(0) > 0.0d ? 1 : (CdmaCellLocation.convertQuartSecToDecDegrees(0) == 0.0d ? 0 : -1)) + 52128));
|
|
byte b2 = (byte) ($$b & 5);
|
|
byte b3 = (byte) (b2 - 1);
|
|
Object[] objArr4 = new Object[1];
|
|
g(b2, b3, (byte) (b3 - 1), objArr4);
|
|
obj2 = cls.getMethod((String) objArr4[0], Object.class);
|
|
xzZ.y.put(-484664112, obj2);
|
|
}
|
|
int intValue2 = ((Integer) ((Method) obj2).invoke(null, objArr3)).intValue();
|
|
Object[] objArr5 = {nhs, Integer.valueOf(cArr4[nhs.a % 4] * 32718), Integer.valueOf(cArr5[intValue])};
|
|
Object obj3 = xzZ.y.get(430099516);
|
|
if (obj3 == null) {
|
|
obj3 = ((Class) xzZ.c(748 - (ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)), 5 - (ViewConfiguration.getMaximumFlingVelocity() >> 16), (char) ('0' - AndroidCharacter.getMirror('0')))).getMethod(p.a, Object.class, Integer.TYPE, Integer.TYPE);
|
|
xzZ.y.put(430099516, obj3);
|
|
}
|
|
((Method) obj3).invoke(null, objArr5);
|
|
Object[] objArr6 = {Integer.valueOf(cArr4[intValue2] * 32718), Integer.valueOf(cArr5[intValue])};
|
|
Object obj4 = xzZ.y.get(1019894806);
|
|
if (obj4 == null) {
|
|
Class cls2 = (Class) xzZ.c(402 - (ViewConfiguration.getScrollBarSize() >> 8), 5 - (ViewConfiguration.getTouchSlop() >> 8), (char) (Color.red(0) + 21608));
|
|
byte b4 = (byte) 0;
|
|
byte b5 = b4;
|
|
Object[] objArr7 = new Object[1];
|
|
g(b4, b5, (byte) (b5 - 1), objArr7);
|
|
obj4 = cls2.getMethod((String) objArr7[0], Integer.TYPE, Integer.TYPE);
|
|
xzZ.y.put(1019894806, obj4);
|
|
}
|
|
cArr5[intValue2] = ((Character) ((Method) obj4).invoke(null, objArr6)).charValue();
|
|
cArr4[intValue2] = nhs.c;
|
|
cArr6[nhs.a] = (char) ((((cArr4[intValue2] ^ cArr[nhs.a]) ^ (a ^ 9051040786702654117L)) ^ ((int) (d ^ 9051040786702654117L))) ^ ((char) (c ^ 9051040786702654117L)));
|
|
nhs.a++;
|
|
i2 = 2;
|
|
} catch (Throwable th) {
|
|
Throwable cause = th.getCause();
|
|
if (cause == null) {
|
|
throw th;
|
|
}
|
|
throw cause;
|
|
}
|
|
}
|
|
String str = new String(cArr6);
|
|
int i6 = $11 + 107;
|
|
$10 = i6 % 128;
|
|
int i7 = i6 % 2;
|
|
objArr[0] = str;
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
public void onCreate() {
|
|
int i = 2 % 2;
|
|
int i2 = b + 125;
|
|
e = i2 % 128;
|
|
int i3 = i2 % 2;
|
|
super.onCreate();
|
|
int i4 = e + 21;
|
|
b = i4 % 128;
|
|
int i5 = i4 % 2;
|
|
}
|
|
|
|
@Override // android.app.Service
|
|
public IBinder onBind(Intent intent) {
|
|
int i = 2 % 2;
|
|
int i2 = b;
|
|
int i3 = i2 + 57;
|
|
e = i3 % 128;
|
|
int i4 = i3 % 2;
|
|
int i5 = i2 + 97;
|
|
e = i5 % 128;
|
|
if (i5 % 2 == 0) {
|
|
return null;
|
|
}
|
|
throw null;
|
|
}
|
|
}
|