package com.ironsource.adqualitysdk.sdk.i; import android.media.AudioTrack; import android.os.Process; import android.os.SystemClock; import android.text.TextUtils; import android.util.Log; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.ViewConfiguration; import android.widget.ExpandableListView; import java.lang.ref.WeakReference; import org.json.JSONObject; /* loaded from: classes4.dex */ public final class jw { /* renamed from: ﮐ, reason: contains not printable characters */ private static int f2780 = 1; /* renamed from: ﱡ, reason: contains not printable characters */ private static int f2781 = 0; /* renamed from: ﻐ, reason: contains not printable characters */ private static char f2782 = 57759; /* renamed from: ﻛ, reason: contains not printable characters */ private static WeakReference f2783 = null; /* renamed from: k, reason: contains not printable characters */ private static char f2784 = 51767; /* renamed from: ヌ, reason: contains not printable characters */ private static char f2785 = 63850; /* renamed from: メ, reason: contains not printable characters */ private static char f2786 = 24287; /* renamed from: k, reason: contains not printable characters */ public static void m3317(ay ayVar) { f2783 = new WeakReference<>(ayVar); int i = f2780 + 47; f2781 = i % 128; int i2 = i % 2; } /* renamed from: ﻐ, reason: contains not printable characters */ public static Throwable m3310(Throwable th) { while (th.getCause() != null) { int i = f2780 + 45; f2781 = i % 128; int i2 = i % 2; th = th.getCause(); } int i3 = f2781 + 123; f2780 = i3 % 128; int i4 = i3 % 2; return th; } /* renamed from: ﻛ, reason: contains not printable characters */ public static void m3315(String str, String str2, Throwable th, boolean z) { int i = f2781 + 121; f2780 = i % 128; int i2 = i % 2; try { m3316(str, str2, th, z, false); } catch (Throwable unused) { } } /* renamed from: ﻛ, reason: contains not printable characters */ public static void m3316(String str, String str2, Throwable th, boolean z, boolean z2) { int i = f2780 + 45; f2781 = i % 128; try { if (i % 2 != 0) { m3320(str, str2, th, z, z2, false); } else { m3320(str, str2, th, z, z2, false); } int i2 = f2780 + 31; f2781 = i2 % 128; if (i2 % 2 != 0) { throw null; } } catch (Throwable unused) { } } /* renamed from: k, reason: contains not printable characters */ public static void m3320(String str, String str2, Throwable th, boolean z, boolean z2, boolean z3) { try { if (!z) { l.m3425(str, str2, th, z3); } else { int i = f2780 + 27; f2781 = i % 128; int i2 = i % 2; l.m3429(str, str2, z3); if (th != null) { l.m3425(str, m3312("妆缨屩眐᭣鸌ႈ뚐", 7 - Process.getGidForName("")).intern(), th, z3); int i3 = f2780 + 105; f2781 = i3 % 128; int i4 = i3 % 2; } } StringBuilder sb = new StringBuilder(); sb.append(m3312("\ue184䜪⁌괏\ue294䂣⁌괏볽濮", (AudioTrack.getMaxVolume() > 0.0f ? 1 : (AudioTrack.getMaxVolume() == 0.0f ? 0 : -1)) + 9).intern()); sb.append(str); m3319(str, str2, sb.toString(), th, null, false, z2, z3); } catch (Throwable unused) { } } /* renamed from: k, reason: contains not printable characters */ public static void m3318(String str, String str2, String str3, Throwable th, JSONObject jSONObject, boolean z) { int i = f2780 + 57; f2781 = i % 128; try { if (i % 2 != 0) { m3319(str, str2, str3, th, jSONObject, false, false, z); } else { m3319(str, str2, str3, th, jSONObject, true, false, z); } int i2 = f2781 + 115; f2780 = i2 % 128; if (i2 % 2 == 0) { int i3 = 64 / 0; } } catch (Throwable unused) { } } /* renamed from: ﻛ, reason: contains not printable characters */ public static void m3314(String str, String str2, String str3, Throwable th) { int i = f2780 + 5; f2781 = i % 128; int i2 = i % 2; try { m3311(str, str2, str3, th, false); int i3 = f2781 + 113; f2780 = i3 % 128; int i4 = i3 % 2; } catch (Throwable unused) { } } /* renamed from: ﻐ, reason: contains not printable characters */ private static void m3311(String str, String str2, String str3, Throwable th, boolean z) { int i = f2780 + 37; f2781 = i % 128; int i2 = i % 2; try { m3319(str, str2, str3, th, null, false, false, false); int i3 = f2781 + 85; f2780 = i3 % 128; if (i3 % 2 == 0) { throw null; } } catch (Throwable unused) { } } /* renamed from: k, reason: contains not printable characters */ private static void m3319(String str, String str2, String str3, Throwable th, JSONObject jSONObject, boolean z, boolean z2, boolean z3) { int i = f2781 + 109; f2780 = i % 128; try { if (i % 2 == 0) { throw null; } if (z) { StringBuilder sb = new StringBuilder(); sb.append(str3); sb.append(m3312("藓ࣨ", 1 - KeyEvent.keyCodeFromString("")).intern()); sb.append(str); str3 = sb.toString(); StringBuilder sb2 = new StringBuilder(); sb2.append(str2); sb2.append(m3312("俑ᦌ볦ൽ\uddebꛒ\uf381⸜", (ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)) + 7).intern()); sb2.append(str3); sb2.append(m3312("숛ꭋ", -TextUtils.indexOf((CharSequence) "", '0')).intern()); l.m3425(str, sb2.toString(), th, z3); } String str4 = str3; ay ayVar = f2783.get(); if (ayVar != null) { ayVar.m1300(str, str2, str4, Log.getStackTraceString(th), jSONObject, z2); int i2 = f2781 + 35; f2780 = i2 % 128; int i3 = i2 % 2; } } catch (Throwable unused) { } } /* renamed from: ﻛ, reason: contains not printable characters */ public static void m3313(String str, String str2, String str3, String str4) { int i = f2781 + 111; f2780 = i % 128; try { if (i % 2 == 0) { m3321(str, str2, str3, str4); int i2 = 29 / 0; } else { m3321(str, str2, str3, str4); } int i3 = f2781 + 39; f2780 = i3 % 128; int i4 = i3 % 2; } catch (Throwable unused) { } } /* renamed from: ヌ, reason: contains not printable characters */ private static void m3321(String str, String str2, String str3, String str4) { String str5 = ""; try { if (TextUtils.isEmpty(str3)) { return; } StringBuilder sb = new StringBuilder(); sb.append(str3); sb.append(m3312("藓ࣨ", 1 - (Process.myPid() >> 22)).intern()); sb.append(str); String obj = sb.toString(); StringBuilder sb2 = new StringBuilder(); sb2.append(m3312("첹낒㌧欷몠휣㳮簣\ue93a톛\uf381⸜", MotionEvent.axisFromString("") + 12).intern()); sb2.append(obj); sb2.append(m3312("娛闶䰝ⷕ鷐㛔檌⯟닟\udc64萵⋷썥\u3097", 14 - (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1))).intern()); l.m3429(str, sb2.toString(), false); StringBuilder sb3 = new StringBuilder(); sb3.append(str2); if (str4 != null) { StringBuilder sb4 = new StringBuilder(); sb4.append(m3312("랁⎩", (ViewConfiguration.getTouchSlop() >> 8) + 1).intern()); sb4.append(str4); str5 = sb4.toString(); int i = f2780 + 59; f2781 = i % 128; int i2 = i % 2; } sb3.append(str5); l.m3429(str, sb3.toString(), false); ay ayVar = f2783.get(); if (ayVar != null) { ayVar.m1302(str, str2, obj, str4); } int i3 = f2781 + 125; f2780 = i3 % 128; if (i3 % 2 == 0) { throw null; } } catch (Throwable unused) { } } /* renamed from: ﻛ, reason: contains not printable characters */ private static String m3312(String str, int i) { String str2; char[] cArr = str; if (str != null) { cArr = str.toCharArray(); } char[] cArr2 = cArr; synchronized (k.f2799) { try { char[] cArr3 = new char[cArr2.length]; k.f2798 = 0; char[] cArr4 = new char[2]; while (true) { int i2 = k.f2798; if (i2 < cArr2.length) { cArr4[0] = cArr2[i2]; cArr4[1] = cArr2[i2 + 1]; int i3 = 58224; for (int i4 = 0; i4 < 16; i4++) { char c = cArr4[1]; char c2 = cArr4[0]; char c3 = (char) (c - (((c2 + i3) ^ ((c2 << 4) + f2782)) ^ ((c2 >>> 5) + f2785))); cArr4[1] = c3; cArr4[0] = (char) (c2 - (((c3 >>> 5) + f2784) ^ ((c3 + i3) ^ ((c3 << 4) + f2786)))); i3 -= 40503; } int i5 = k.f2798; cArr3[i5] = cArr4[0]; cArr3[i5 + 1] = cArr4[1]; k.f2798 = i5 + 2; } else { str2 = new String(cArr3, 0, i); } } } catch (Throwable th) { throw th; } } return str2; } }