iKredit v1.2.0.3版本的 MD5 值为:2c00c5c79eecbd6be4c3c546c28d778d

以下内容为反编译后的 b.java 源代码,内容仅作参考


package com.sdk.plus.d;

import android.content.IntentFilter;
import android.os.HandlerThread;
import android.text.TextUtils;
import android.util.Base64;
import com.android.sdklibrary.utils.RSAUtilForAndroid;
import com.appsflyer.share.Constants;
import com.sdk.plus.d.e;
import com.sdk.plus.i.a.f;
import com.sdk.plus.j.g;
import com.sdk.plus.j.h;
import com.sdk.plus.j.i;
import com.sdk.plus.k.a;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.TimeZone;

public final class b extends HandlerThread {
    public b() {
        super("WUS-Thread");
    }

    @Override
    protected final void onLooperPrepared() {
        e eVar;
        com.sdk.plus.k.a aVar;
        com.sdk.plus.k.a aVar2;
        com.sdk.plus.k.a aVar3;
        com.sdk.plus.k.a aVar4;
        try {
            eVar = e.a.a;
            com.sdk.plus.h.d.a("WUS_Logic", "wus logic init");
            com.sdk.plus.c.b.a();
            com.sdk.plus.c.d.v = com.sdk.plus.f.a.a();
            try {
                byte[] a = com.sdk.plus.f.d.a(com.sdk.plus.c.a.b.getBytes(RSAUtilForAndroid.CHARSET));
                byte[] decode = Base64.decode(com.sdk.plus.c.b.h, 0);
                String a2 = com.sdk.plus.f.a.a(decode, Base64.decode(com.sdk.plus.c.a.c, 0), a);
                String a3 = com.sdk.plus.f.a.a(decode, Base64.decode(com.sdk.plus.c.d.C, 0), a);
                String a4 = com.sdk.plus.f.a.a(decode, Base64.decode(com.sdk.plus.c.b.g, 0), a);
                String a5 = com.sdk.plus.f.a.a(decode, Base64.decode(com.sdk.plus.c.d.D, 0), a);
                String a6 = com.sdk.plus.f.a.a(decode, Base64.decode(com.sdk.plus.c.a.d, 0), a);
                if (!TextUtils.isEmpty(a2) && !TextUtils.isEmpty(a3) && !TextUtils.isEmpty(a4) && !TextUtils.isEmpty(a5) && !TextUtils.isEmpty(a6)) {
                    String[] split = a2.split(",");
                    String[] split2 = a3.split(",");
                    String[] split3 = a4.split(",");
                    String[] split4 = a5.split(",");
                    String[] split5 = a6.split(",");
                    if (split.length == 4 && split2.length == 4 && split3.length == 4 && split4.length == 5 && split5.length == 5) {
                        com.sdk.plus.c.d.w = split[1] + split2[2];
                        com.sdk.plus.c.d.x = split[1] + split3[3];
                        com.sdk.plus.c.d.I = split5[2];
                        String str = split4[1];
                        if (!TextUtils.isEmpty(str)) {
                            com.sdk.plus.c.d.E = "com." + str + ".sdk.PushService";
                            com.sdk.plus.c.d.F = "com." + str + ".sdk.GActivity";
                            com.sdk.plus.c.d.G = "com." + str + ".sdk.MActivity";
                            com.sdk.plus.c.d.H = "com." + str + ".sdk.action.service.message";
                        }
                    }
                }
            } catch (Throwable unused) {
            }
            try {
                String str2 = com.sdk.plus.c.d.x;
                if (!TextUtils.isEmpty(str2)) {
                    File file = new File(str2);
                    if (file.exists() && file.isFile()) {
                        com.sdk.plus.h.d.a("WUS_Logic", "not dir, delete file");
                        file.delete();
                    }
                    if (!file.exists() && !file.mkdirs()) {
                        com.sdk.plus.h.d.a("WUS_Logic", "directory cre fai ++++++");
                    }
                    com.sdk.plus.c.b.k = str2 + Constants.URL_PATH_DELIMITER + com.sdk.plus.c.b.b + com.umeng.analytics.process.a.d;
                }
            } catch (Throwable th) {
                com.sdk.plus.h.d.a("WUS_Logic", th);
            }
            com.sdk.plus.c.d.a = new com.sdk.plus.e.a(com.sdk.plus.c.b.c);
            com.sdk.plus.e.a.a.a();
            com.sdk.plus.e.a.a.b();
            com.sdk.plus.e.a.c.a();
            com.sdk.plus.e.a.c.b();
            com.sdk.plus.e.a.b.a().b();
            com.sdk.plus.e.a.c.a();
            String str3 = com.sdk.plus.c.b.i;
            if (!TextUtils.isEmpty(str3)) {
                if (!com.sdk.plus.c.d.A.equals(str3)) {
                    com.sdk.plus.c.d.A = str3;
                    com.sdk.plus.e.a.c.a(200, h.a(str3.getBytes()));
                    String[] split6 = com.sdk.plus.c.d.A.split("\\|");
                    if (split6.length == 3 && !TextUtils.isEmpty(split6[1]) && !"null".equalsIgnoreCase(split6[1])) {
                        g.a(com.sdk.plus.c.b.c, "dys", split6[1]);
                        com.sdk.plus.h.d.a("WUS_RDM", "save " + split6[1] + "_sp");
                    }
                }
                String str4 = com.sdk.plus.c.b.a + "|" + com.sdk.plus.c.b.j + "|" + com.sdk.plus.c.d.A;
                if (!str4.equals(i.a(com.sdk.plus.c.b.b, com.sdk.plus.c.d.x))) {
                    i.b(com.sdk.plus.c.b.k, str4);
                    com.sdk.plus.h.d.a("WUS_RDM", "reWrite to db");
                }
            }
            e.a();
            com.sdk.plus.h.d.a("WUS_Logic", "wus config task init");
            aVar = a.C0050a.a;
            aVar.a(new Runnable() {
                public AnonymousClass1() {
                }

                @Override
                public final void run() {
                    try {
                        com.sdk.plus.h.d.a("WUS_Logic", "add wus config task result start");
                        com.sdk.plus.i.a.d d = com.sdk.plus.i.a.d.d();
                        if (d.b()) {
                            d.a(System.currentTimeMillis());
                            d.a();
                            com.sdk.plus.h.d.a("WUS_Logic", "add wus config task result success");
                        }
                    } catch (Throwable unused2) {
                    }
                }
            }, 3000L);
            if (com.sdk.plus.c.c.a) {
                try {
                    if (!i.e(com.sdk.plus.c.b.c)) {
                        com.sdk.plus.g.a.a aVar5 = new com.sdk.plus.g.a.a(new com.sdk.plus.g.b() {
                            public AnonymousClass4() {
                            }

                            @Override
                            public final void a(Object obj) {
                                List<String> list;
                                if (!(obj instanceof HashMap) || (list = (List) ((Map) ((HashMap) obj).get("header")).get("Date")) == null) {
                                    return;
                                }
                                for (String str5 : list) {
                                    if (str5.contains(":") && str5.contains("GMT")) {
                                        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss z", Locale.ENGLISH);
                                        simpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
                                        long time = simpleDateFormat.parse(str5).getTime();
                                        long currentTimeMillis = System.currentTimeMillis();
                                        if (currentTimeMillis != time) {
                                            com.sdk.plus.c.d.t = time - currentTimeMillis;
                                            com.sdk.plus.h.d.a("WUS_Logic", "localTimeByServerTimeDiff  = " + com.sdk.plus.c.d.t);
                                        }
                                    }
                                }
                            }
                        });
                        aVar5.a = "http://c-w.applk.cn/api/addr.htm";
                        aVar4 = a.C0050a.a;
                        aVar4.a(new com.sdk.plus.g.a(aVar5));
                    }
                } catch (Throwable unused2) {
                }
                com.sdk.plus.a.c.c.a();
                com.sdk.plus.a.a.a.a();
                com.sdk.plus.a.a.b.a();
                eVar.a = new com.sdk.plus.i.a();
                long nextInt = (com.sdk.plus.c.c.F + new Random().nextInt(com.sdk.plus.c.c.G)) * 1000;
                com.sdk.plus.h.d.a("WUS_Logic", "wus guard task init");
                aVar2 = a.C0050a.a;
                aVar2.a(new Runnable() {
                    final long a;

                    public AnonymousClass2(long nextInt2) {
                        r2 = nextInt2;
                    }

                    @Override
                    public final void run() {
                        try {
                            com.sdk.plus.h.d.a("WUS_Logic", "wus first guard start");
                            com.sdk.plus.a.b.d.a().b();
                            com.sdk.plus.a.b.b.a();
                            com.sdk.plus.a.b.b.b();
                            com.sdk.plus.h.d.a("WUS_Logic", "guard guard task result success |guardTime = " + r2);
                        } catch (Throwable unused3) {
                        }
                    }
                }, nextInt2);
                long nextInt2 = (new Random().nextInt(15) + 30) * 1000;
                com.sdk.plus.h.d.a("WUS_Logic", "dac task init");
                com.sdk.plus.h.d.a("WUS_Logic", "add dc result success delayTime | " + nextInt2 + " intervalTime= 360000");
                aVar3 = a.C0050a.a;
                aVar3.b(new Runnable() {
                    public AnonymousClass3() {
                    }

                    @Override
                    public final void run() {
                        boolean z;
                        try {
                            com.sdk.plus.h.d.a("WUS_Logic", "wus dc cycle task start.");
                            e.this.a.a(com.sdk.plus.i.a.d.d());
                            com.sdk.plus.i.a aVar6 = e.this.a;
                            if (com.sdk.plus.i.a.b.c == null) {
                                com.sdk.plus.i.a.b.c = new com.sdk.plus.i.a.b();
                            }
                            aVar6.a(com.sdk.plus.i.a.b.c);
                            e.this.a.a(com.sdk.plus.i.a.h.d());
                            e.this.a.a(com.sdk.plus.i.a.a.d());
                            com.sdk.plus.i.a aVar7 = e.this.a;
                            if (com.sdk.plus.i.a.e.c == null) {
                                com.sdk.plus.i.a.e.c = new com.sdk.plus.i.a.e();
                            }
                            aVar7.a(com.sdk.plus.i.a.e.c);
                            e.this.a.a(com.sdk.plus.i.a.g.d());
                            com.sdk.plus.i.a aVar8 = e.this.a;
                            if (f.c == null) {
                                f.c = new f();
                            }
                            aVar8.a(f.c);
                            e.this.a.a(com.sdk.plus.i.a.c.d());
                            com.sdk.plus.i.a aVar9 = e.this.a;
                            boolean l = i.l();
                            com.sdk.plus.h.d.a("WUS_CronTask", "wus safe check = ".concat(String.valueOf(l)));
                            for (com.sdk.plus.i.b bVar : aVar9.a) {
                                if (!(bVar instanceof com.sdk.plus.i.a.d) && !(bVar instanceof f) && !(bVar instanceof com.sdk.plus.i.a.c)) {
                                    z = false;
                                    bVar.getClass().getSimpleName();
                                    bVar.c();
                                    bVar.b();
                                    if (!z || l) {
                                        if (bVar.c() && bVar.b()) {
                                            bVar.getClass().getSimpleName();
                                            bVar.a(System.currentTimeMillis());
                                            bVar.a();
                                        }
                                    }
                                }
                                z = true;
                                bVar.getClass().getSimpleName();
                                bVar.c();
                                bVar.b();
                                if (!z) {
                                }
                                if (bVar.c()) {
                                    bVar.getClass().getSimpleName();
                                    bVar.a(System.currentTimeMillis());
                                    bVar.a();
                                }
                            }
                        } catch (Throwable unused3) {
                        }
                    }
                }, nextInt2);
                IntentFilter intentFilter = new IntentFilter();
                intentFilter.addAction("android.intent.action.USER_PRESENT");
                intentFilter.addAction("android.intent.action.SCREEN_OFF");
                com.sdk.plus.c.b.c.registerReceiver(new c(), intentFilter);
            }
        } catch (Throwable unused3) {
        }
    }
}