4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.zx.a.I8b7;
import android.text.TextUtils;
import android.util.Base64;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.umeng.analytics.pro.am;
import com.zx.a.I8b7.l1;
import com.zx.a.I8b7.w0;
import java.nio.charset.StandardCharsets;
import javax.crypto.SecretKey;
import javax.crypto.spec.IvParameterSpec;
import org.json.JSONArray;
import org.json.JSONObject;
public class g {
public static SecretKey f2806a;
public static byte[] b;
public static void a() throws Exception {
w0.a aVar = new w0.a();
byte[] bArr = new byte[16];
b = bArr;
f2806a = i.b(bArr, j2.b(j2.h));
a0.a(aVar, Base64.encodeToString(b, 2));
w0.a a2 = aVar.a("https://zxid-m.mobileservice.cn/sdk/config/init");
a2.b = com.tencent.connect.common.b.HTTP_POST;
m0 b2 = m0.b("application/json; charset=utf-8");
JSONObject jSONObject = new JSONObject();
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("lid", j2.b(j2.h));
jSONObject2.put(am.al, j2.i);
jSONObject.put("ctx", jSONObject2);
jSONObject.put("sdkInfo", a0.d());
jSONObject.put("deviceInfo", a0.b());
a2.d = y0.a(b2, Base64.encodeToString(i.a(jSONObject.toString(), f2806a, "UDID_ENC_AUTHTAG"), 2));
a2.e = "request config api";
n1 n1Var = a0.f2794a;
w0 w0Var = new w0(aVar);
n1Var.getClass();
z0 a3 = new s0(n1Var, w0Var).a();
if (a3.b == 200) {
JSONObject jSONObject3 = new JSONObject(i.a(Base64.decode(new JSONObject(a3.e.c()).getString(RemoteMessageConst.DATA), 2), f2806a, "UDID_ENC_AUTHTAG"));
String string = jSONObject3.getString("configVersion");
l1 l1Var = l1.a.f2831a;
l1Var.f2830a.getClass();
if (!TextUtils.equals(string, j2.l)) {
j2.l = string;
l1Var.f2830a.a(4, string, false);
}
JSONObject jSONObject4 = jSONObject3.getJSONObject("fieldConfig");
p2 p2Var = l1Var.f2830a;
String jSONObject5 = jSONObject4.toString();
p2Var.getClass();
if (!TextUtils.equals(jSONObject5, j2.u)) {
j2.u = jSONObject5;
l1Var.f2830a.a(11, jSONObject5, true);
}
JSONObject jSONObject6 = jSONObject3.getJSONObject("reportConfig");
p2 p2Var2 = l1Var.f2830a;
String jSONObject7 = jSONObject6.toString();
p2Var2.getClass();
if (!TextUtils.equals(jSONObject7, j2.v)) {
j2.v = jSONObject7;
l1Var.f2830a.a(12, jSONObject7, true);
}
JSONObject jSONObject8 = jSONObject3.getJSONObject("cryptoConfig");
p2 p2Var3 = l1Var.f2830a;
String jSONObject9 = jSONObject8.toString();
p2Var3.getClass();
if (!TextUtils.equals(jSONObject9, j2.w)) {
j2.w = jSONObject9;
l1Var.f2830a.a(15, jSONObject9, true);
}
JSONObject optJSONObject = jSONObject3.optJSONObject("appConfig");
if (optJSONObject != null) {
q1.a("处理 appConfig ");
try {
JSONArray jSONArray = optJSONObject.getJSONArray("list");
if (jSONArray != null && jSONArray.length() > 0) {
int length = jSONArray.length();
int i = optJSONObject.getInt("type");
if (i == 1) {
for (int i2 = 0; i2 < length; i2++) {
jSONArray.put(i2, i.a(Base64.decode(jSONArray.getString(i2), 2), f2806a, "UDID_ENC_AUTHTAG"));
}
} else if (i == 3) {
SecretKey a4 = i.a(b, j2.b(j2.h));
for (int i3 = 0; i3 < length; i3++) {
jSONArray.put(i3, new String(i.a("AES/CBC/PKCS7Padding", a4, new IvParameterSpec("UDID_ENC_AUTHTAG".getBytes(StandardCharsets.UTF_8)), Base64.decode(jSONArray.getString(i3), 2)), StandardCharsets.UTF_8));
}
}
l1 l1Var2 = l1.a.f2831a;
p2 p2Var4 = l1Var2.f2830a;
String jSONObject10 = optJSONObject.toString();
p2Var4.getClass();
if (!TextUtils.equals(jSONObject10, j2.x)) {
j2.x = jSONObject10;
l1Var2.f2830a.a(21, jSONObject10, true);
}
} else {
q1.b("appConfig list is empty");
}
} catch (Exception e) {
q1.a(e);
}
}
JSONObject optJSONObject2 = jSONObject3.optJSONObject("commonConfig");
if (optJSONObject2 != null) {
l1 l1Var3 = l1.a.f2831a;
p2 p2Var5 = l1Var3.f2830a;
String jSONObject11 = optJSONObject2.toString();
p2Var5.getClass();
if (!TextUtils.equals(jSONObject11, j2.y)) {
j2.y = jSONObject11;
l1Var3.f2830a.a(22, jSONObject11, true);
}
}
JSONObject optJSONObject3 = jSONObject3.optJSONObject("invokeConfig");
if (optJSONObject3 != null) {
l1 l1Var4 = l1.a.f2831a;
p2 p2Var6 = l1Var4.f2830a;
String jSONObject12 = optJSONObject3.toString();
synchronized (p2Var6) {
if (!TextUtils.equals(jSONObject12, j2.z)) {
j2.z = jSONObject12;
j2.c();
l1Var4.f2830a.a(19, j2.z, true);
}
}
}
if (j2.m) {
return;
}
l1 l1Var5 = l1.a.f2831a;
l1Var5.f2830a.getClass();
if (true != j2.m) {
j2.m = true;
l1Var5.f2830a.a(6, j2.m + "", false);
return;
}
return;
}
throw new RuntimeException("response errCode: " + a3.a("Udid-Error-Code") + ", errMsg: " + a3.a("Udid-Error-Message"));
}
}