Skip to content

Instantly share code, notes, and snippets.

@Surdi Surdi/App.java
Created Mar 26, 2018

Embed
What would you like to do?
App.java decompiled with jadx after encrypting 'my_prefs.xml'
//Jadx Decompiler
package com.securepreferences.sample;
import android.app.Application;
import p000o.C0457;
public class App extends Application {
protected static App instance;
private static int f0 = 0;
private static int f1 = 1;
private static int f2 = -1999280546;
private static int f3 = 822016385;
private static short[] f4;
private static byte[] f5 = new byte[]{(byte) -1, (byte) -11, (byte) 74, (byte) -69, (byte) 13, (byte) 1, (byte) -13, (byte) 2, (byte) 17, (byte) -26, (byte) 12, (byte) 0};
private static int f6 = 81;
private C0457 mSecurePrefs;
public android.content.SharedPreferences getSharedPreferences() {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: com.securepreferences.sample.App.getSharedPreferences():android.content.SharedPreferences
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:116)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:249)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
Caused by: java.lang.NullPointerException
at jadx.core.dex.nodes.MethodNode.addJump(MethodNode.java:370)
at jadx.core.dex.nodes.MethodNode.initJumps(MethodNode.java:356)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:106)
... 4 more
*/
/*
r0 = this;
goto L_0x0022;
r1 = f1; Catch:{ Exception -> 0x001d }
r1 = r1 + 17; Catch:{ Exception -> 0x001d }
r2 = r1 % 128; Catch:{ Exception -> 0x001d }
f0 = r2; Catch:{ Exception -> 0x001d }
r1 = r1 % 2; Catch:{ Exception -> 0x001d }
if (r1 == 0) goto L_0x000f;
L_0x000d:
goto L_0x005f;
return r0;
L_0x0011:
r0 = move-exception;
throw r0;
r0 = r6.mSecurePrefs;
if (r0 != 0) goto L_0x0018;
goto L_0x0026;
goto L_0x001f;
switch(r0) {
case 0: goto L_0x0013;
case 1: goto L_0x0055;
default: goto L_0x001c;
};
goto L_0x0013;
L_0x001d:
r0 = move-exception;
throw r0;
r0 = r6.mSecurePrefs; Catch:{ Exception -> 0x0011 }
goto L_0x0001;
L_0x0022:
r0 = 2;
r0 = r0 % 2;
goto L_0x0045;
r0 = new o.ᴮ;
r1 = 0;
r2 = 0;
r3 = 1999280655; // 0x772a9a0f float:3.4602154E33 double:9.87775888E-315;
r4 = -822016385; // 0xffffffffcf01067f float:-2.16468659E9 double:NaN;
r5 = -69;
r1 = m0(r1, r2, r3, r4, r5);
r1 = r1.intern();
r2 = 0;
r0.<init>(r6, r2, r1);
r6.mSecurePrefs = r0;
r0 = 1;
p000o.C0457.m2436(r0);
goto L_0x001f;
r0 = f1; Catch:{ Exception -> 0x001d }
r0 = r0 + 65;
r1 = r0 % 128;
f0 = r1; Catch:{ Exception -> 0x001d }
r0 = r0 % 2;
if (r0 == 0) goto L_0x0052;
goto L_0x0053;
goto L_0x0061;
r0 = 1;
goto L_0x0019;
r0 = r6.mSecurePrefs; Catch:{ Exception -> 0x001d }
r1 = 0; Catch:{ Exception -> 0x001d }
super.hashCode(); Catch:{ Exception -> 0x001d }
if (r0 != 0) goto L_0x005e;
goto L_0x0026;
goto L_0x001f;
goto L_0x0010;
r0 = 0;
goto L_0x0019;
*/
throw new UnsupportedOperationException("Method not decompiled: com.securepreferences.sample.App.getSharedPreferences():android.content.SharedPreferences");
}
public App() {
instance = this;
}
public static App get() {
int i = 2 % 2;
i = f0 + 79;
f1 = i % 128;
if (i % 2 == 0) {
}
App app = instance;
int i2 = f0 + 33;
f1 = i2 % 128;
switch (i2 % 2 == 0 ? 59 : 24) {
case 24:
break;
case 59:
Object[] objArr = null;
i2 = objArr.length;
return app;
default:
break;
}
return app;
}
private static String m0(byte b, short s, int i, int i2, int i3) {
Object obj;
int i4;
int i5;
byte b2;
int i6;
int i7;
int i8 = 2 % 2;
byte b3 = b;
short s2 = s;
int i9 = i;
int i10 = i2;
int i11 = i3;
StringBuilder stringBuilder = new StringBuilder();
i8 = f6 + i11;
int i12 = i8;
if (i8 == -1) {
obj = 85;
} else {
obj = 51;
}
switch (obj) {
case 51:
break;
case 85:
i8 = f1 + 1;
f0 = i8 % 128;
if (i8 % 2 != 0) {
}
obj = 1;
i4 = f0 + 83;
f1 = i4 % 128;
if (i4 % 2 != 0) {
i4 = 2 % 2;
break;
}
break;
default:
break;
}
obj = null;
i4 = f0 + 41;
f1 = i4 % 128;
switch (i4 % 2 == 0 ? 5 : 45) {
case 5:
break;
case 45:
break;
default:
break;
}
i4 = 2 % 2;
Object obj2 = obj;
if (obj != null) {
obj = 63;
} else {
obj = 30;
}
switch (obj) {
case 63:
if (f5 != null) {
i8 = f0 + 67;
f1 = i8 % 128;
if (i8 % 2 == 0) {
try {
i12 = (byte) (f5[f3 ^ i10] - f6);
} catch (Exception e) {
throw e;
}
}
i12 = (byte) (f5[f3 + i10] + f6);
} else {
i12 = (short) (f4[f3 + i10] + f6);
}
case 30:
if (i12 <= 0) {
obj = 1;
} else {
obj = null;
}
switch (obj) {
case 1:
i8 = ((i10 + i12) - 2) + f3;
if (obj2 == null) {
i4 = f1 + 17;
f0 = i4 % 128;
if (i4 % 2 == 0) {
i4 = 1;
} else {
i4 = 1;
}
int i13 = 2 % 2;
} else {
i4 = 0;
}
i5 = i8 + i4;
b2 = b3;
i6 = (char) (f2 + i9);
stringBuilder.append(i6);
while (i7 < i12) {
try {
if (f5 == null) {
i4 = i5;
i5--;
i6 = (char) ((((byte) (f5[i4] + s2)) ^ b2) + i6);
} else {
i4 = i5;
i5--;
i6 = (char) ((((short) (f4[i4] + s2)) ^ b2) + i6);
}
stringBuilder.append(i6);
} catch (Exception e2) {
throw e2;
}
}
case null:
return stringBuilder.toString();
default:
}
return stringBuilder.toString();
default:
}
if (i12 <= 0) {
obj = null;
} else {
obj = 1;
}
switch (obj) {
case 1:
i8 = ((i10 + i12) - 2) + f3;
if (obj2 == null) {
i4 = 0;
} else {
i4 = f1 + 17;
f0 = i4 % 128;
if (i4 % 2 == 0) {
i4 = 1;
} else {
i4 = 1;
}
int i132 = 2 % 2;
}
i5 = i8 + i4;
b2 = b3;
i6 = (char) (f2 + i9);
stringBuilder.append(i6);
for (i7 = 1; i7 < i12; i7++) {
if (f5 == null) {
i4 = i5;
i5--;
i6 = (char) ((((short) (f4[i4] + s2)) ^ b2) + i6);
} else {
i4 = i5;
i5--;
i6 = (char) ((((byte) (f5[i4] + s2)) ^ b2) + i6);
}
stringBuilder.append(i6);
}
case null:
return stringBuilder.toString();
default:
}
return stringBuilder.toString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.