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

224 lines
8.0 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.util.Base64;
import java.security.SecureRandom;
import java.util.Arrays;
import java.util.List;
import o.C15022geq;
import o.guH;
import scb.yek.DeviceTag;
import scb.yek.GetKey;
/* renamed from: o.HsW, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0488HsW implements YWN {
@InterfaceC13391fZD
public C0488HsW() {
}
@Override // o.YWN
public final C15571guL d(String str) {
String obj;
String obj2;
String str2 = "";
C14957gcv.e(str, "");
DeviceTag deviceTag = new DeviceTag();
C14957gcv.e(str, "");
C14957gcv.e("com.scb.phone.data", "");
guH guh = deviceTag.c;
C15573guO c15573guO = C15573guO.d;
byte[] bArr = new byte[8];
new SecureRandom().nextBytes(bArr);
String str3 = (String) C15573guO.c(new Object[]{bArr}, -738091658, 738091658, (int) System.currentTimeMillis());
String str4 = str3;
C14957gcv.e(str4, "");
C14957gcv.e(str4, "");
C15568guF c15568guF = new C15568guF(str3, C14881gav.b(gdZ.e(str4, 2, 2, C15022geq.RVV.e), "", null, null, 0, null, guH.IeS.b, 30));
C15572guN c15572guN = deviceTag.e;
String str5 = c15568guF.d;
C15573guO c15573guO2 = C15573guO.d;
int e = C15573guO.e(1, 5);
C14957gcv.e(str, "");
C14957gcv.e(str5, "");
C15573guO c15573guO3 = C15573guO.d;
String a = C15573guO.a(e);
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(str5);
String obj3 = sb.toString();
C15573guO c15573guO4 = C15573guO.d;
String c = C15573guO.c(obj3, a);
if (c == null) {
c = "";
}
if (e > 0 && e < 6) {
C15573guO c15573guO5 = C15573guO.d;
String e2 = C15573guO.e(e);
StringBuilder sb2 = new StringBuilder();
sb2.append(c);
sb2.append(e2);
obj = sb2.toString();
} else {
StringBuilder sb3 = new StringBuilder();
sb3.append(c);
sb3.append(e);
obj = sb3.toString();
}
C15573guO c15573guO6 = C15573guO.d;
int e3 = C15573guO.e(1, 8);
C15573guO c15573guO7 = C15573guO.d;
int e4 = C15573guO.e(5, 20);
C15573guO c15573guO8 = C15573guO.d;
int e5 = C15573guO.e(0, 1);
guP gup = deviceTag.b;
byte[] decode = Base64.decode(deviceTag.deviceKeyFromJNI("com.scb.phone.data"), 0);
C14957gcv.c(decode, "");
C14957gcv.e(str, "");
C14957gcv.e(c15568guF, "");
C14957gcv.e(decode, "");
String str6 = c15568guF.d;
C14957gcv.e(str, "");
C14957gcv.e(str6, "");
C14957gcv.e(decode, "");
C15573guO c15573guO9 = C15573guO.d;
String d = C15573guO.d(str, str6, decode);
C14957gcv.e(d, "");
int length = d.length();
if (e5 == 0) {
int i = length - e4;
String substring = d.substring(0, i);
C14957gcv.c((Object) substring, "");
String substring2 = d.substring(i, length);
C14957gcv.c((Object) substring2, "");
StringBuilder sb4 = new StringBuilder();
sb4.append(substring2);
sb4.append(substring);
obj2 = sb4.toString();
} else {
String substring3 = d.substring(0, e4);
C14957gcv.c((Object) substring3, "");
String substring4 = d.substring(e4, length);
C14957gcv.c((Object) substring4, "");
StringBuilder sb5 = new StringBuilder();
sb5.append(substring4);
sb5.append(substring3);
obj2 = sb5.toString();
}
String str7 = c15568guF.e;
C15573guO c15573guO10 = C15573guO.d;
String[] strArr = {str7, C15573guO.e(e4), String.valueOf(e5), obj2};
C14957gcv.e(strArr, "");
C14957gcv.e(strArr, "");
List asList = Arrays.asList(strArr);
C14957gcv.c(asList, "");
switch (e3) {
case 1:
Object obj4 = asList.get(0);
Object obj5 = asList.get(3);
Object obj6 = asList.get(1);
Object obj7 = asList.get(2);
StringBuilder sb6 = new StringBuilder();
sb6.append(obj4);
sb6.append(obj5);
sb6.append(obj6);
sb6.append(obj7);
str2 = sb6.toString();
break;
case 2:
Object obj8 = asList.get(3);
Object obj9 = asList.get(0);
Object obj10 = asList.get(1);
Object obj11 = asList.get(2);
StringBuilder sb7 = new StringBuilder();
sb7.append(obj8);
sb7.append(obj9);
sb7.append(obj10);
sb7.append(obj11);
str2 = sb7.toString();
break;
case 3:
Object obj12 = asList.get(0);
Object obj13 = asList.get(3);
Object obj14 = asList.get(2);
Object obj15 = asList.get(1);
StringBuilder sb8 = new StringBuilder();
sb8.append(obj12);
sb8.append(obj13);
sb8.append(obj14);
sb8.append(obj15);
str2 = sb8.toString();
break;
case 4:
Object obj16 = asList.get(3);
Object obj17 = asList.get(0);
Object obj18 = asList.get(2);
Object obj19 = asList.get(1);
StringBuilder sb9 = new StringBuilder();
sb9.append(obj16);
sb9.append(obj17);
sb9.append(obj18);
sb9.append(obj19);
str2 = sb9.toString();
break;
case 5:
Object obj20 = asList.get(1);
Object obj21 = asList.get(2);
Object obj22 = asList.get(0);
Object obj23 = asList.get(3);
StringBuilder sb10 = new StringBuilder();
sb10.append(obj20);
sb10.append(obj21);
sb10.append(obj22);
sb10.append(obj23);
str2 = sb10.toString();
break;
case 6:
Object obj24 = asList.get(1);
Object obj25 = asList.get(2);
Object obj26 = asList.get(3);
Object obj27 = asList.get(0);
StringBuilder sb11 = new StringBuilder();
sb11.append(obj24);
sb11.append(obj25);
sb11.append(obj26);
sb11.append(obj27);
str2 = sb11.toString();
break;
case 7:
Object obj28 = asList.get(2);
Object obj29 = asList.get(1);
Object obj30 = asList.get(0);
Object obj31 = asList.get(3);
StringBuilder sb12 = new StringBuilder();
sb12.append(obj28);
sb12.append(obj29);
sb12.append(obj30);
sb12.append(obj31);
str2 = sb12.toString();
break;
case 8:
Object obj32 = asList.get(2);
Object obj33 = asList.get(1);
Object obj34 = asList.get(3);
Object obj35 = asList.get(0);
StringBuilder sb13 = new StringBuilder();
sb13.append(obj32);
sb13.append(obj33);
sb13.append(obj34);
sb13.append(obj35);
str2 = sb13.toString();
break;
}
StringBuilder sb14 = new StringBuilder();
sb14.append(str2);
sb14.append(e3);
return new C15571guL(sb14.toString(), obj);
}
@Override // o.YWN
public final String b(String str) {
C14957gcv.e(str, "");
return new GetKey().a(str, "com.scb.phone.data");
}
}