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

603 lines
22 KiB
Java

package o;
import android.graphics.Color;
import android.os.Process;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.google.common.net.HttpHeaders;
import com.huawei.hms.framework.common.ContainerUtils;
import java.lang.reflect.Method;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
import java.util.TreeMap;
import java.util.TreeSet;
import net.sf.scuba.smartcards.ISO7816;
import o.InterfaceC17333vqS;
/* loaded from: classes.dex */
public final class HNc {
private static final byte[] $$a = {93, -104, ISO7816.INS_UPDATE_RECORD, ISO7816.INS_WRITE_RECORD};
private static final int $$b = 32;
private static int $10 = 0;
private static int $11 = 1;
private static int e = 0;
private static int c = 1;
private static int[] b = {-2108332186, -1821895320, -775075057, 504075624, 750346631, -1900472683, 439171688, 1495321655, 900590213, 1604482445, 1227793644, 963196774, -379330142, -771824446, -1617961710, 751247686, 2133735608, 1961834681};
/* JADX WARN: Removed duplicated region for block: B:10:0x0026 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001e */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0026 -> B:4:0x002b). 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 f(byte r6, int r7, short r8, java.lang.Object[] r9) {
/*
int r7 = r7 * 2
int r7 = r7 + 102
byte[] r0 = o.HNc.$$a
int r8 = r8 * 3
int r8 = r8 + 4
int r6 = r6 * 3
int r1 = r6 + 1
byte[] r1 = new byte[r1]
r2 = 0
if (r0 != 0) goto L16
r3 = r8
r4 = r2
goto L2b
L16:
r3 = r2
L17:
byte r4 = (byte) r7
r1[r3] = r4
int r4 = r3 + 1
if (r3 != r6) goto L26
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L26:
r3 = r0[r8]
r5 = r3
r3 = r8
r8 = r5
L2b:
int r8 = -r8
int r7 = r7 + r8
int r8 = r3 + 1
r3 = r4
goto L17
*/
throw new UnsupportedOperationException("Method not decompiled: o.HNc.f(byte, int, short, java.lang.Object[]):void");
}
/* JADX INFO: Access modifiers changed from: private */
public static /* synthetic */ Object b(Object[] objArr) {
boolean z;
long j;
long j2;
DrQ drQ;
long j3;
long j4;
long j5;
int i = 0;
DrQ drQ2 = (DrQ) objArr[0];
int i2 = 2 % 2;
int i3 = c + 61;
e = i3 % 128;
int i4 = i3 % 2;
long currentTimeMillis = System.currentTimeMillis();
Map<String, String> map = drQ2.a;
if (map == null) {
int i5 = c + 17;
e = i5 % 128;
int i6 = i5 % 2;
return null;
}
String str = map.get(HttpHeaders.DATE);
long b2 = str != null ? b(str) : 0L;
String str2 = map.get(HttpHeaders.CACHE_CONTROL);
if (str2 != null) {
String[] split = str2.split(",", 0);
z = false;
j = 0;
j2 = 0;
while (i < split.length) {
String trim = split[i].trim();
if (trim.equals("no-cache") || trim.equals("no-store")) {
return null;
}
if (trim.startsWith("max-age=")) {
try {
j2 = Long.parseLong(trim.substring(8));
int i7 = e + 5;
c = i7 % 128;
int i8 = i7 % 2;
} catch (Exception unused) {
}
} else if (trim.startsWith("stale-while-revalidate=")) {
int i9 = c + 63;
e = i9 % 128;
int i10 = i9 % 2;
j = Long.parseLong(trim.substring(23));
} else if (!(!trim.equals("must-revalidate")) || trim.equals("proxy-revalidate")) {
z = true;
}
i++;
}
i = 1;
} else {
z = false;
j = 0;
j2 = 0;
}
String str3 = map.get(HttpHeaders.EXPIRES);
long b3 = str3 != null ? b(str3) : 0L;
String str4 = map.get(HttpHeaders.LAST_MODIFIED);
if (str4 != null) {
int i11 = e + 5;
drQ = drQ2;
c = i11 % 128;
int i12 = i11 % 2;
j3 = b(str4);
} else {
drQ = drQ2;
j3 = 0;
}
String str5 = map.get(HttpHeaders.ETAG);
if (i != 0) {
j5 = currentTimeMillis + (j2 * 1000);
j4 = z ? j5 : (j * 1000) + j5;
} else {
j4 = 0;
if (b2 > 0) {
int i13 = c;
int i14 = i13 + 95;
e = i14 % 128;
int i15 = i14 % 2;
if (b3 >= b2) {
int i16 = i13 + 89;
e = i16 % 128;
j5 = i16 % 2 != 0 ? currentTimeMillis & b3 & b2 : currentTimeMillis + (b3 - b2);
j4 = j5;
}
}
int i17 = e + 61;
c = i17 % 128;
if (i17 % 2 == 0) {
int i18 = 4 % 5;
}
j5 = 0;
}
InterfaceC17333vqS.IeS ieS = new InterfaceC17333vqS.IeS();
DrQ drQ3 = drQ;
ieS.a = drQ3.c;
ieS.e = str5;
ieS.i = j5;
ieS.f = j4;
ieS.h = b2;
ieS.b = j3;
ieS.c = map;
ieS.d = drQ3.e;
return ieS;
}
private static void d(int[] iArr, int i, Object[] objArr) {
int i2;
int length;
int[] iArr2;
int i3;
int i4 = 2;
int i5 = 2 % 2;
C4403bZM c4403bZM = new C4403bZM();
char[] cArr = new char[4];
char[] cArr2 = new char[iArr.length * 2];
int[] iArr3 = b;
int i6 = 729798706;
int i7 = 1;
int i8 = 0;
if (iArr3 != null) {
int i9 = $11 + 13;
$10 = i9 % 128;
if (i9 % 2 != 0) {
length = iArr3.length;
iArr2 = new int[length];
i3 = 1;
} else {
length = iArr3.length;
iArr2 = new int[length];
i3 = 0;
}
while (i3 < length) {
int i10 = $10 + 65;
$11 = i10 % 128;
int i11 = i10 % i4;
try {
Object[] objArr2 = new Object[1];
objArr2[i8] = Integer.valueOf(iArr3[i3]);
Object obj = xzZ.y.get(Integer.valueOf(i6));
if (obj == null) {
Class cls = (Class) xzZ.c(TextUtils.getOffsetBefore("", i8) + 15, 5 - (ViewConfiguration.getFadingEdgeLength() >> 16), (char) (58133 - TextUtils.indexOf((CharSequence) "", '0', i8, i8)));
Class<?>[] clsArr = new Class[1];
clsArr[i8] = Integer.TYPE;
obj = cls.getMethod("i", clsArr);
xzZ.y.put(729798706, obj);
}
iArr2[i3] = ((Integer) ((Method) obj).invoke(null, objArr2)).intValue();
i3++;
i4 = 2;
i6 = 729798706;
i8 = 0;
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
iArr3 = iArr2;
}
int length2 = iArr3.length;
int[] iArr4 = new int[length2];
int[] iArr5 = b;
if (iArr5 != null) {
int length3 = iArr5.length;
int[] iArr6 = new int[length3];
int i12 = 0;
while (i12 < length3) {
int i13 = $11 + 23;
$10 = i13 % 128;
if (i13 % 2 != 0) {
Object[] objArr3 = new Object[i7];
objArr3[0] = Integer.valueOf(iArr5[i12]);
Object obj2 = xzZ.y.get(729798706);
if (obj2 != null) {
i2 = length3;
} else {
obj2 = ((Class) xzZ.c((ViewConfiguration.getScrollBarFadeDuration() >> 16) + 15, Color.rgb(0, 0, 0) + 16777221, (char) (58134 - (ViewConfiguration.getEdgeSlop() >> 16)))).getMethod("i", Integer.TYPE);
i2 = length3;
xzZ.y.put(729798706, obj2);
}
iArr6[i12] = ((Integer) ((Method) obj2).invoke(null, objArr3)).intValue();
i12 >>>= 1;
} else {
i2 = length3;
Object[] objArr4 = {Integer.valueOf(iArr5[i12])};
Object obj3 = xzZ.y.get(729798706);
if (obj3 == null) {
obj3 = ((Class) xzZ.c((Process.myTid() >> 22) + 15, ((byte) KeyEvent.getModifierMetaStateMask()) + 6, (char) ((ViewConfiguration.getMaximumFlingVelocity() >> 16) + 58134))).getMethod("i", Integer.TYPE);
xzZ.y.put(729798706, obj3);
}
iArr6[i12] = ((Integer) ((Method) obj3).invoke(null, objArr4)).intValue();
i12++;
}
length3 = i2;
i7 = 1;
}
iArr5 = iArr6;
}
System.arraycopy(iArr5, 0, iArr4, 0, length2);
c4403bZM.b = 0;
int i14 = $10 + 111;
$11 = i14 % 128;
if (i14 % 2 == 0) {
int i15 = 4 / 4;
}
while (c4403bZM.b < iArr.length) {
cArr[0] = (char) (iArr[c4403bZM.b] >> 16);
cArr[1] = (char) iArr[c4403bZM.b];
cArr[2] = (char) (iArr[c4403bZM.b + 1] >> 16);
cArr[3] = (char) iArr[c4403bZM.b + 1];
c4403bZM.e = (cArr[0] << 16) + cArr[1];
c4403bZM.a = (cArr[2] << 16) + cArr[3];
C4403bZM.d(iArr4);
int i16 = 0;
for (int i17 = 16; i16 < i17; i17 = 16) {
int i18 = $11 + 9;
$10 = i18 % 128;
if (i18 % 2 != 0) {
c4403bZM.e ^= iArr4[i16];
Object[] objArr5 = {c4403bZM, Integer.valueOf(C4403bZM.d(c4403bZM.e)), c4403bZM, c4403bZM};
Object obj4 = xzZ.y.get(-1196964548);
if (obj4 == null) {
Class cls2 = (Class) xzZ.c(TextUtils.indexOf((CharSequence) "", '0', 0, 0) + 119, 5 - TextUtils.getOffsetAfter("", 0), (char) (1 - (Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1))));
byte b2 = (byte) 0;
byte b3 = (byte) (b2 + 1);
Object[] objArr6 = new Object[1];
f(b2, b3, (byte) (b3 - 1), objArr6);
obj4 = cls2.getMethod((String) objArr6[0], Object.class, Integer.TYPE, Object.class, Object.class);
xzZ.y.put(-1196964548, obj4);
}
int intValue = ((Integer) ((Method) obj4).invoke(null, objArr5)).intValue();
c4403bZM.e = c4403bZM.a;
c4403bZM.a = intValue;
i16 += 56;
} else {
c4403bZM.e ^= iArr4[i16];
Object[] objArr7 = {c4403bZM, Integer.valueOf(C4403bZM.d(c4403bZM.e)), c4403bZM, c4403bZM};
Object obj5 = xzZ.y.get(-1196964548);
if (obj5 == null) {
Class cls3 = (Class) xzZ.c(Color.red(0) + 118, (ViewConfiguration.getMaximumFlingVelocity() >> 16) + 5, (char) TextUtils.indexOf("", "", 0));
byte b4 = (byte) 0;
byte b5 = (byte) (b4 + 1);
Object[] objArr8 = new Object[1];
f(b4, b5, (byte) (b5 - 1), objArr8);
obj5 = cls3.getMethod((String) objArr8[0], Object.class, Integer.TYPE, Object.class, Object.class);
xzZ.y.put(-1196964548, obj5);
}
int intValue2 = ((Integer) ((Method) obj5).invoke(null, objArr7)).intValue();
c4403bZM.e = c4403bZM.a;
c4403bZM.a = intValue2;
i16++;
}
}
int i19 = c4403bZM.e;
c4403bZM.e = c4403bZM.a;
c4403bZM.a = i19;
c4403bZM.a ^= iArr4[16];
c4403bZM.e ^= iArr4[17];
int i20 = c4403bZM.e;
int i21 = c4403bZM.a;
cArr[0] = (char) (c4403bZM.e >>> 16);
cArr[1] = (char) c4403bZM.e;
cArr[2] = (char) (c4403bZM.a >>> 16);
cArr[3] = (char) c4403bZM.a;
C4403bZM.d(iArr4);
cArr2[c4403bZM.b * 2] = cArr[0];
cArr2[(c4403bZM.b * 2) + 1] = cArr[1];
cArr2[(c4403bZM.b * 2) + 2] = cArr[2];
cArr2[(c4403bZM.b * 2) + 3] = cArr[3];
Object[] objArr9 = {c4403bZM, c4403bZM};
Object obj6 = xzZ.y.get(1914371176);
if (obj6 == null) {
Class cls4 = (Class) xzZ.c(KeyEvent.normalizeMetaState(0) + 98, 4 - (ExpandableListView.getPackedPositionForChild(0, 0) > 0L ? 1 : (ExpandableListView.getPackedPositionForChild(0, 0) == 0L ? 0 : -1)), (char) (ViewConfiguration.getMinimumFlingVelocity() >> 16));
byte b6 = (byte) 0;
byte b7 = b6;
Object[] objArr10 = new Object[1];
f(b6, b7, b7, objArr10);
obj6 = cls4.getMethod((String) objArr10[0], Object.class, Object.class);
xzZ.y.put(1914371176, obj6);
}
((Method) obj6).invoke(null, objArr9);
}
objArr[0] = new String(cArr2, 0, i);
}
private static long b(String str) {
int i = 2 % 2;
try {
return a("EEE, dd MMM yyyy HH:mm:ss zzz").parse(str).getTime();
} catch (ParseException unused) {
Object[] objArr = new Object[1];
d(new int[]{256420145, 1377690654}, 1 - TextUtils.getCapsMode("", 0, 0), objArr);
if (((String) objArr[0]).intern().equals(str) || "-1".equals(str)) {
qWd.e("Unable to parse dateStr: %s, falling back to 0", str);
} else {
int i2 = e + 117;
c = i2 % 128;
if (i2 % 2 == 0) {
Object[] objArr2 = new Object[0];
objArr2[0] = str;
qWd.b("Unable to parse dateStr: %s, falling back to 0", objArr2);
} else {
qWd.b("Unable to parse dateStr: %s, falling back to 0", str);
}
}
int i3 = c + 65;
e = i3 % 128;
int i4 = i3 % 2;
return 0L;
}
}
private static String e(long j) {
int i = 2 % 2;
String format = a("EEE, dd MMM yyyy HH:mm:ss 'GMT'").format(new Date(j));
int i2 = c + 1;
e = i2 % 128;
if (i2 % 2 == 0) {
return format;
}
Object obj = null;
obj.hashCode();
throw null;
}
private static SimpleDateFormat a(String str) {
int i = 2 % 2;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(str, Locale.US);
simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
int i2 = c + 35;
e = i2 % 128;
int i3 = i2 % 2;
return simpleDateFormat;
}
public static String e(Map<String, String> map, String str) {
String[] split;
int i;
int i2 = 2 % 2;
int i3 = e + 21;
int i4 = i3 % 128;
c = i4;
if (i3 % 2 == 0) {
Object obj = null;
obj.hashCode();
throw null;
}
if (map == null) {
int i5 = i4 + 117;
e = i5 % 128;
int i6 = i5 % 2;
return str;
}
String str2 = map.get(HttpHeaders.CONTENT_TYPE);
if (str2 != null) {
int i7 = e + 87;
c = i7 % 128;
if (i7 % 2 == 0) {
split = str2.split(";", 0);
i = 0;
} else {
split = str2.split(";", 0);
i = 1;
}
while (i < split.length) {
int i8 = e + 3;
c = i8 % 128;
int i9 = i8 % 2;
String[] split2 = split[i].trim().split(ContainerUtils.KEY_VALUE_DELIMITER, 0);
if (split2.length == 2 && split2[0].equals("charset")) {
String str3 = split2[1];
int i10 = e + 119;
c = i10 % 128;
if (i10 % 2 == 0) {
int i11 = 49 / 0;
}
return str3;
}
i++;
}
}
return str;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Map<String, String> b(List<ucE> list) {
int i = 2 % 2;
TreeMap treeMap = new TreeMap(String.CASE_INSENSITIVE_ORDER);
Iterator<ucE> it = list.iterator();
while (true) {
Object obj = null;
if (!it.hasNext()) {
int i2 = c + 117;
e = i2 % 128;
if (i2 % 2 == 0) {
return treeMap;
}
obj.hashCode();
throw null;
}
int i3 = e + 37;
c = i3 % 128;
if (i3 % 2 == 0) {
ucE next = it.next();
treeMap.put(next.e, next.b);
throw null;
}
ucE next2 = it.next();
treeMap.put(next2.e, next2.b);
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static List<ucE> a(Map<String, String> map) {
int i = 2 % 2;
ArrayList arrayList = new ArrayList(map.size());
for (Map.Entry<String, String> entry : map.entrySet()) {
arrayList.add(new ucE(entry.getKey(), entry.getValue()));
}
int i2 = c + 51;
e = i2 % 128;
if (i2 % 2 == 0) {
return arrayList;
}
Object obj = null;
obj.hashCode();
throw null;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static List<ucE> c(List<ucE> list, InterfaceC17333vqS.IeS ieS) {
Map.Entry<String, String> next;
int i = 2 % 2;
TreeSet treeSet = new TreeSet(String.CASE_INSENSITIVE_ORDER);
if (!list.isEmpty()) {
Iterator<ucE> it = list.iterator();
while (it.hasNext()) {
treeSet.add(it.next().e);
}
}
ArrayList arrayList = new ArrayList(list);
if (ieS.d != null) {
if (!ieS.d.isEmpty()) {
for (ucE uce : ieS.d) {
int i2 = c + 81;
e = i2 % 128;
int i3 = i2 % 2;
if (!treeSet.contains(uce.e)) {
arrayList.add(uce);
}
}
}
} else if (!ieS.c.isEmpty()) {
Iterator<Map.Entry<String, String>> it2 = ieS.c.entrySet().iterator();
while (it2.hasNext()) {
int i4 = e + 95;
c = i4 % 128;
if (i4 % 2 == 0) {
next = it2.next();
int i5 = 7 / 0;
if (!treeSet.contains(next.getKey())) {
arrayList.add(new ucE(next.getKey(), next.getValue()));
}
} else {
next = it2.next();
if (!treeSet.contains(next.getKey())) {
arrayList.add(new ucE(next.getKey(), next.getValue()));
}
}
}
}
int i6 = e + 53;
c = i6 % 128;
if (i6 % 2 != 0) {
return arrayList;
}
throw null;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Map<String, String> a(InterfaceC17333vqS.IeS ieS) {
int i = 2 % 2;
int i2 = e + 31;
c = i2 % 128;
int i3 = i2 % 2;
if (ieS == null) {
return Collections.emptyMap();
}
HashMap hashMap = new HashMap();
if (ieS.e != null) {
int i4 = c + 109;
e = i4 % 128;
if (i4 % 2 != 0) {
hashMap.put(HttpHeaders.IF_NONE_MATCH, ieS.e);
int i5 = 49 / 0;
} else {
hashMap.put(HttpHeaders.IF_NONE_MATCH, ieS.e);
}
}
if (ieS.b > 0) {
hashMap.put(HttpHeaders.IF_MODIFIED_SINCE, e(ieS.b));
}
return hashMap;
}
public static InterfaceC17333vqS.IeS a(DrQ drQ) {
return (InterfaceC17333vqS.IeS) b(new Object[]{drQ});
}
}