what-the-bank/sources/com/kofax/kmc/kut/utilities/appstats/AppStatsMsSqlExportHandler....

336 lines
14 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.kmc.kut.utilities.appstats;
import android.graphics.Color;
import android.os.Environment;
import android.os.Process;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewConfiguration;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import o.dQY;
import o.gjJ;
import o.xzZ;
/* loaded from: classes3.dex */
public class AppStatsMsSqlExportHandler implements AppStatsDsExportHandler {
private static final String TAG = "AppStatsMsSqlExportHandler";
private static char[] a;
private static int c;
private static long d;
private ArrayList<String> pV = new ArrayList<>();
private String path;
private static final byte[] $$a = {105, 77, -86, 73};
private static final int $$b = 64;
private static int $10 = 0;
private static int $11 = 1;
private static int b = 0;
/* 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:0x0026). 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(short r6, short r7, int r8, java.lang.Object[] r9) {
/*
int r6 = r6 * 2
int r6 = r6 + 4
int r8 = r8 + 98
int r7 = r7 * 2
int r7 = 1 - r7
byte[] r0 = com.kofax.kmc.kut.utilities.appstats.AppStatsMsSqlExportHandler.$$a
byte[] r1 = new byte[r7]
r2 = 0
if (r0 != 0) goto L14
r3 = r7
r5 = r2
goto L26
L14:
r3 = r2
L15:
byte r4 = (byte) r8
int r5 = r3 + 1
r1[r3] = r4
if (r5 != r7) goto L24
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L24:
r3 = r0[r6]
L26:
int r3 = -r3
int r6 = r6 + 1
int r8 = r8 + r3
r3 = r5
goto L15
*/
throw new UnsupportedOperationException("Method not decompiled: com.kofax.kmc.kut.utilities.appstats.AppStatsMsSqlExportHandler.f(short, short, int, java.lang.Object[]):void");
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsDsExportHandler
public void onExportAppStatsRowEvent(String str, AppStatsDaoField[] appStatsDaoFieldArr) {
int i = 2 % 2;
int i2 = c + 55;
b = i2 % 128;
int i3 = i2 % 2;
a(this.path, str, appStatsDaoFieldArr);
int i4 = c + 9;
b = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 75 / 0;
}
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsDsExportHandler
public void configDsExpFilePath(String str) {
int i = 2 % 2;
int i2 = b + 125;
c = i2 % 128;
int i3 = i2 % 2;
this.path = str;
if (str.endsWith(".sql")) {
t(this.path);
int i4 = c + 81;
b = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 91 / 0;
return;
}
return;
}
StringBuilder sb = new StringBuilder();
sb.append(this.path);
sb.append(".sql");
String obj = sb.toString();
this.path = obj;
t(obj);
}
private static void e(char c2, int i, int i2, Object[] objArr) {
int i3;
int i4 = 2;
int i5 = 2 % 2;
dQY dqy = new dQY();
long[] jArr = new long[i2];
dqy.a = 0;
while (dqy.a < i2) {
int i6 = $11 + 117;
$10 = i6 % 128;
if (i6 % i4 != 0) {
int i7 = dqy.a;
try {
Object[] objArr2 = {Integer.valueOf(a[i >>> dqy.a])};
Object obj = xzZ.y.get(1095064095);
if (obj == null) {
Class cls = (Class) xzZ.c((Process.myPid() >> 22) + 308, TextUtils.lastIndexOf("", '0', 0) + 6, (char) (32797 - (ViewConfiguration.getFadingEdgeLength() >> 16)));
byte b2 = (byte) 0;
byte b3 = b2;
Object[] objArr3 = new Object[1];
f(b2, b3, b3, objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE);
xzZ.y.put(1095064095, obj);
}
Object[] objArr4 = {Long.valueOf(((Long) ((Method) obj).invoke(null, objArr2)).longValue()), Long.valueOf(dqy.a), Long.valueOf(d), Integer.valueOf(c2)};
Object obj2 = xzZ.y.get(-548438098);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c(412 - (Process.myPid() >> 22), 5 - (ViewConfiguration.getPressedStateDuration() >> 16), (char) (ViewConfiguration.getLongPressTimeout() >> 16));
byte b4 = (byte) 0;
byte b5 = b4;
Object[] objArr5 = new Object[1];
f(b4, b5, (byte) (b5 + 1), objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Long.TYPE, Long.TYPE, Long.TYPE, Integer.TYPE);
xzZ.y.put(-548438098, obj2);
}
jArr[i7] = ((Long) ((Method) obj2).invoke(null, objArr4)).longValue();
Object[] objArr6 = {dqy, dqy};
Object obj3 = xzZ.y.get(1071125919);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c(407 - (ViewConfiguration.getTouchSlop() >> 8), ((Process.getThreadPriority(0) + 20) >> 6) + 5, (char) (29233 - TextUtils.lastIndexOf("", '0', 0, 0)));
byte b6 = (byte) 0;
byte b7 = b6;
Object[] objArr7 = new Object[1];
f(b6, b7, (byte) (b7 | 8), objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
xzZ.y.put(1071125919, obj3);
}
((Method) obj3).invoke(null, objArr6);
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
} else {
int i8 = dqy.a;
try {
Object[] objArr8 = {Integer.valueOf(a[i + dqy.a])};
Object obj4 = xzZ.y.get(1095064095);
if (obj4 == null) {
Class cls4 = (Class) xzZ.c((ViewConfiguration.getScrollDefaultDelay() >> 16) + 308, (ViewConfiguration.getMinimumFlingVelocity() >> 16) + 5, (char) (32797 - (ViewConfiguration.getKeyRepeatDelay() >> 16)));
byte b8 = (byte) 0;
byte b9 = b8;
Object[] objArr9 = new Object[1];
f(b8, b9, b9, objArr9);
obj4 = cls4.getMethod((String) objArr9[0], Integer.TYPE);
xzZ.y.put(1095064095, obj4);
}
try {
Object[] objArr10 = {Long.valueOf(((Long) ((Method) obj4).invoke(null, objArr8)).longValue()), Long.valueOf(dqy.a), Long.valueOf(d), Integer.valueOf(c2)};
Object obj5 = xzZ.y.get(-548438098);
if (obj5 == null) {
Class cls5 = (Class) xzZ.c(412 - View.MeasureSpec.makeMeasureSpec(0, 0), (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1)) + 4, (char) (ViewConfiguration.getPressedStateDuration() >> 16));
byte b10 = (byte) 0;
byte b11 = b10;
Object[] objArr11 = new Object[1];
f(b10, b11, (byte) (b11 + 1), objArr11);
obj5 = cls5.getMethod((String) objArr11[0], Long.TYPE, Long.TYPE, Long.TYPE, Integer.TYPE);
xzZ.y.put(-548438098, obj5);
}
jArr[i8] = ((Long) ((Method) obj5).invoke(null, objArr10)).longValue();
try {
Object[] objArr12 = {dqy, dqy};
Object obj6 = xzZ.y.get(1071125919);
if (obj6 == null) {
Class cls6 = (Class) xzZ.c(KeyEvent.getDeadChar(0, 0) + 407, Color.alpha(0) + 5, (char) (Color.blue(0) + 29234));
byte b12 = (byte) 0;
byte b13 = b12;
Object[] objArr13 = new Object[1];
f(b12, b13, (byte) (b13 | 8), objArr13);
obj6 = cls6.getMethod((String) objArr13[0], Object.class, Object.class);
xzZ.y.put(1071125919, obj6);
}
((Method) obj6).invoke(null, objArr12);
} catch (Throwable th2) {
Throwable cause2 = th2.getCause();
if (cause2 == null) {
throw th2;
}
throw cause2;
}
} catch (Throwable th3) {
Throwable cause3 = th3.getCause();
if (cause3 == null) {
throw th3;
}
throw cause3;
}
} catch (Throwable th4) {
Throwable cause4 = th4.getCause();
if (cause4 == null) {
throw th4;
}
throw cause4;
}
}
i4 = 2;
}
char[] cArr = new char[i2];
dqy.a = 0;
int i9 = $11 + 5;
$10 = i9 % 128;
int i10 = 2;
int i11 = i9 % 2;
while (dqy.a < i2) {
int i12 = $10 + 3;
$11 = i12 % 128;
int i13 = i12 % i10;
cArr[dqy.a] = (char) jArr[dqy.a];
Object[] objArr14 = {dqy, dqy};
Object obj7 = xzZ.y.get(1071125919);
if (obj7 != null) {
i3 = 2;
} else {
Class cls7 = (Class) xzZ.c(406 - ((byte) KeyEvent.getModifierMetaStateMask()), 5 - TextUtils.getOffsetAfter("", 0), (char) ((ViewConfiguration.getScrollDefaultDelay() >> 16) + 29234));
byte b14 = (byte) 0;
byte b15 = b14;
Object[] objArr15 = new Object[1];
f(b14, b15, (byte) (b15 | 8), objArr15);
i3 = 2;
obj7 = cls7.getMethod((String) objArr15[0], Object.class, Object.class);
xzZ.y.put(1071125919, obj7);
}
((Method) obj7).invoke(null, objArr14);
i10 = i3;
}
objArr[0] = new String(cArr);
}
/* JADX WARN: Code restructure failed: missing block: B:15:0x00ad, code lost:
if (r10.equals(((java.lang.String) r14[0]).intern()) != false) goto L19;
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x013b, code lost:
if (r10.equals(((java.lang.String) r14[0]).intern()) != false) goto L36;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private void a(java.lang.String r19, java.lang.String r20, com.kofax.kmc.kut.utilities.appstats.AppStatsDaoField[] r21) {
/*
Method dump skipped, instructions count: 481
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.kofax.kmc.kut.utilities.appstats.AppStatsMsSqlExportHandler.a(java.lang.String, java.lang.String, com.kofax.kmc.kut.utilities.appstats.AppStatsDaoField[]):void");
}
private void t(String str) {
int i = 2 % 2;
if (str == null || gjJ.b((CharSequence) str)) {
throw null;
}
int lastIndexOf = str.lastIndexOf(File.separator);
String substring = str.substring(0, lastIndexOf);
String substring2 = str.substring(lastIndexOf, str.length());
if (substring.equalsIgnoreCase(Environment.getExternalStorageDirectory().getPath())) {
try {
new File(substring, substring2).createNewFile();
int i2 = c + 65;
b = i2 % 128;
int i3 = i2 % 2;
return;
} catch (IOException unused) {
return;
}
}
File file = new File(substring);
if (!file.exists()) {
int i4 = c + 43;
b = i4 % 128;
int i5 = i4 % 2;
file.mkdir();
int i6 = c + 75;
b = i6 % 128;
int i7 = i6 % 2;
}
try {
new File(file, substring2).createNewFile();
} catch (IOException unused2) {
}
}
static void a() {
a = new char[]{36796, 2724, 34232, 183, 36834};
d = 3294818705267559121L;
}
static {
c = 1;
a();
int i = b + 41;
c = i % 128;
if (i % 2 == 0) {
throw null;
}
}
}