what-the-bank/sources/com/google/android/gms/measurement/internal/zzfn.java

60 lines
2.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.measurement.internal;
import android.content.Context;
import android.content.res.Resources;
import android.util.Base64;
import com.google.android.gms.common.R;
import java.nio.charset.StandardCharsets;
/* loaded from: classes.dex */
public final class zzfn {
private static int a = 1;
private static int c = 0;
private static byte d = 6;
public static String zza(Context context) {
try {
return context.getResources().getResourcePackageName(R.string.common_google_play_services_unknown_issue);
} catch (Resources.NotFoundException unused) {
return context.getPackageName();
}
}
public static final String zzb(String str, Resources resources, String str2) {
String string;
int i = 2 % 2;
int i2 = a + 55;
c = i2 % 128;
if (i2 % 2 == 0) {
int identifier = resources.getIdentifier(str, "string", str2);
if (identifier != 0) {
try {
string = resources.getString(identifier);
if (string.startsWith(",*,)")) {
Object[] objArr = new Object[1];
b(string.substring(4), objArr);
string = ((String) objArr[0]).intern();
int i3 = c + 123;
a = i3 % 128;
int i4 = i3 % 2;
}
} catch (Resources.NotFoundException unused) {
return null;
}
}
return string;
}
resources.getIdentifier(str, "string", str2);
throw null;
}
private static void b(String str, Object[] objArr) {
byte[] decode = Base64.decode(str, 0);
byte[] bArr = new byte[decode.length];
for (int i = 0; i < decode.length; i++) {
bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ d);
}
objArr[0] = new String(bArr, StandardCharsets.UTF_8);
}
}