鳯华 v4.0.0版本的 MD5 值为:e66eea5d0a772ef117f7e252dfbb1dfc
以下内容为反编译后的 d3.java 源代码,内容仅作参考
package h5;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import com.tencent.open.SocialConstants;
import h5.i3;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.Map;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import org.json.JSONException;
import org.json.JSONObject;
public final class d3 {
public static int f14611a = -1;
public static String f14612b = "";
public static class a {
@Deprecated
public c A;
public c B;
public b C;
public b D;
public b E;
public b F;
public e G;
public String f14613a;
public int f14614b = -1;
@Deprecated
public JSONObject f14615c;
@Deprecated
public JSONObject f14616d;
@Deprecated
public JSONObject f14617e;
@Deprecated
public JSONObject f14618f;
@Deprecated
public JSONObject f14619g;
@Deprecated
public JSONObject f14620h;
@Deprecated
public JSONObject f14621i;
@Deprecated
public JSONObject f14622j;
@Deprecated
public JSONObject f14623k;
@Deprecated
public JSONObject f14624l;
@Deprecated
public JSONObject f14625m;
@Deprecated
public JSONObject f14626n;
@Deprecated
public JSONObject f14627o;
@Deprecated
public JSONObject f14628p;
@Deprecated
public JSONObject f14629q;
@Deprecated
public JSONObject f14630r;
@Deprecated
public JSONObject f14631s;
@Deprecated
public JSONObject f14632t;
@Deprecated
public JSONObject f14633u;
@Deprecated
public JSONObject f14634v;
public JSONObject f14635w;
public C0170a f14636x;
public d f14637y;
public f f14638z;
public static class C0170a {
public boolean f14639a;
public boolean f14640b;
public JSONObject f14641c;
}
public static class b {
public boolean f14642a;
public String f14643b;
public String f14644c;
public String f14645d;
public boolean f14646e;
}
public static class c {
public String f14647a;
public String f14648b;
}
public static class d {
public String f14649a;
public String f14650b;
public String f14651c;
}
public static class e {
public boolean f14652a;
public boolean f14653b;
public boolean f14654c;
public String f14655d;
public String f14656e;
public String f14657f;
}
public static class f {
public boolean f14658a;
}
}
static class b extends o0 {
private String f14659f;
private Map<String, String> f14660g;
private boolean f14661h;
b(Context context, m3 m3Var, String str) {
super(context, m3Var);
this.f14659f = str;
this.f14660g = null;
this.f14661h = Build.VERSION.SDK_INT != 19;
}
@Override
public final Map<String, String> c() {
return null;
}
@Override
public final String f() {
return this.f14661h ? "https://restapi.amap.com/v3/iasdkauth" : "http://restapi.amap.com/v3/iasdkauth";
}
@Override
public final byte[] k() {
return null;
}
@Override
public final byte[] l() {
String G = g3.G(this.f15033d);
if (TextUtils.isEmpty(G)) {
G = g3.t(this.f15033d);
}
if (!TextUtils.isEmpty(G)) {
G = j3.d(new StringBuilder(G).reverse().toString());
}
HashMap hashMap = new HashMap();
hashMap.put("authkey", this.f14659f);
hashMap.put("plattype", "android");
hashMap.put("product", this.f15034e.a());
hashMap.put("version", this.f15034e.e());
hashMap.put("output", "json");
StringBuilder sb = new StringBuilder();
sb.append(Build.VERSION.SDK_INT);
hashMap.put("androidversion", sb.toString());
hashMap.put("deviceId", G);
hashMap.put("manufacture", Build.MANUFACTURER);
Map<String, String> map = this.f14660g;
if (map != null && !map.isEmpty()) {
hashMap.putAll(this.f14660g);
}
hashMap.put("abitype", n3.a());
hashMap.put("ext", this.f15034e.h());
return n3.n(n3.e(hashMap));
}
@Override
protected final String m() {
return "3.0";
}
public final boolean u() {
return this.f14661h;
}
}
public static a a(Context context, m3 m3Var, String str, boolean z9) {
String str2;
String str3;
String str4;
String str5;
byte[] bArr;
s0 s0Var;
b bVar;
byte[] bArr2;
byte[] bArr3;
String str6 = "off";
a aVar = new a();
aVar.f14635w = new JSONObject();
i3.a.f14807a.c(context);
String str7 = null;
try {
try {
new n0();
try {
try {
String str8 = str + ";14N;15K";
try {
bVar = new b(context, m3Var, str8);
str = str8;
} catch (b3 e9) {
e = e9;
str = str8;
throw e;
} catch (Throwable unused) {
str = str8;
}
try {
s0 b10 = n0.b(bVar, bVar.u());
if (b10 != null) {
try {
s0Var = b10;
bArr = b10.f15141a;
} catch (b3 e10) {
e = e10;
str2 = "off";
s0Var = b10;
str3 = "001";
str4 = "11K";
str5 = "result";
bArr = null;
str6 = str;
aVar.f14613a = e.a();
k.h(m3Var, "/v3/iasdkauth", e);
s0 s0Var2 = s0Var;
if (bArr == null) {
}
} catch (IllegalBlockSizeException unused2) {
str2 = "off";
s0Var = b10;
str3 = "001";
str4 = "11K";
str5 = "result";
bArr = null;
} catch (Throwable th) {
th = th;
str2 = "off";
s0Var = b10;
str3 = "001";
str4 = "11K";
str5 = "result";
bArr = null;
str6 = str;
k.l(th, "at", "lc");
s0 s0Var22 = s0Var;
if (bArr == null) {
}
}
} else {
s0Var = b10;
bArr = null;
}
str3 = "001";
try {
bArr2 = new byte[16];
str2 = "off";
} catch (b3 e11) {
e = e11;
str2 = "off";
} catch (IllegalBlockSizeException unused3) {
str2 = "off";
} catch (Throwable th2) {
th = th2;
str2 = "off";
}
} catch (Throwable unused4) {
throw new b3("未知的错误");
}
} catch (b3 e12) {
e = e12;
}
} catch (Throwable unused5) {
}
} catch (b3 e13) {
e = e13;
bArr = null;
s0Var = null;
aVar.f14613a = e.a();
k.h(m3Var, "/v3/iasdkauth", e);
s0 s0Var222 = s0Var;
if (bArr == null) {
}
} catch (IllegalBlockSizeException unused6) {
bArr = null;
s0Var = null;
s0 s0Var2222 = s0Var;
if (bArr == null) {
}
} catch (Throwable th3) {
th = th3;
bArr = null;
s0Var = null;
k.l(th, "at", "lc");
s0 s0Var22222 = s0Var;
if (bArr == null) {
}
}
} catch (b3 e14) {
e = e14;
str2 = "off";
str3 = "001";
str4 = "11K";
str5 = "result";
str6 = str;
bArr = null;
s0Var = null;
aVar.f14613a = e.a();
k.h(m3Var, "/v3/iasdkauth", e);
s0 s0Var222222 = s0Var;
if (bArr == null) {
}
} catch (IllegalBlockSizeException unused7) {
str2 = "off";
str3 = "001";
str4 = "11K";
str5 = "result";
str6 = str;
bArr = null;
s0Var = null;
s0 s0Var2222222 = s0Var;
if (bArr == null) {
}
} catch (Throwable th4) {
th = th4;
str2 = "off";
str3 = "001";
str4 = "11K";
str5 = "result";
str6 = str;
bArr = null;
s0Var = null;
k.l(th, "at", "lc");
s0 s0Var22222222 = s0Var;
if (bArr == null) {
}
}
try {
bArr3 = new byte[bArr.length - 16];
str4 = "11K";
try {
System.arraycopy(bArr, 0, bArr2, 0, 16);
str5 = "result";
} catch (b3 e15) {
e = e15;
str5 = "result";
str6 = str;
aVar.f14613a = e.a();
k.h(m3Var, "/v3/iasdkauth", e);
s0 s0Var222222222 = s0Var;
if (bArr == null) {
}
} catch (IllegalBlockSizeException unused8) {
str5 = "result";
str6 = str;
s0 s0Var2222222222 = s0Var;
if (bArr == null) {
}
} catch (Throwable th5) {
th = th5;
str5 = "result";
str6 = str;
k.l(th, "at", "lc");
s0 s0Var22222222222 = s0Var;
if (bArr == null) {
}
}
} catch (b3 e16) {
e = e16;
str4 = "11K";
str5 = "result";
str6 = str;
aVar.f14613a = e.a();
k.h(m3Var, "/v3/iasdkauth", e);
s0 s0Var222222222222 = s0Var;
if (bArr == null) {
}
} catch (IllegalBlockSizeException unused9) {
str4 = "11K";
str5 = "result";
str6 = str;
s0 s0Var2222222222222 = s0Var;
if (bArr == null) {
}
} catch (Throwable th6) {
th = th6;
str4 = "11K";
str5 = "result";
str6 = str;
k.l(th, "at", "lc");
s0 s0Var22222222222222 = s0Var;
if (bArr == null) {
}
}
try {
System.arraycopy(bArr, 16, bArr3, 0, bArr.length - 16);
SecretKeySpec secretKeySpec = new SecretKeySpec(bArr2, "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(2, secretKeySpec, new IvParameterSpec(n3.v()));
str7 = n3.f(cipher.doFinal(bArr3));
} catch (b3 e17) {
e = e17;
str6 = str;
aVar.f14613a = e.a();
k.h(m3Var, "/v3/iasdkauth", e);
s0 s0Var222222222222222 = s0Var;
if (bArr == null) {
}
} catch (IllegalBlockSizeException unused10) {
} catch (Throwable th7) {
th = th7;
str6 = str;
k.l(th, "at", "lc");
s0 s0Var2222222222222222 = s0Var;
if (bArr == null) {
}
}
str6 = str;
s0 s0Var22222222222222222 = s0Var;
if (bArr == null) {
return aVar;
}
if (TextUtils.isEmpty(str7)) {
str7 = n3.f(bArr);
}
try {
JSONObject jSONObject = new JSONObject(str7);
if (jSONObject.has("status")) {
int i9 = jSONObject.getInt("status");
if (i9 == 1) {
f14611a = 1;
} else if (i9 == 0) {
String str9 = "authcsid";
String str10 = "authgsid";
if (s0Var22222222222222222 != null) {
str9 = s0Var22222222222222222.f15143c;
str10 = s0Var22222222222222222.f15144d;
}
n3.h(context, str9, str10, jSONObject);
f14611a = 0;
if (jSONObject.has("info")) {
f14612b = jSONObject.getString("info");
}
k.i(m3Var, "/v3/iasdkauth", f14612b, str10, jSONObject.has("infocode") ? jSONObject.getString("infocode") : "");
if (f14611a == 0) {
aVar.f14613a = f14612b;
return aVar;
}
}
if (jSONObject.has("ver")) {
aVar.f14614b = jSONObject.getInt("ver");
}
String str11 = str5;
if (n3.m(jSONObject, str11)) {
a.C0170a c0170a = new a.C0170a();
c0170a.f14639a = false;
c0170a.f14640b = false;
aVar.f14636x = c0170a;
JSONObject jSONObject2 = jSONObject.getJSONObject(str11);
String[] split = str6.split(";");
if (split != null && split.length > 0) {
for (String str12 : split) {
if (jSONObject2.has(str12)) {
aVar.f14635w.putOpt(str12, jSONObject2.get(str12));
}
}
}
String str13 = str4;
if (n3.m(jSONObject2, str13)) {
JSONObject jSONObject3 = jSONObject2.getJSONObject(str13);
c0170a.f14639a = g(jSONObject3.getString("able"), false);
String str14 = str2;
if (jSONObject3.has(str14)) {
c0170a.f14641c = jSONObject3.getJSONObject(str14);
}
}
String str15 = str3;
if (n3.m(jSONObject2, str15)) {
JSONObject jSONObject4 = jSONObject2.getJSONObject(str15);
a.d dVar = new a.d();
if (jSONObject4 != null) {
String b11 = b(jSONObject4, "md5");
String b12 = b(jSONObject4, SocialConstants.PARAM_URL);
String b13 = b(jSONObject4, "sdkversion");
if (!TextUtils.isEmpty(b11) && !TextUtils.isEmpty(b12) && !TextUtils.isEmpty(b13)) {
dVar.f14649a = b12;
dVar.f14650b = b11;
dVar.f14651c = b13;
}
}
aVar.f14637y = dVar;
}
if (n3.m(jSONObject2, "002")) {
JSONObject jSONObject5 = jSONObject2.getJSONObject("002");
a.c cVar = new a.c();
f(jSONObject5, cVar);
aVar.A = cVar;
}
if (n3.m(jSONObject2, "14S")) {
JSONObject jSONObject6 = jSONObject2.getJSONObject("14S");
a.c cVar2 = new a.c();
f(jSONObject6, cVar2);
aVar.B = cVar2;
}
d(aVar, jSONObject2);
if (n3.m(jSONObject2, "14Z")) {
JSONObject jSONObject7 = jSONObject2.getJSONObject("14Z");
a.e eVar = new a.e();
String b14 = b(jSONObject7, "md5");
String b15 = b(jSONObject7, "md5info");
String b16 = b(jSONObject7, SocialConstants.PARAM_URL);
String b17 = b(jSONObject7, "able");
String b18 = b(jSONObject7, "on");
String b19 = b(jSONObject7, "mobileable");
eVar.f14656e = b14;
eVar.f14657f = b15;
eVar.f14655d = b16;
eVar.f14652a = g(b17, false);
eVar.f14653b = g(b18, false);
eVar.f14654c = g(b19, false);
aVar.G = eVar;
}
if (n3.m(jSONObject2, "151")) {
JSONObject jSONObject8 = jSONObject2.getJSONObject("151");
a.f fVar = new a.f();
if (jSONObject8 != null) {
fVar.f14658a = g(jSONObject8.optString("able"), false);
}
aVar.f14638z = fVar;
}
d(aVar, jSONObject2);
if (n3.m(jSONObject2, "14N")) {
JSONObject jSONObject9 = jSONObject2.getJSONObject("14N");
a.b bVar2 = new a.b();
bVar2.f14642a = g(jSONObject9.optString("able"), false);
bVar2.f14643b = jSONObject9.optString(SocialConstants.PARAM_URL);
bVar2.f14644c = jSONObject9.optString("md5");
if (bVar2.f14642a) {
m3 a10 = f.a();
if (a10 != null) {
w wVar = new w(bVar2.f14643b, bVar2.f14644c);
wVar.b(z9);
new v(context, wVar, a10).e();
}
} else {
x.f(context, "aiu");
}
}
JSONObject jSONObject10 = jSONObject2.getJSONObject("15K");
boolean g9 = g(jSONObject10.optString("isTargetAble"), false);
if (g(jSONObject10.optString("able"), false)) {
i3.a.f14807a.d(context, g9);
} else {
i3.a.f14807a.f(context);
}
}
}
} catch (Throwable th8) {
h.e(th8, "at", "lc");
}
return aVar;
}
private static String b(JSONObject jSONObject, String str) throws JSONException {
return (jSONObject == null || !jSONObject.has(str) || jSONObject.getString(str).equals("[]")) ? "" : jSONObject.optString(str);
}
public static void c(Context context, String str) {
c3.b(context, str);
}
private static void d(a aVar, JSONObject jSONObject) {
try {
if (n3.m(jSONObject, "11B")) {
aVar.f14620h = jSONObject.getJSONObject("11B");
}
if (n3.m(jSONObject, "11C")) {
aVar.f14623k = jSONObject.getJSONObject("11C");
}
if (n3.m(jSONObject, "11I")) {
aVar.f14624l = jSONObject.getJSONObject("11I");
}
if (n3.m(jSONObject, "11H")) {
aVar.f14625m = jSONObject.getJSONObject("11H");
}
if (n3.m(jSONObject, "11E")) {
aVar.f14626n = jSONObject.getJSONObject("11E");
}
if (n3.m(jSONObject, "11F")) {
aVar.f14627o = jSONObject.getJSONObject("11F");
}
if (n3.m(jSONObject, "13A")) {
aVar.f14629q = jSONObject.getJSONObject("13A");
}
if (n3.m(jSONObject, "13J")) {
aVar.f14621i = jSONObject.getJSONObject("13J");
}
if (n3.m(jSONObject, "11G")) {
aVar.f14628p = jSONObject.getJSONObject("11G");
}
if (n3.m(jSONObject, "006")) {
aVar.f14630r = jSONObject.getJSONObject("006");
}
if (n3.m(jSONObject, "010")) {
aVar.f14631s = jSONObject.getJSONObject("010");
}
if (n3.m(jSONObject, "11Z")) {
JSONObject jSONObject2 = jSONObject.getJSONObject("11Z");
a.b bVar = new a.b();
e(jSONObject2, bVar);
aVar.C = bVar;
}
if (n3.m(jSONObject, "135")) {
aVar.f14622j = jSONObject.getJSONObject("135");
}
if (n3.m(jSONObject, "13S")) {
aVar.f14619g = jSONObject.getJSONObject("13S");
}
if (n3.m(jSONObject, "121")) {
JSONObject jSONObject3 = jSONObject.getJSONObject("121");
a.b bVar2 = new a.b();
e(jSONObject3, bVar2);
aVar.D = bVar2;
}
if (n3.m(jSONObject, "122")) {
JSONObject jSONObject4 = jSONObject.getJSONObject("122");
a.b bVar3 = new a.b();
e(jSONObject4, bVar3);
aVar.E = bVar3;
}
if (n3.m(jSONObject, "123")) {
JSONObject jSONObject5 = jSONObject.getJSONObject("123");
a.b bVar4 = new a.b();
e(jSONObject5, bVar4);
aVar.F = bVar4;
}
if (n3.m(jSONObject, "011")) {
aVar.f14615c = jSONObject.getJSONObject("011");
}
if (n3.m(jSONObject, "012")) {
aVar.f14616d = jSONObject.getJSONObject("012");
}
if (n3.m(jSONObject, "013")) {
aVar.f14617e = jSONObject.getJSONObject("013");
}
if (n3.m(jSONObject, "014")) {
aVar.f14618f = jSONObject.getJSONObject("014");
}
if (n3.m(jSONObject, "145")) {
aVar.f14632t = jSONObject.getJSONObject("145");
}
if (n3.m(jSONObject, "14B")) {
aVar.f14633u = jSONObject.getJSONObject("14B");
}
if (n3.m(jSONObject, "14D")) {
aVar.f14634v = jSONObject.getJSONObject("14D");
}
} catch (Throwable th) {
k.l(th, "at", "pe");
}
}
private static void e(JSONObject jSONObject, a.b bVar) {
if (bVar != null) {
try {
String b10 = b(jSONObject, "m");
String b11 = b(jSONObject, "u");
String b12 = b(jSONObject, "v");
String b13 = b(jSONObject, "able");
String b14 = b(jSONObject, "on");
bVar.f14644c = b10;
bVar.f14643b = b11;
bVar.f14645d = b12;
bVar.f14642a = g(b13, false);
bVar.f14646e = g(b14, true);
} catch (Throwable th) {
h.e(th, "at", "pe");
}
}
}
private static void f(JSONObject jSONObject, a.c cVar) {
if (jSONObject != null) {
try {
String b10 = b(jSONObject, "md5");
String b11 = b(jSONObject, SocialConstants.PARAM_URL);
cVar.f14648b = b10;
cVar.f14647a = b11;
} catch (Throwable th) {
h.e(th, "at", "psc");
}
}
}
public static boolean g(String str, boolean z9) {
try {
if (TextUtils.isEmpty(str)) {
return z9;
}
String[] split = URLDecoder.decode(str).split("/");
return split[split.length - 1].charAt(4) % 2 == 1;
} catch (Throwable unused) {
return z9;
}
}
}