ChatGPT v1.4版本的 MD5 值为:69452afb0ab411cdc5b23981aefbf172

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


package c.b.a.a;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.webkit.WebView;
import com.iapp.app.Aid_YuCodeX;
import com.iapp.app.Webview;
import com.iapp.app.run.main2;
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.ArrayList;
import java.util.HashMap;
import org.keplerproject.luajava.LuaObject;
public class b {
    public static HashMap<String, Class<?>> a;
    private static int b;

    public static class a implements InvocationHandler {
        private t a;
        private Aid_YuCodeX b;
        private WebView f1340c;
        private LuaObject f1341d;
        private String e;
        private int f;
        private int g;

        public a(Object obj, Object obj2) {
            int i2;
            this.a = null;
            this.b = null;
            this.f1340c = null;
            this.f1341d = null;
            this.e = null;
            this.f = 0;
            b.d();
            this.g = b.b;
            if (obj2 != null) {
                if (obj == null) {
                    if (!(obj2 instanceof LuaObject)) {
                        return;
                    }
                    this.f1341d = (LuaObject) obj2;
                    i2 = 1;
                } else if (obj instanceof t) {
                    this.a = (t) obj;
                    this.e = obj2.toString();
                    i2 = 2;
                } else if (obj instanceof Aid_YuCodeX) {
                    this.b = (Aid_YuCodeX) obj;
                    this.e = obj2.toString();
                    i2 = 4;
                } else if (!(obj instanceof Webview)) {
                    return;
                } else {
                    this.f1340c = (WebView) obj;
                    this.e = obj2.toString();
                    i2 = 3;
                }
                this.f = i2;
            }
        }

        @Override
        public Object invoke(Object obj, Method method, Object[] objArr) {
            int i2 = this.f;
            if (i2 == 2) {
                this.a.T("st_mD", method);
                this.a.T("st_aS", objArr);
                this.a.e(this.e);
                return null;
            } else if (i2 == 4) {
                this.b.dim("st_mD", method);
                this.b.dim("st_aS", objArr);
                this.b.YuGo(this.e);
                return null;
            } else if (i2 == 1) {
                this.f1341d.callNoErr(method, objArr);
                return null;
            } else if (i2 == 3) {
                WebView webView = this.f1340c;
                StringBuilder sb = new StringBuilder();
                sb.append("javascript:{\nvar functionItme = ");
                sb.append(this.e);
                sb.append(";\nfunctionItme('");
                sb.append(main2.set("^_InvocationHandler_" + this.g + "_st_mD", method));
                sb.append("', '");
                sb.append(main2.set("^_InvocationHandler_" + this.g + "_st_aS", objArr));
                sb.append("');\n}");
                webView.loadUrl(sb.toString());
                return null;
            } else {
                return null;
            }
        }
    }

    public static Class<?> a(String str) {
        if (a == null) {
            l();
        }
        Class<?> cls = null;
        try {
            cls = Class.forName(str);
            a.put(str, cls);
            return cls;
        } catch (Exception e) {
            e.printStackTrace();
            return cls;
        }
    }

    public static Class<?> b(String str) {
        if (a == null) {
            l();
        }
        Class<?> cls = a.get(str);
        if (cls == null) {
            try {
                cls = Class.forName(str);
            } catch (Exception e) {
                e.printStackTrace();
            }
            if (cls == null) {
                return null;
            }
            a.put(str, cls);
        }
        return cls;
    }

    static int d() {
        int i2 = b;
        b = i2 + 1;
        return i2;
    }

    public static Object e(Context context, Object obj, Class<?> cls, String str, Object[] objArr, Object obj2, Object obj3) {
        Method method;
        Object[] objArr2;
        if (objArr == null) {
            try {
                method = cls.getDeclaredMethod(str, new Class[0]);
            } catch (NoSuchMethodException e) {
                e = e;
                method = null;
            }
            try {
                method.setAccessible(true);
            } catch (NoSuchMethodException e2) {
                e = e2;
                e.printStackTrace();
                objArr2 = null;
                if (method != null) {
                }
            }
            objArr2 = null;
        } else {
            int length = objArr.length;
            int i2 = length / 2;
            Class<?>[] clsArr = new Class[i2];
            objArr2 = new Object[i2];
            ArrayList arrayList = new ArrayList();
            boolean[] zArr = new boolean[i2];
            int i3 = 0;
            for (int i4 = 0; i4 < length; i4 += 2) {
                if (objArr[i4] instanceof Class) {
                    clsArr[i3] = (Class) objArr[i4];
                    zArr[i3] = false;
                    objArr2[i3] = s(clsArr[i3], objArr[i4 + 1]);
                } else {
                    String obj4 = objArr[i4].toString();
                    if (obj4.indexOf(46) == 0) {
                        clsArr[i3] = b(obj4.substring(1));
                        arrayList.add(clsArr[i3]);
                        zArr[i3] = true;
                    } else {
                        clsArr[i3] = b(obj4);
                        zArr[i3] = false;
                        objArr2[i3] = s(clsArr[i3], objArr[i4 + 1]);
                    }
                }
                i3++;
            }
            if (arrayList.size() > 0) {
                Object newProxyInstance = Proxy.newProxyInstance(context.getClassLoader(), (Class[]) arrayList.toArray(new Class[arrayList.size()]), new a(obj2, obj3));
                for (int i5 = 0; i5 < i2; i5++) {
                    if (zArr[i5]) {
                        objArr2[i5] = newProxyInstance;
                    }
                }
            }
            try {
                method = cls.getDeclaredMethod(str, clsArr);
            } catch (Exception e3) {
                e = e3;
                method = null;
            }
            try {
                method.setAccessible(true);
            } catch (Exception e4) {
                e = e4;
                e.printStackTrace();
                if (method != null) {
                }
            }
        }
        if (method != null) {
            try {
                return objArr2 != null ? method.invoke(obj, objArr2) : method.invoke(obj, new Object[0]);
            } catch (Exception e5) {
                e5.printStackTrace();
                return null;
            }
        }
        return null;
    }

    public static Object f(Context context, Object obj, String str, String str2, Object[] objArr, Object obj2, Object obj3) {
        return e(context, obj, b(str), str2, objArr, obj2, obj3);
    }

    public static Object g(Context context, Object obj, String str, Object[] objArr, Object obj2, Object obj3) {
        int lastIndexOf = str.lastIndexOf(46);
        String substring = str.substring(0, lastIndexOf);
        return e(context, obj, b(substring), str.substring(lastIndexOf + 1), objArr, obj2, obj3);
    }

    public static Object h(Object obj, Class<?> cls, String str, Object[] objArr) {
        Method method;
        Object[] objArr2;
        if (objArr == null) {
            try {
                method = cls.getDeclaredMethod(str, new Class[0]);
                try {
                    method.setAccessible(true);
                } catch (NoSuchMethodException e) {
                    e = e;
                    e.printStackTrace();
                    objArr2 = null;
                    if (objArr2 != null) {
                    }
                }
            } catch (NoSuchMethodException e2) {
                e = e2;
                method = null;
            }
            objArr2 = null;
        } else {
            int length = objArr.length;
            int i2 = length / 2;
            Class<?>[] clsArr = new Class[i2];
            objArr2 = new Object[i2];
            int i3 = 0;
            for (int i4 = 0; i4 < length; i4 += 2) {
                if (objArr[i4] instanceof Class) {
                    clsArr[i3] = (Class) objArr[i4];
                } else {
                    clsArr[i3] = b(objArr[i4].toString());
                }
                objArr2[i3] = s(clsArr[i3], objArr[i4 + 1]);
                i3++;
            }
            try {
                method = cls.getDeclaredMethod(str, clsArr);
                try {
                    method.setAccessible(true);
                } catch (NoSuchMethodException e3) {
                    e = e3;
                    e.printStackTrace();
                    if (objArr2 != null) {
                    }
                }
            } catch (NoSuchMethodException e4) {
                e = e4;
                method = null;
            }
        }
        try {
            return objArr2 != null ? method.invoke(obj, objArr2) : method.invoke(obj, new Object[0]);
        } catch (IllegalAccessException e5) {
            e5.printStackTrace();
            return null;
        } catch (IllegalArgumentException e6) {
            e6.printStackTrace();
            return null;
        } catch (InvocationTargetException e7) {
            e7.printStackTrace();
            return null;
        }
    }

    public static Object i(Object obj, Class<?> cls, String str) {
        try {
            Field declaredField = cls.getDeclaredField(str);
            declaredField.setAccessible(true);
            return declaredField.get(obj);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static Object j(Object obj, String str) {
        int lastIndexOf = str.lastIndexOf(46);
        return k(obj, str.substring(0, lastIndexOf), str.substring(lastIndexOf + 1));
    }

    public static Object k(Object obj, String str, String str2) {
        return i(obj, b(str), str2);
    }

    @TargetApi(14)
    public static void l() {
        a = new HashMap<>(0);
        Class<?>[] clsArr = {Boolean.TYPE, Byte.TYPE, Character.TYPE, Short.TYPE, Integer.TYPE, Long.TYPE, Float.TYPE, Double.TYPE, Void.TYPE, Boolean.class, Byte.class, Character.class, Short.class, Integer.class, Long.class, Float.class, Double.class, Void.class, Number.class, String.class, Object.class, CharSequence.class, File.class, Class.class, Context.class, Activity.class, AccessibilityEvent.class, boolean[].class, byte[].class, char[].class, short[].class, int[].class, long[].class, float[].class, double[].class, Boolean[].class, Byte[].class, Character[].class, Short[].class, Integer[].class, Long[].class, Float[].class, Double[].class, Number[].class, String[].class, Object[].class, CharSequence[].class, File[].class, Class[].class, Context[].class, Activity[].class};
        String[] strArr = {"boolean", "byte", "char", "short", "int", "long", "float", "double", "void", "Boolean", "Byte", "Character", "Short", "Integer", "Long", "Float", "Double", "Void", "Number", "String", "Object", "CharSequence", "File", "Class", "Context", "Activity", "AccessibilityEvent", "boolean[]", "byte[]", "char[]", "short[]", "int[]", "long[]", "float[]", "double[]", "Boolean[]", "Byte[]", "Character[]", "Short[]", "Integer[]", "Long[]", "Float[]", "Number[]", "Double[]", "String[]", "Object[]", "CharSequence[]", "File[]", "Class[]", "Context[]", "Activity[]"};
        for (int i2 = 0; i2 < 51; i2++) {
            a.put(strArr[i2], clsArr[i2]);
        }
        if (Build.VERSION.SDK_INT >= 14) {
            a.put("AccessibilityNodeInfo", AccessibilityNodeInfo.class);
        }
    }

    public static Object m(Context context, Class<?> cls, Object[] objArr, Object obj, Object obj2) {
        Constructor<?> constructor;
        try {
            if (objArr == null) {
                return cls.newInstance();
            }
            int length = objArr.length;
            int i2 = length / 2;
            Class<?>[] clsArr = new Class[i2];
            Object[] objArr2 = new Object[i2];
            ArrayList arrayList = new ArrayList();
            boolean[] zArr = new boolean[i2];
            int i3 = 0;
            for (int i4 = 0; i4 < length; i4 += 2) {
                if (objArr[i4] instanceof Class) {
                    clsArr[i3] = (Class) objArr[i4];
                    zArr[i3] = false;
                    objArr2[i3] = s(clsArr[i3], objArr[i4 + 1]);
                } else {
                    String obj3 = objArr[i4].toString();
                    if (obj3.indexOf(46) == 0) {
                        clsArr[i3] = b(obj3.substring(1));
                        arrayList.add(clsArr[i3]);
                        zArr[i3] = true;
                    } else {
                        clsArr[i3] = b(obj3);
                        zArr[i3] = false;
                        objArr2[i3] = s(clsArr[i3], objArr[i4 + 1]);
                    }
                }
                i3++;
            }
            int size = arrayList.size();
            if (size > 0) {
                Object newProxyInstance = Proxy.newProxyInstance(context.getClassLoader(), (Class[]) arrayList.toArray(new Class[size]), new a(obj, obj2));
                for (int i5 = 0; i5 < i2; i5++) {
                    if (zArr[i5]) {
                        objArr2[i5] = newProxyInstance;
                    }
                }
            }
            try {
                constructor = cls.getDeclaredConstructor(clsArr);
                try {
                    constructor.setAccessible(true);
                } catch (NoSuchMethodException e) {
                    e = e;
                    e.printStackTrace();
                    return constructor.newInstance(objArr2);
                }
            } catch (NoSuchMethodException e2) {
                e = e2;
                constructor = null;
            }
            try {
                return constructor.newInstance(objArr2);
            } catch (IllegalArgumentException e3) {
                e3.printStackTrace();
                return null;
            } catch (InvocationTargetException e4) {
                e4.printStackTrace();
                return null;
            }
        } catch (IllegalAccessException e5) {
            e5.printStackTrace();
        } catch (InstantiationException e6) {
            e6.printStackTrace();
        }
    }

    public static Object n(Context context, String str, Object[] objArr, Object obj, Object obj2) {
        return m(context, b(str), objArr, obj, obj2);
    }

    public static Object o(ClassLoader classLoader, Class<?> cls, Object obj, Object obj2) {
        return Proxy.newProxyInstance(classLoader, new Class[]{cls}, new a(obj, obj2));
    }

    public static Object p(Object obj, String str, Object obj2) {
        int lastIndexOf = str.lastIndexOf(46);
        return Boolean.valueOf(r(obj, str.substring(0, lastIndexOf), str.substring(lastIndexOf + 1), obj2));
    }

    public static boolean q(Object obj, Class<?> cls, String str, Object obj2) {
        try {
            Field declaredField = cls.getDeclaredField(str);
            declaredField.setAccessible(true);
            Object obj3 = declaredField.get(obj);
            if (obj3 != null) {
                obj2 = s(obj3.getClass(), obj2);
            }
            declaredField.set(obj, obj2);
            return true;
        } catch (Exception e) {
            e.printStackTrace();
            return false;
        }
    }

    public static boolean r(Object obj, String str, String str2, Object obj2) {
        return q(obj, b(str), str2, obj2);
    }

    private static Object s(Class<?> cls, Object obj) {
        if (obj == null) {
            return null;
        }
        if (cls == Integer.TYPE || cls == Integer.class) {
            return obj instanceof Integer ? Integer.valueOf(((Integer) obj).intValue()) : obj instanceof Double ? Integer.valueOf((int) Double.parseDouble(obj.toString())) : Integer.valueOf(Integer.parseInt(obj.toString()));
        } else if (cls == Double.TYPE || cls == Double.class) {
            return obj instanceof Double ? Double.valueOf(((Double) obj).doubleValue()) : Double.valueOf(Double.parseDouble(obj.toString()));
        } else if (cls == Long.TYPE || cls == Long.class) {
            return obj instanceof Long ? Long.valueOf(((Long) obj).longValue()) : obj instanceof Double ? Long.valueOf((long) Double.parseDouble(obj.toString())) : Long.valueOf(Long.parseLong(obj.toString()));
        } else if (cls == Float.TYPE || cls == Float.class) {
            return obj instanceof Float ? Float.valueOf(((Float) obj).floatValue()) : Float.valueOf(Float.parseFloat(obj.toString()));
        } else if (cls == Boolean.TYPE || cls == Boolean.class) {
            return obj instanceof Boolean ? Boolean.valueOf(((Boolean) obj).booleanValue()) : Boolean.valueOf(obj.equals("true"));
        } else if (cls == Byte.TYPE || cls == Byte.class) {
            return obj instanceof Byte ? Byte.valueOf(((Byte) obj).byteValue()) : obj instanceof Double ? Byte.valueOf((byte) Double.parseDouble(obj.toString())) : Byte.valueOf(Byte.parseByte(obj.toString()));
        } else if (cls == Character.TYPE || cls == Character.class) {
            return obj instanceof Character ? Character.valueOf(((Character) obj).charValue()) : Character.valueOf(obj.toString().charAt(0));
        } else if (cls == Short.TYPE || cls == Short.class) {
            return obj instanceof Short ? Short.valueOf(((Short) obj).shortValue()) : obj instanceof Double ? Short.valueOf((short) Double.parseDouble(obj.toString())) : Short.valueOf(Short.parseShort(obj.toString()));
        } else {
            try {
                return !obj.getClass().equals(cls) ? cls.cast(obj) : obj;
            } catch (Exception e) {
                e.printStackTrace();
                return obj;
            }
        }
    }
}