what-the-bank/sources/com/scb/phone/service/SCBFcmMessagingService.java

389 lines
19 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.scb.phone.service;
import android.content.Context;
import android.graphics.Color;
import android.graphics.PointF;
import android.graphics.drawable.Drawable;
import android.os.Process;
import android.os.SystemClock;
import android.text.AndroidCharacter;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewConfiguration;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.lang.reflect.Method;
import o.AbstractServiceC9677doR;
import o.C14957gcv;
import o.C4593bdB;
import o.C6583cXR;
import o.InterfaceC13391fZD;
import o.aOH;
import o.guQ;
import o.xzZ;
/* loaded from: classes4.dex */
public final class SCBFcmMessagingService extends AbstractServiceC9677doR {
private static final byte[] $$j = {115, -56, 28, 10};
private static final int $$k = 57;
private static int $10 = 0;
private static int $11 = 1;
private static int a = 1;
private static long b;
private static int c;
@InterfaceC13391fZD
public aOH deviceUpdatePresenter;
/* JADX WARN: Removed duplicated region for block: B:10:0x0027 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001f */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0027 -> B:4:0x002c). 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(int r7, short r8, short r9, java.lang.Object[] r10) {
/*
int r8 = r8 * 2
int r8 = 1 - r8
int r9 = r9 * 2
int r9 = 3 - r9
byte[] r0 = com.scb.phone.service.SCBFcmMessagingService.$$j
int r7 = r7 + 77
byte[] r1 = new byte[r8]
r2 = 0
if (r0 != 0) goto L15
r7 = r8
r3 = r9
r5 = r2
goto L2c
L15:
r3 = r2
L16:
byte r4 = (byte) r7
int r9 = r9 + 1
int r5 = r3 + 1
r1[r3] = r4
if (r5 != r8) goto L27
java.lang.String r7 = new java.lang.String
r7.<init>(r1, r2)
r10[r2] = r7
return
L27:
r3 = r0[r9]
r6 = r3
r3 = r9
r9 = r6
L2c:
int r7 = r7 + r9
r9 = r3
r3 = r5
goto L16
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.service.SCBFcmMessagingService.p(int, short, short, java.lang.Object[]):void");
}
/* loaded from: classes4.dex */
public static final class Sts {
private Sts() {
}
public /* synthetic */ Sts(byte b) {
this();
}
}
@Override // com.google.firebase.messaging.FirebaseMessagingService
public final void onNewToken(String str) {
int i = 2 % 2;
int i2 = c + 107;
a = i2 % 128;
int i3 = i2 % 2;
C14957gcv.e(str, "");
super.onNewToken(str);
guQ.a("SCBFcmMessagingService onNewToken : %s", str);
aOH aoh = this.deviceUpdatePresenter;
if (aoh != null) {
int i4 = c + 115;
a = i4 % 128;
int i5 = i4 % 2;
} else {
C14957gcv.a("");
aoh = null;
}
Context applicationContext = getApplicationContext();
aoh.e = null;
C6583cXR.e(applicationContext, str);
}
/* JADX WARN: Code restructure failed: missing block: B:39:0x0184, code lost:
if (r15 != null) goto L56;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x018f, code lost:
if (o.C14957gcv.b((java.lang.Object) r6, (java.lang.Object) "ISO20022") == false) goto L62;
*/
/* JADX WARN: Code restructure failed: missing block: B:42:?, code lost:
return;
*/
/* JADX WARN: Code restructure failed: missing block: B:44:0x0189, code lost:
r6 = r15.e;
*/
/* JADX WARN: Code restructure failed: missing block: B:45:0x0187, code lost:
if (r15 != null) goto L56;
*/
/* JADX WARN: Removed duplicated region for block: B:13:0x0056 */
/* JADX WARN: Removed duplicated region for block: B:20:0x0074 */
/* JADX WARN: Removed duplicated region for block: B:23:0x009a */
/* JADX WARN: Removed duplicated region for block: B:26:0x013e */
/* JADX WARN: Removed duplicated region for block: B:33:0x0168 */
/* JADX WARN: Removed duplicated region for block: B:36:0x0176 */
/* JADX WARN: Removed duplicated region for block: B:48:0x016b */
/* JADX WARN: Removed duplicated region for block: B:52:0x0165 */
/* JADX WARN: Removed duplicated region for block: B:53:0x00b0 */
/* JADX WARN: Removed duplicated region for block: B:54:0x008a */
@Override // com.google.firebase.messaging.FirebaseMessagingService
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void onMessageReceived(com.google.firebase.messaging.RemoteMessage r15) {
/*
Method dump skipped, instructions count: 423
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.scb.phone.service.SCBFcmMessagingService.onMessageReceived(com.google.firebase.messaging.RemoteMessage):void");
}
private static void o(char[] cArr, int i, Object[] objArr) {
int i2 = 2 % 2;
C4593bdB c4593bdB = new C4593bdB();
c4593bdB.a = i;
int length = cArr.length;
long[] jArr = new long[length];
c4593bdB.e = 0;
while (c4593bdB.e < cArr.length) {
int i3 = $11 + 33;
$10 = i3 % 128;
if (i3 % 2 != 0) {
int i4 = c4593bdB.e;
try {
Object[] objArr2 = {Integer.valueOf(cArr[c4593bdB.e]), c4593bdB, c4593bdB};
Object obj = xzZ.y.get(-1229953068);
if (obj == null) {
Class cls = (Class) xzZ.c(TextUtils.getOffsetAfter("", 0) + 402, TextUtils.lastIndexOf("", '0') + 6, (char) (View.resolveSizeAndState(0, 0, 0) + 21608));
byte b2 = (byte) 0;
byte b3 = b2;
Object[] objArr3 = new Object[1];
p(b2, b3, b3, objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Object.class, Object.class);
xzZ.y.put(-1229953068, obj);
}
jArr[i4] = ((Long) ((Method) obj).invoke(null, objArr2)).longValue() * (b % (-6958928035870403642L));
Object[] objArr4 = {c4593bdB, c4593bdB};
Object obj2 = xzZ.y.get(-1143917229);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c((ViewConfiguration.getDoubleTapTimeout() >> 16) + 238, 5 - (TypedValue.complexToFraction(0, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFraction(0, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), (char) TextUtils.getOffsetBefore("", 0));
byte b4 = (byte) ($$k & 7);
byte b5 = (byte) (b4 - 1);
Object[] objArr5 = new Object[1];
p(b4, b5, b5, objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Object.class, Object.class);
xzZ.y.put(-1143917229, obj2);
}
((Method) obj2).invoke(null, objArr4);
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
} else {
int i5 = c4593bdB.e;
Object[] objArr6 = {Integer.valueOf(cArr[c4593bdB.e]), c4593bdB, c4593bdB};
Object obj3 = xzZ.y.get(-1229953068);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c((Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1)) + 401, (KeyEvent.getMaxKeyCode() >> 16) + 5, (char) (TextUtils.lastIndexOf("", '0', 0) + 21609));
byte b6 = (byte) 0;
byte b7 = b6;
Object[] objArr7 = new Object[1];
p(b6, b7, b7, objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Integer.TYPE, Object.class, Object.class);
xzZ.y.put(-1229953068, obj3);
}
jArr[i5] = ((Long) ((Method) obj3).invoke(null, objArr6)).longValue() ^ (b ^ (-6958928035870403642L));
Object[] objArr8 = {c4593bdB, c4593bdB};
Object obj4 = xzZ.y.get(-1143917229);
if (obj4 == null) {
Class cls4 = (Class) xzZ.c(TextUtils.getCapsMode("", 0, 0) + 238, (ViewConfiguration.getKeyRepeatTimeout() >> 16) + 5, (char) ((Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1)) - 1));
byte b8 = (byte) ($$k & 7);
byte b9 = (byte) (b8 - 1);
Object[] objArr9 = new Object[1];
p(b8, b9, b9, objArr9);
obj4 = cls4.getMethod((String) objArr9[0], Object.class, Object.class);
xzZ.y.put(-1143917229, obj4);
}
((Method) obj4).invoke(null, objArr8);
}
}
char[] cArr2 = new char[length];
c4593bdB.e = 0;
int i6 = $11 + 113;
$10 = i6 % 128;
int i7 = i6 % 2;
while (c4593bdB.e < cArr.length) {
int i8 = $10 + 121;
$11 = i8 % 128;
if (i8 % 2 == 0) {
cArr2[c4593bdB.e] = (char) jArr[c4593bdB.e];
Object[] objArr10 = {c4593bdB, c4593bdB};
Object obj5 = xzZ.y.get(-1143917229);
if (obj5 == null) {
Class cls5 = (Class) xzZ.c(238 - TextUtils.indexOf("", "", 0, 0), 5 - View.MeasureSpec.getMode(0), (char) (Process.myTid() >> 22));
byte b10 = (byte) ($$k & 7);
byte b11 = (byte) (b10 - 1);
Object[] objArr11 = new Object[1];
p(b10, b11, b11, objArr11);
obj5 = cls5.getMethod((String) objArr11[0], Object.class, Object.class);
xzZ.y.put(-1143917229, obj5);
}
((Method) obj5).invoke(null, objArr10);
int i9 = 99 / 0;
} else {
cArr2[c4593bdB.e] = (char) jArr[c4593bdB.e];
Object[] objArr12 = {c4593bdB, c4593bdB};
Object obj6 = xzZ.y.get(-1143917229);
if (obj6 == null) {
Class cls6 = (Class) xzZ.c(KeyEvent.keyCodeFromString("") + 238, Drawable.resolveOpacity(0, 0) + 5, (char) View.combineMeasuredStates(0, 0));
byte b12 = (byte) ($$k & 7);
byte b13 = (byte) (b12 - 1);
Object[] objArr13 = new Object[1];
p(b12, b13, b13, objArr13);
obj6 = cls6.getMethod((String) objArr13[0], Object.class, Object.class);
xzZ.y.put(-1143917229, obj6);
}
((Method) obj6).invoke(null, objArr12);
}
}
objArr[0] = new String(cArr2);
}
@Override // o.AbstractServiceC9677doR, com.google.firebase.messaging.FirebaseMessagingService, com.google.firebase.messaging.zzf, android.app.Service, android.content.ContextWrapper
public final void attachBaseContext(Context context) {
Context context2;
int i = 2 % 2;
super.attachBaseContext(context);
Object[] objArr = new Object[1];
o(new char[]{65238, 23306, 46453, 4028, 27028, 50113, 7201, 30300, 53312, 10927, 33959, 57078, 15137, 38255, 61278, 18831, 41972, 64967}, AndroidCharacter.getMirror('0') + 42403, objArr);
Class<?> cls = Class.forName((String) objArr[0]);
Object[] objArr2 = new Object[1];
o(new char[]{65242, 27039, 53312, 15149, 41879}, Gravity.getAbsoluteGravity(0, 0) + 38737, objArr2);
Object obj = null;
int intValue = ((Integer) cls.getDeclaredMethod((String) objArr2[0], new Class[0]).invoke(null, new Object[0])).intValue() % 100000;
if (intValue >= 99000) {
int i2 = a + 109;
c = i2 % 128;
int i3 = i2 % 2;
if (intValue <= 99999) {
return;
}
}
if (context != null) {
int i4 = a + 87;
c = i4 % 128;
if (i4 % 2 != 0) {
context.getApplicationContext();
obj.hashCode();
throw null;
}
context2 = context.getApplicationContext();
} else {
context2 = context;
}
if (context2 != null) {
int i5 = a + 77;
c = i5 % 128;
int i6 = i5 % 2;
try {
Object obj2 = xzZ.y.get(125943855);
if (obj2 == null) {
obj2 = ((Class) xzZ.c(KeyEvent.normalizeMetaState(0) + 492, (ViewConfiguration.getTapTimeout() >> 16) + 5, (char) KeyEvent.normalizeMetaState(0))).getMethod("a", null);
xzZ.y.put(125943855, obj2);
}
Object invoke = ((Method) obj2).invoke(null, null);
Object[] objArr3 = new Object[1];
o(new char[]{65158, 57341, 48249, 39586, 31600, 22949, 13887, 5309, 62781, 54251, 45159, 36489, 28504, 19852, 10834, 2268, 59653, 51145, 42063, 33480, 25408, 16834, 7784, 64693, 56681, 48052, 39014, 30381, 22392, 13735, 4725, 61605, 53542, 44959, 35861, 27281, 19269, 10691, 1627, 58590, 50445, 41862, 32780, 24957, 16296, 7286, 64164, 56176}, View.getDefaultSize(0, 0) + 8573, objArr3);
String str = (String) objArr3[0];
Object[] objArr4 = new Object[1];
o(new char[]{65234, 21382, 42023, 63787, 19405, 40010, 61809, 17355, 37962, 59753, 15291, 35856, 57697, 13238, 33802, 55643, 11185, 31744, 53584, 9132, 29864, 51534, 7156, 27894, 49484, 5018, 25833, 47381, 2961, 23785, 45373, 898, 21728, 43315, 64388, 19599, 41262, 62064, 17543, 39280, 60025, 15518, 37192, 57968, 13510, 35089, 55915, 11496, 33091, 53868, 9447, 30985, 51720, 7328, 28928, 49664, 5287, 27055, 47688, 3246, 25077, 45586, 1228, 22975}, 44371 - View.getDefaultSize(0, 0), objArr4);
String str2 = (String) objArr4[0];
Object[] objArr5 = new Object[1];
o(new char[]{65238, 25132, 51137, 11117, 35930, 61867, 21760, 46759, 7069, 32565, 57562, 17875, 43377, 2756, 28269, 54018, 13542, 38918, 64935, 24222, 49722, 10200, 34946, 60448, 20892, 46436, 5727, 31715, 57179, 16630, 42388, 2414, 27363, 53206, 13168, 38091, 63598, 23818, 48820, 8787, 34810, 59548, 19516, 45541, 4821, 30323, 56267, 16191, 41029, 1505, 26963, 51958, 12189, 37681, 62693, 22996, 48431, 7837, 33343, 59207, 18614, 44120, 4526, 29341}, 40099 - Color.red(0), objArr5);
String str3 = (String) objArr5[0];
Object[] objArr6 = new Object[1];
o(new char[]{65247, 43846, 21961, 65096, 43216, 21780, 65414, 43067, 21228, 65395, 43492, 21101, 64744, 43289, 21404, 64529, 42626, 21264, 64910, 42497, 20658, 64818, 42939, 20517, 64161, 42785, 20763, 64452, 42067, 20180, 64324, 42445, 20067, 63729, 42364, 20459, 63607, 41632, 20334, 63873, 41502, 19592, 63745, 41875, 19482, 63139, 41776, 19886, 63010, 41196, 19758, 63399, 41438, 18961, 62680, 41300, 19398, 62469, 40700, 19326, 62972, 40547, 18674, 62840, 40920, 18436, 62159, 40791, 18822, 61976, 40076, 18746, 62379, 39977}, (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)) + 21893, objArr6);
String str4 = (String) objArr6[0];
Object[] objArr7 = new Object[1];
o(new char[]{65166, 65094, 65329, 64516, 65019}, (Process.getElapsedCpuTime() > 0L ? 1 : (Process.getElapsedCpuTime() == 0L ? 0 : -1)) + 222, objArr7);
String str5 = (String) objArr7[0];
Object[] objArr8 = new Object[1];
o(new char[]{65234, 8995, 17775, 26460, 35079, 43847, 52541, 61236, 4402, 13084, 21781, 30549, 39337, 48107, 56805, 65502, 8662, 17347, 26016, 34809, 43505, 52171, 60890, 3993, 12413, 21049, 29799, 38401, 47180, 55827, 64610, 7721, 16419, 25111, 33804, 42669}, View.MeasureSpec.getMode(0) + 56821, objArr8);
Object[] objArr9 = {context2, str, str2, str3, str4, true, str5, (String) objArr8[0]};
Object obj3 = xzZ.y.get(1656189573);
if (obj3 == null) {
obj3 = ((Class) xzZ.c((SystemClock.uptimeMillis() > 0L ? 1 : (SystemClock.uptimeMillis() == 0L ? 0 : -1)) + 486, (ViewConfiguration.getWindowTouchSlop() >> 8) + 5, (char) View.resolveSize(0, 0))).getMethod("e", Context.class, String.class, String.class, String.class, String.class, Boolean.TYPE, String.class, String.class);
xzZ.y.put(1656189573, obj3);
}
((Method) obj3).invoke(invoke, objArr9);
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
}
static void b() {
b = -3771560721853584015L;
}
@Override // o.AbstractServiceC9677doR, com.google.firebase.messaging.FirebaseMessagingService, com.google.firebase.messaging.zzf, android.app.Service
public final void onCreate() {
int i = 2 % 2;
int i2 = a + 97;
c = i2 % 128;
int i3 = i2 % 2;
Object obj = null;
super.onCreate();
if (i3 != 0) {
obj.hashCode();
throw null;
}
int i4 = a + 85;
c = i4 % 128;
if (i4 % 2 == 0) {
return;
}
obj.hashCode();
throw null;
}
static {
c = 0;
b();
new Sts((byte) 0);
int i = a + 27;
c = i % 128;
int i2 = i % 2;
}
}