4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1
以下内容为反编译后的 x.java 源代码,内容仅作参考
package com.zx.a.I8b7;
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.text.TextUtils;
import android.util.Base64;
import com.framework.database.tables.CachesTable;
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.io.IOException;
import javax.crypto.SecretKey;
import org.json.JSONObject;
public class x {
public static SecretKey f2882a;
public static void a() throws Exception {
String str;
w0.a aVar = new w0.a();
byte[] bArr = new byte[16];
f2882a = i.b(bArr, j2.b(j2.h));
a0.a(aVar, Base64.encodeToString(bArr, 2));
w0.a a2 = aVar.a("https://zxid-m.mobileservice.cn/sdk/module/getCoreModule");
a2.b = com.tencent.connect.common.b.HTTP_POST;
m0 b = 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());
a2.d = y0.a(b, Base64.encodeToString(i.a(jSONObject.toString(), f2882a, "UDID_ENC_AUTHTAG"), 2));
a2.e = "request getCoreModule 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), f2882a, "UDID_ENC_AUTHTAG"));
if (!jSONObject3.getBoolean("enable")) {
p2 p2Var = l1.a.f2831a.f2830a;
if (p2Var.b == null) {
p2Var.b = p2Var.d();
}
try {
SQLiteDatabase sQLiteDatabase = p2Var.b;
StringBuilder sb = new StringBuilder();
sb.append("key in(");
sb.append("17,18");
sb.append(")");
sQLiteDatabase.delete("zx_table", sb.toString(), null);
j2.C = null;
q1.a("clearCoreModule success");
} catch (Exception e) {
StringBuilder a4 = b2.a("clearCoreModule error:");
a4.append(e.getMessage());
q1.b(a4.toString());
}
q1.a("coreModule enable is false");
return;
}
JSONObject jSONObject4 = jSONObject3.getJSONObject(am.e);
jSONObject4.getString("version");
String string = jSONObject4.getString("checksum");
byte[] decode = Base64.decode(jSONObject4.getString(RemoteMessageConst.DATA), 0);
if (TextUtils.equals(string, i.a(i.a("SHA256", decode)))) {
q1.a("verify checksum finished");
JSONObject jSONObject5 = new JSONObject();
jSONObject5.put("mainVersion", j2.b);
jSONObject5.put("coreVersion", j2.d);
jSONObject5.put("checksum", string);
l1.a.f2831a.f2830a.getClass();
String string2 = jSONObject5.getString("coreVersion");
try {
str = j2.C.getString("coreVersion");
} catch (Exception unused) {
str = "";
}
if (!TextUtils.isEmpty(string2) && !TextUtils.equals(string2, str)) {
p2 p2Var2 = l1.a.f2831a.f2830a;
if (p2Var2.b == null) {
p2Var2.b = p2Var2.d();
}
try {
String encodeToString = Base64.encodeToString(i.b("AES/CBC/PKCS5Padding", j2.s, j2.t, decode), 0);
ContentValues contentValues = new ContentValues();
contentValues.put(CachesTable.COLUMN_KEY, (Integer) 17);
contentValues.put("value", encodeToString);
q1.a("replace resultId = " + p2Var2.b.replace("zx_table", null, contentValues));
} catch (Exception e2) {
q1.b("ZXID updateDBValue valueID:17,value:" + decode + ",error:" + e2.toString());
}
l1.a.f2831a.f2830a.a(18, jSONObject5.toString(), true);
j2.C = jSONObject5;
}
q1.a("decrypt and checksum finished");
return;
}
throw new IOException("zx checksum1 exception");
}
throw new RuntimeException("response errCode: " + a3.a("Udid-Error-Code") + ", errMsg: " + a3.a("Udid-Error-Message"));
}
}