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

700 lines
22 KiB
Java

package o;
import android.content.Context;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.media.AudioTrack;
import android.os.Build;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.common.base.Ascii;
import com.scottyab.rootbeer.RootBeerNative;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Scanner;
/* renamed from: o.fMg, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C12959fMg {
private static short[] i;
private boolean b = true;
private final Context c;
private static final byte[] $$a = {Ascii.SYN, 77, -47, -12};
private static final int $$b = 92;
private static int $10 = 0;
private static int $11 = 1;
private static int h = 0;
private static int f = 1;
private static int d = -852494761;
private static int e = 1406017113;
private static int a = 1445777461;
private static byte[] j = {Ascii.ETB, Ascii.NAK, Ascii.NAK, Ascii.NAK};
/* JADX WARN: Code restructure failed: missing block: B:15:0x00c8, code lost:
if (((java.lang.Boolean) b(new java.lang.Object[]{((java.lang.String) r4[0]).intern()}, 742528728, -742528727, (int) java.lang.System.currentTimeMillis())).booleanValue() == false) goto L18;
*/
/* JADX WARN: Code restructure failed: missing block: B:17:0x0111, code lost:
if (e() != false) goto L32;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0117, code lost:
if (j() != false) goto L32;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x0119, code lost:
r4 = o.C12959fMg.h + 69;
o.C12959fMg.f = r4 % 128;
r4 = r4 % 2;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x0125, code lost:
if (k() != false) goto L32;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x012b, code lost:
if (h() == false) goto L27;
*/
/* JADX WARN: Code restructure failed: missing block: B:25:0x0132, code lost:
if (r3.f() != false) goto L32;
*/
/* JADX WARN: Code restructure failed: missing block: B:27:0x0138, code lost:
if (i() != false) goto L32;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x013a, code lost:
r0 = o.C12959fMg.h + 49;
o.C12959fMg.f = r0 % 128;
r0 = r0 % 2;
r0 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x010b, code lost:
if (((java.lang.Boolean) b(new java.lang.Object[]{((java.lang.String) r4[0]).intern()}, 742528728, -742528727, (int) java.lang.System.currentTimeMillis())).booleanValue() == false) goto L18;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static /* synthetic */ java.lang.Object b(java.lang.Object[] r18, int r19, int r20, int r21) {
/*
Method dump skipped, instructions count: 334
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.C12959fMg.b(java.lang.Object[], int, int, int):java.lang.Object");
}
/* 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:0x002a). 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 p(byte r6, byte r7, int r8, java.lang.Object[] r9) {
/*
int r7 = r7 * 4
int r7 = 1 - r7
int r6 = r6 * 3
int r6 = 3 - r6
byte[] r0 = o.C12959fMg.$$a
int r8 = r8 * 2
int r8 = 110 - r8
byte[] r1 = new byte[r7]
r2 = 0
if (r0 != 0) goto L16
r3 = r7
r4 = r2
goto L2a
L16:
r3 = r2
L17:
int r4 = r3 + 1
byte r5 = (byte) r8
r1[r3] = r5
int r6 = r6 + 1
if (r4 != r7) goto L28
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L28:
r3 = r0[r6]
L2a:
int r3 = -r3
int r8 = r8 + r3
r3 = r4
goto L17
*/
throw new UnsupportedOperationException("Method not decompiled: o.C12959fMg.p(byte, byte, int, java.lang.Object[]):void");
}
public C12959fMg(Context context) {
this.c = context;
}
private static boolean k() {
String str;
int i2 = 2 % 2;
int i3 = f + 21;
h = i3 % 128;
if (i3 % 2 != 0) {
str = Build.TAGS;
int i4 = 3 / 0;
if (str == null) {
return false;
}
} else {
str = Build.TAGS;
if (str == null) {
return false;
}
}
int i5 = f + 15;
h = i5 % 128;
int i6 = i5 % 2;
if (!str.contains("test-keys")) {
return false;
}
int i7 = h + 77;
f = i7 % 128;
int i8 = i7 % 2;
return true;
}
private boolean l() {
int i2 = 2 % 2;
int i3 = f + 1;
h = i3 % 128;
int i4 = i3 % 2;
boolean n = n();
if (i4 != 0) {
int i5 = 32 / 0;
}
return n;
}
private boolean n() {
int i2 = 2 % 2;
boolean c = c(new ArrayList(Arrays.asList(C12955fMc.b)));
int i3 = h + 63;
f = i3 % 128;
int i4 = i3 % 2;
return c;
}
private boolean g() {
int i2 = 2 % 2;
int i3 = f + 75;
h = i3 % 128;
int i4 = i3 % 2;
boolean booleanValue = ((Boolean) b(new Object[]{this}, -501206941, 501206941, System.identityHashCode(this))).booleanValue();
int i5 = h + 7;
f = i5 % 128;
int i6 = i5 % 2;
return booleanValue;
}
private static boolean i() {
int i2 = 2 % 2;
int i3 = f + 51;
h = i3 % 128;
int i4 = i3 % 2;
boolean booleanValue = ((Boolean) b(new Object[]{"magisk"}, 742528728, -742528727, (int) System.currentTimeMillis())).booleanValue();
int i5 = f + 7;
h = i5 % 128;
if (i5 % 2 == 0) {
return booleanValue;
}
Object obj = null;
obj.hashCode();
throw null;
}
private static /* synthetic */ Object d(Object[] objArr) {
int i2 = 0;
String str = (String) objArr[0];
int i3 = 2 % 2;
String[] c = C12955fMc.c();
int length = c.length;
int i4 = f + 45;
h = i4 % 128;
int i5 = i4 % 2;
boolean z = false;
while (i2 < length) {
if (new File(c[i2], str).exists()) {
int i6 = h + 107;
f = i6 % 128;
int i7 = i6 % 2;
C12961fMi.e();
int i8 = h + 73;
f = i8 % 128;
int i9 = i8 % 2;
z = true;
}
i2++;
int i10 = h + 87;
f = i10 % 128;
int i11 = i10 % 2;
}
return Boolean.valueOf(z);
}
private static String[] b() {
int i2 = 2 % 2;
int i3 = h + 27;
f = i3 % 128;
Object obj = null;
try {
if (i3 % 2 != 0) {
InputStream inputStream = Runtime.getRuntime().exec("getprop").getInputStream();
if (inputStream != null) {
return new Scanner(inputStream).useDelimiter("\\A").next().split("\n");
}
int i4 = f + 51;
h = i4 % 128;
if (i4 % 2 == 0) {
return null;
}
throw null;
}
Runtime.getRuntime().exec("getprop").getInputStream();
obj.hashCode();
throw null;
} catch (IOException | NoSuchElementException unused) {
return null;
}
}
private static String[] d() {
int i2 = 2 % 2;
Object obj = null;
try {
InputStream inputStream = Runtime.getRuntime().exec("mount").getInputStream();
if (inputStream != null) {
return new Scanner(inputStream).useDelimiter("\\A").next().split("\n");
}
int i3 = f;
int i4 = i3 + 3;
h = i4 % 128;
int i5 = i4 % 2;
int i6 = i3 + 27;
h = i6 % 128;
if (i6 % 2 == 0) {
return null;
}
obj.hashCode();
throw null;
} catch (IOException | NoSuchElementException unused) {
return null;
}
}
/* JADX WARN: Removed duplicated region for block: B:34:0x01b0 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static void o(short r17, byte r18, int r19, int r20, int r21, java.lang.Object[] r22) {
/*
Method dump skipped, instructions count: 732
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: o.C12959fMg.o(short, byte, int, int, int, java.lang.Object[]):void");
}
private boolean c(List<String> list) {
int i2 = 2 % 2;
PackageManager packageManager = this.c.getPackageManager();
Iterator<String> it = list.iterator();
boolean z = false;
while (it.hasNext()) {
int i3 = f + 93;
h = i3 % 128;
if (i3 % 2 != 0) {
try {
packageManager.getPackageInfo(it.next(), 0);
C12961fMi.e();
C12961fMi.e();
z = false;
} catch (PackageManager.NameNotFoundException unused) {
}
} else {
packageManager.getPackageInfo(it.next(), 0);
C12961fMi.e();
C12961fMi.e();
z = true;
}
int i4 = f + 51;
h = i4 % 128;
int i5 = i4 % 2;
}
return z;
}
private static boolean e() {
int i2 = 2 % 2;
HashMap hashMap = new HashMap();
int i3 = 0;
Object[] objArr = new Object[1];
o((short) (ViewConfiguration.getTapTimeout() >> 16), (byte) View.resolveSize(0, 0), (TypedValue.complexToFloat(0) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFloat(0) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) - 75, 1629362110 - (ViewConfiguration.getTapTimeout() >> 16), (-98749935) - View.resolveSizeAndState(0, 0, 0), objArr);
hashMap.put("ro.debuggable", ((String) objArr[0]).intern());
Object[] objArr2 = new Object[1];
o((short) ((ViewConfiguration.getZoomControlsTimeout() > 0L ? 1 : (ViewConfiguration.getZoomControlsTimeout() == 0L ? 0 : -1)) - 1), (byte) TextUtils.indexOf("", ""), TextUtils.indexOf("", "", 0, 0) - 75, 1629362109 - MotionEvent.axisFromString(""), TextUtils.indexOf("", "") - 98749936, objArr2);
hashMap.put("ro.secure", ((String) objArr2[0]).intern());
String[] b = b();
if (b != null) {
int length = b.length;
boolean z = false;
while (i3 < length) {
String str = b[i3];
for (String str2 : hashMap.keySet()) {
if (str.contains(str2)) {
String str3 = (String) hashMap.get(str2);
StringBuilder sb = new StringBuilder("[");
sb.append(str3);
sb.append("]");
if (!(!str.contains(sb.toString()))) {
C12961fMi.e();
z = true;
}
}
}
i3++;
int i4 = f + 93;
h = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 4 % 3;
}
}
int i6 = f + 25;
h = i6 % 128;
int i7 = i6 % 2;
return z;
}
int i8 = f + 97;
h = i8 % 128;
int i9 = i8 % 2;
return false;
}
/* JADX WARN: Code restructure failed: missing block: B:10:0x003a, code lost:
if ((r6 % r0) != 0) goto L33;
*/
/* JADX WARN: Code restructure failed: missing block: B:11:0x003c, code lost:
o.C12961fMi.e();
o.C12961fMi.e();
*/
/* JADX WARN: Code restructure failed: missing block: B:13:0x0081, code lost:
r4 = r4 + 1;
r0 = 2;
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x0043, code lost:
o.C12961fMi.e();
o.C12961fMi.e();
*/
/* JADX WARN: Code restructure failed: missing block: B:16:0x004a, code lost:
throw null;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x004b, code lost:
r8 = r6[1];
r6 = r6[3];
r10 = o.C12955fMc.a.length;
r11 = 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0055, code lost:
if (r11 >= r10) goto L35;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x005e, code lost:
if ((!r8.equalsIgnoreCase(r9[r11])) == true) goto L36;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x0060, code lost:
r12 = r6.split(",");
r13 = r12.length;
r14 = 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x0068, code lost:
if (r14 >= r13) goto L37;
*/
/* JADX WARN: Code restructure failed: missing block: B:25:0x0072, code lost:
if (r12[r14].equalsIgnoreCase("rw") == false) goto L28;
*/
/* JADX WARN: Code restructure failed: missing block: B:26:0x0079, code lost:
r14 = r14 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x0074, code lost:
o.C12961fMi.e();
r5 = true;
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x007d, code lost:
r11 = r11 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:35:0x0085, code lost:
return r5;
*/
/* JADX WARN: Code restructure failed: missing block: B:36:0x001f, code lost:
return false;
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x001d, code lost:
if (r1 == null) goto L9;
*/
/* JADX WARN: Code restructure failed: missing block: B:4:0x0016, code lost:
if (r1 == null) goto L9;
*/
/* JADX WARN: Code restructure failed: missing block: B:5:0x0020, code lost:
r3 = r1.length;
r4 = 0;
r5 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:6:0x0023, code lost:
if (r4 >= r3) goto L32;
*/
/* JADX WARN: Code restructure failed: missing block: B:7:0x0025, code lost:
r6 = r1[r4].split(" ");
*/
/* JADX WARN: Code restructure failed: missing block: B:8:0x002f, code lost:
if (r6.length >= 4) goto L19;
*/
/* JADX WARN: Code restructure failed: missing block: B:9:0x0031, code lost:
r6 = o.C12959fMg.f + 117;
o.C12959fMg.h = r6 % 128;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static boolean j() {
/*
r0 = 2
int r1 = r0 % r0
int r1 = o.C12959fMg.f
int r1 = r1 + 25
int r2 = r1 % 128
o.C12959fMg.h = r2
int r1 = r1 % r0
r2 = 0
if (r1 == 0) goto L19
java.lang.String[] r1 = d()
r3 = 84
int r3 = r3 / r2
if (r1 != 0) goto L20
goto L1f
L19:
java.lang.String[] r1 = d()
if (r1 != 0) goto L20
L1f:
return r2
L20:
int r3 = r1.length
r4 = r2
r5 = r4
L23:
if (r4 >= r3) goto L85
r6 = r1[r4]
java.lang.String r7 = " "
java.lang.String[] r6 = r6.split(r7)
int r7 = r6.length
r8 = 4
if (r7 >= r8) goto L4b
int r6 = o.C12959fMg.f
int r6 = r6 + 117
int r7 = r6 % 128
o.C12959fMg.h = r7
int r6 = r6 % r0
if (r6 != 0) goto L43
o.C12961fMi.e()
o.C12961fMi.e()
goto L81
L43:
o.C12961fMi.e()
o.C12961fMi.e()
r0 = 0
throw r0
L4b:
r7 = 1
r8 = r6[r7]
r9 = 3
r6 = r6[r9]
java.lang.String[] r9 = o.C12955fMc.a
int r10 = r9.length
r11 = r2
L55:
if (r11 >= r10) goto L81
r12 = r9[r11]
boolean r12 = r8.equalsIgnoreCase(r12)
r12 = r12 ^ r7
if (r12 == r7) goto L7d
java.lang.String r12 = ","
java.lang.String[] r12 = r6.split(r12)
int r13 = r12.length
r14 = r2
L68:
if (r14 >= r13) goto L7d
r15 = r12[r14]
java.lang.String r0 = "rw"
boolean r0 = r15.equalsIgnoreCase(r0)
if (r0 == 0) goto L79
o.C12961fMi.e()
r5 = r7
goto L7d
L79:
int r14 = r14 + 1
r0 = 2
goto L68
L7d:
int r11 = r11 + 1
r0 = 2
goto L55
L81:
int r4 = r4 + 1
r0 = 2
goto L23
L85:
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: o.C12959fMg.j():boolean");
}
private static boolean h() {
int i2 = 2 % 2;
Process process = null;
boolean z = false;
try {
Runtime runtime = Runtime.getRuntime();
Object[] objArr = new Object[1];
o((short) Drawable.resolveOpacity(0, 0), (byte) (ViewConfiguration.getEdgeSlop() >> 16), View.getDefaultSize(0, 0) - 74, 1629362110 + (ViewConfiguration.getMaximumDrawingCacheSize() >> 24), (-98749870) + (AudioTrack.getMaxVolume() > BitmapDescriptorFactory.HUE_RED ? 1 : (AudioTrack.getMaxVolume() == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), objArr);
Process exec = runtime.exec(new String[]{"which", ((String) objArr[0]).intern()});
try {
if (new BufferedReader(new InputStreamReader(exec.getInputStream())).readLine() != null) {
int i3 = f + 31;
int i4 = i3 % 128;
h = i4;
int i5 = i3 % 2;
int i6 = i4 + 79;
f = i6 % 128;
int i7 = i6 % 2;
z = true;
}
if (exec != null) {
int i8 = h + 123;
f = i8 % 128;
int i9 = i8 % 2;
exec.destroy();
if (i9 == 0) {
process.hashCode();
throw null;
}
}
return z;
} catch (Throwable unused) {
process = exec;
if (process != null) {
process.destroy();
}
return false;
}
} catch (Throwable unused2) {
}
}
private static boolean a() {
int i2 = 2 % 2;
new RootBeerNative();
boolean c = RootBeerNative.c();
int i3 = f + 15;
h = i3 % 128;
int i4 = i3 % 2;
return c;
}
private boolean f() {
int i2 = 2 % 2;
if (a()) {
String[] c = C12955fMc.c();
int length = c.length;
String[] strArr = new String[length];
for (int i3 = 0; i3 < length; i3++) {
StringBuilder sb = new StringBuilder();
sb.append(c[i3]);
Object[] objArr = new Object[1];
o((short) View.combineMeasuredStates(0, 0), (byte) TextUtils.getTrimmedLength(""), (ViewConfiguration.getTouchSlop() >> 8) - 74, 1629362110 - View.getDefaultSize(0, 0), Color.blue(0) - 98749869, objArr);
sb.append(((String) objArr[0]).intern());
strArr[i3] = sb.toString();
}
RootBeerNative rootBeerNative = new RootBeerNative();
try {
rootBeerNative.setLogDebugMessages(this.b);
if (rootBeerNative.checkForRoot(strArr) <= 0) {
return false;
}
int i4 = f + 37;
h = i4 % 128;
int i5 = i4 % 2;
return true;
} catch (UnsatisfiedLinkError unused) {
return false;
}
}
C12961fMi.e();
C12961fMi.e();
int i6 = h + 111;
f = i6 % 128;
if (i6 % 2 == 0) {
int i7 = 45 / 0;
}
return false;
}
public final boolean c() {
return ((Boolean) b(new Object[]{this}, -521009956, 521009958, System.identityHashCode(this))).booleanValue();
}
private boolean m() {
return ((Boolean) b(new Object[]{this}, -501206941, 501206941, System.identityHashCode(this))).booleanValue();
}
private static boolean e(String str) {
return ((Boolean) b(new Object[]{str}, 742528728, -742528727, (int) System.currentTimeMillis())).booleanValue();
}
}