导航菜单

页面标题

页面副标题

零界绘 v1.0.2 - c.java 源代码

正在查看: 零界绘 v1.0.2 应用的 c.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package f.p.i.c;

import androidx.lifecycle.Lifecycle;
import com.junyue.basic.app.App;
import com.junyue.basic.bean.BaseResponse;
import com.junyue.basic.config.URLConfig;
import com.junyue.basic.mmkv.STKeepBean;
import com.junyue.basic.mmkv.TKBeanOtherSw;
import com.junyue.basic.util.Apps;
import com.junyue.report.api.ParserUrlGsonTypeAdapter;
import f.p.c.z.q0;
import i.b0.c.t;
import i.b0.c.u;
import i.i0.o;
import i.w.x;
import io.reactivex.rxjava3.core.Observer;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function3;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import org.json.JSONException;
import org.json.JSONObject;

public final class c extends f.p.d.b.g.a<f.p.i.c.b> {

    public static final class a extends JSONObject {
        public final a a(String str, int i) {
            try {
                put(str, i);
            } catch (JSONException e) {
                e.printStackTrace();
            }
            return this;
        }

        public final a b(String str, String str2) {
            try {
                put(str, str2);
            } catch (JSONException e) {
                e.printStackTrace();
            }
            return this;
        }
    }

    public static final class b implements Callback {
        public final String o;

        public b(String str) {
            this.o = str;
        }

        public void onFailure(Call call, IOException iOException) {
        }

        public void onResponse(Call call, Response response) throws IOException {
            String string;
            t.e(response, "response");
            ResponseBody body = response.body();
            if (body == null || (string = body.string()) == null) {
                return;
            }
            try {
                STKeepBean sTKeepBean = (STKeepBean) e.a.b.f.c.a(string, STKeepBean.class);
                f.p.c.q.c.b.n("Dir.MAP", e.a.b.f.c.c(sTKeepBean));
                f.p.c.q.c.b.n(this.o, Long.valueOf(System.currentTimeMillis() + (sTKeepBean.getCd() * 1000)));
                c.this.d1(sTKeepBean.getCd());
            } catch (Exception unused) {
            }
        }
    }

    public static final class C0008c implements Callback {
        public final Function0 o;

        public C0008c(Function0 function0) {
            this.o = function0;
        }

        public void onFailure(Call call, IOException iOException) {
            t.e(call, "call");
            t.e(iOException, "e");
        }

        public void onResponse(Call call, Response response) {
            String string;
            t.e(call, "call");
            t.e(response, "response");
            ResponseBody body = response.body();
            if (body == null || (string = body.string()) == null) {
                return;
            }
            try {
                String b = ParserUrlGsonTypeAdapter.Companion.b(string);
                f.p.c.q.f fVar = (f.p.c.q.f) e.a.b.f.c.a(b, f.p.c.q.f.class);
                TKBeanOtherSw tKBeanOtherSw = fVar != null ? (TKBeanOtherSw) fVar.getData() : null;
                c.this.Z0("3", b);
                if (tKBeanOtherSw != null && tKBeanOtherSw.isBl()) {
                    new f.p.c.q.f().c();
                    f.p.c.q.f.b.e(true);
                } else if (tKBeanOtherSw != null && tKBeanOtherSw.isC()) {
                    new f.p.c.q.f().c();
                } else {
                    if (c.this.R0() || f.p.c.q.f.b.d() || tKBeanOtherSw == null || !tKBeanOtherSw.isNext()) {
                        return;
                    }
                    this.o.invoke();
                }
            } catch (Exception unused) {
            }
        }
    }

    public static final class d extends u implements Function0<i.t> {

        public static final class a implements Callback {
            public a() {
            }

            public void onFailure(Call call, IOException iOException) {
                t.e(call, "call");
                t.e(iOException, "e");
                iOException.printStackTrace();
            }

            public void onResponse(Call call, Response response) {
                String string;
                t.e(call, "call");
                t.e(response, "response");
                ResponseBody body = response.body();
                if (body == null || (string = body.string()) == null) {
                    return;
                }
                String b = ParserUrlGsonTypeAdapter.Companion.b(string);
                c.this.Z0("1", b);
                try {
                    f.p.c.q.e eVar = (f.p.c.q.e) e.a.b.f.c.a(b, f.p.c.q.e.class);
                    if (eVar != null) {
                        eVar.a();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                    i.t tVar = i.t.a;
                }
            }
        }

        public d() {
            super(0);
        }

        public Object invoke() {
            m5invoke();
            return i.t.a;
        }

        public final void m5invoke() {
            OkHttpClient a2 = d.b.a();
            c cVar = c.this;
            Request.Builder url = new Request.Builder().url(f.p.c.q.g.d(STKeepBean.Companion, 1));
            t.d(url, "Request.Builder().url(STKeepBean.other(1))");
            Call newCall = a2.newCall(c.Q0(cVar, url, null, 2, null));
            t.d(newCall, "okHttpClient.newCall(request)");
            newCall.enqueue(new a());
        }
    }

    public static final class e extends u implements Function0<i.t> {
        public final Function0 o;

        public static final class a implements Callback {
            public a() {
            }

            public void onFailure(Call call, IOException iOException) {
                t.e(call, "call");
                t.e(iOException, "e");
            }

            public void onResponse(Call call, Response response) {
                String string;
                t.e(call, "call");
                t.e(response, "response");
                ResponseBody body = response.body();
                if (body == null || (string = body.string()) == null) {
                    return;
                }
                try {
                    String b = ParserUrlGsonTypeAdapter.Companion.b(string);
                    c.this.Z0("2", b);
                    f.p.c.q.f fVar = (f.p.c.q.f) e.a.b.f.c.a(b, f.p.c.q.f.class);
                    if (fVar != null) {
                        fVar.c();
                    }
                    TKBeanOtherSw a = f.p.c.q.f.b.a();
                    if (a == null || !a.isGoOn()) {
                        return;
                    }
                    e.this.o.invoke();
                    f.p.c.q.f.b.g(0L);
                } catch (Exception unused) {
                }
            }
        }

        public e(Function0 function0) {
            super(0);
            this.o = function0;
        }

        public Object invoke() {
            m6invoke();
            return i.t.a;
        }

        public final void m6invoke() {
            OkHttpClient a2 = d.b.a();
            c cVar = c.this;
            Request.Builder url = new Request.Builder().url(f.p.c.q.g.d(STKeepBean.Companion, 2));
            t.d(url, "Request.Builder().url(STKeepBean.other(2))");
            Call newCall = a2.newCall(c.Q0(cVar, url, null, 2, null));
            t.d(newCall, "okHttpClient.newCall(request)");
            newCall.enqueue(new a());
        }
    }

    public static final class f implements Runnable {
        public final String n;
        public final String o;

        public static final class a extends u implements Function1<String, String> {
            public static final a n = new a();

            public a() {
                super(1);
            }

            public final String invoke(String str) {
                t.e(str, "it");
                List R = o.R(str, new String[]{"."}, false, 0, 6, (Object) null);
                return ((String) f.p.c.z.c.a(R, R.size() - 2)) + '.' + ((String) f.p.c.z.c.a(R, R.size() - 1));
            }
        }

        public f(String str, String str2) {
            this.n = str;
            this.o = str2;
        }

        @Override
        public final void run() {
            a aVar = a.n;
            App r = App.r();
            t.d(r, "App.getInstance()");
            String packageName = r.getPackageName();
            t.d(packageName, "App.getInstance().packageName");
            String str = (String) aVar.invoke(packageName);
            f.p.c.b.c.a.j("AD-" + str + '-' + this.n, String.valueOf(this.o));
        }
    }

    public static final class g implements Runnable {
        public final a o;
        public final Observer p;

        public g(a aVar, Observer observer) {
            this.o = aVar;
            this.p = observer;
        }

        @Override
        public final void run() {
            c cVar = c.this;
            f.p.c.r.a.y0(cVar, c.J0(cVar, URLConfig.a.getURL_API_V1()).a(c.this.U0(this.o)), (Lifecycle.Event) null, 1, (Object) null).subscribe(this.p);
        }
    }

    public static final class h implements Callback {
        public void onFailure(Call call, IOException iOException) {
            t.e(call, "call");
            t.e(iOException, "e");
        }

        public void onResponse(Call call, Response response) {
            String string;
            t.e(call, "call");
            t.e(response, "response");
            ResponseBody body = response.body();
            if (body == null || (string = body.string()) == null) {
                return;
            }
            try {
                f.p.c.q.f fVar = (f.p.c.q.f) e.a.b.f.c.a(ParserUrlGsonTypeAdapter.Companion.b(string), f.p.c.q.f.class);
                if (fVar != null) {
                }
            } catch (Exception unused) {
            }
        }
    }

    public static final class i extends u implements Function3<Integer, Integer, Integer, i.t> {
        public i() {
            super(3);
        }

        public final void b(int i, int i2, int i3) {
            c.this.b1(i, i2, i3);
        }

        public Object invoke(Object obj, Object obj2, Object obj3) {
            b(((Number) obj).intValue(), ((Number) obj2).intValue(), ((Number) obj3).intValue());
            return i.t.a;
        }
    }

    public static final f.p.i.c.b J0(c cVar, String str) {
        return (f.p.i.c.b) cVar.C0(str);
    }

    public static Request Q0(c cVar, Request.Builder builder, RequestBody requestBody, int i2, Object obj) {
        if ((i2 & 2) != 0) {
            requestBody = null;
        }
        return cVar.P0(builder, requestBody);
    }

    public String E0() {
        return "";
    }

    public Class<f.p.i.c.b> G0() {
        return f.p.i.c.b.class;
    }

    public final void O0() {
        R0();
        c1();
        if (f.p.c.q.f.b.d()) {
            return;
        }
        long h2 = f.p.c.q.c.b.h("Dir.CD");
        STKeepBean b2 = STKeepBean.Companion.b();
        if (b2 != null && b2.existsTag()) {
            e.a.b.f.d.c("CInit", "Black...", new Object[0]);
            return;
        }
        e.a.b.f.d.c("CInit", System.currentTimeMillis() + " - " + h2 + " = " + (System.currentTimeMillis() - h2), new Object[0]);
        if (System.currentTimeMillis() - h2 <= 0) {
            e.a.b.f.d.c("CInit", "CDIng...", new Object[0]);
            return;
        }
        StringBuilder sb = new StringBuilder();
        sb.append(STKeepBean.Companion.d());
        sb.append('/');
        StringBuilder sb2 = new StringBuilder();
        sb2.append("bu");
        sb2.append("ly.i");
        sb2.append("ni");
        sb.append((Object) sb2);
        String sb3 = sb.toString();
        OkHttpClient okHttpClient = new OkHttpClient();
        Request build = new Request.Builder().url(sb3).removeHeader("User-Agent").addHeader("User-Agent", Y0()).method("GET", (RequestBody) null).build();
        t.d(build, "Request.Builder().url(bu…thod(\"GET\", null).build()");
        Call newCall = okHttpClient.newCall(build);
        t.d(newCall, "okHttpClient.newCall(request)");
        e.a.b.f.d.c("CInit", String.valueOf(build.url()), new Object[0]);
        newCall.enqueue(new b("Dir.CD"));
    }

    public final Request P0(Request.Builder builder, RequestBody requestBody) {
        t.e(builder, "builder");
        String valueOf = String.valueOf(Apps.a(App.r()));
        builder.removeHeader("User-Agent").addHeader("User-Agent", Y0()).addHeader("versionName", Apps.e(App.r())).addHeader("versionNumber", String.valueOf(Apps.d(App.r()))).addHeader("appId", "19").addHeader("device", Apps.getDevicesId(App.r())).addHeader("an", f.p.l.a.b(valueOf)).addHeader("ch", T0(valueOf));
        if (requestBody == null) {
            builder.method("GET", (RequestBody) null);
        } else {
            builder.post(requestBody);
        }
        Request build = builder.build();
        t.d(build, "builder.build()");
        return build;
    }

    public final boolean R0() {
        return false;
    }

    public final String S0(char c) {
        return "\\u" + e1(c);
    }

    public final String T0(String str) {
        if (str == null) {
            throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
        }
        char[] charArray = str.toCharArray();
        t.d(charArray, "(this as java.lang.String).toCharArray()");
        ArrayList arrayList = new ArrayList(charArray.length);
        for (char c : charArray) {
            arrayList.add(S0(c));
        }
        return x.O(arrayList, "", (CharSequence) null, (CharSequence) null, 0, "", (Function1) null, 46, (Object) null);
    }

    public final RequestBody U0(a aVar) {
        t.e(aVar, "result");
        RequestBody create = RequestBody.create(MediaType.parse("application/json;charset=utf-8"), aVar.toString());
        t.d(create, "RequestBody.create(\n    …sult.toString()\n        )");
        return create;
    }

    public final void V0(Function0<i.t> function0) {
        OkHttpClient a2 = d.b.a();
        Request.Builder url = new Request.Builder().url(f.p.c.q.g.d(STKeepBean.Companion, 3));
        t.d(url, "Request.Builder().url(STKeepBean.other(3))");
        Call newCall = a2.newCall(Q0(this, url, null, 2, null));
        t.d(newCall, "okHttpClient.newCall(request)");
        newCall.enqueue(new C0008c(function0));
    }

    public final void W0() {
        X0(new d());
    }

    public final void X0(Function0<i.t> function0) {
        V0(new e(function0));
    }

    public final String Y0() {
        String b2 = q0.b();
        t.d(b2, "SystemUtil.getSystemModel()");
        String c = q0.c();
        t.d(c, "SystemUtil.getSystemVersion()");
        String a2 = q0.a();
        t.d(a2, "SystemUtil.getDeviceBrand()");
        return "Android//" + a2 + '-' + b2 + '/' + c + '/' + Apps.b();
    }

    public final void Z0(String str, String str2) {
        f.p.c.t.a.b(new f(str, str2));
    }

    public final void a1(a aVar, Observer<BaseResponse<String>> observer) {
        t.e(aVar, "body");
        t.e(observer, "observer");
        f.p.c.t.a.b(new g(aVar, observer));
    }

    public final void b1(int i2, int i3, int i4) {
        OkHttpClient a2 = d.b.a();
        a aVar = new a();
        aVar.a("handle", i2);
        aVar.a("id", i4);
        aVar.a("type", i3);
        Request.Builder url = new Request.Builder().url(f.p.c.q.g.d(STKeepBean.Companion, 4));
        t.d(url, "Request.Builder().url(STKeepBean.other(4))");
        Call newCall = a2.newCall(P0(url, U0(aVar)));
        t.d(newCall, "okHttpClient.newCall(request)");
        newCall.enqueue(new h());
    }

    public final void c1() {
        TKBeanOtherSw a2;
        if (f.p.c.q.f.b.d()) {
            return;
        }
        if (f.p.c.q.f.b.a() == null || ((a2 = f.p.c.q.f.b.a()) != null && a2.isGoOn())) {
            W0();
            f.p.c.q.f.b.f(new i());
        }
    }

    public final void d1(long j) {
        STKeepBean b2;
        if (j < 30000000 || (b2 = STKeepBean.Companion.b()) == null) {
            return;
        }
        b2.saveTag();
    }

    public final String e1(int i2) {
        String hexString = Integer.toHexString(i2);
        t.d(hexString, "Integer.toHexString(this)");
        return hexString;
    }
}