Heroes III HD v1.1.6版本的 MD5 值为:99ed52e2d6b85487933b8dc8c0440b36
以下内容为反编译后的 dd.java 源代码,内容仅作参考
package com.flurry.sdk;
import android.os.Looper;
import java.io.Closeable;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import obfuse.NPStringFog;
public class dd {
String b;
LinkedHashMap<String, List<String>> c;
private static final String d = dd.class.getSimpleName();
static final Integer a = 50;
public dd(String str) {
a(str);
}
void a(String str) {
this.c = new LinkedHashMap<>();
this.b = str + NPStringFog.decode("2311040F");
List<String> e = e(this.b);
if (e != null) {
for (String str2 : e) {
List<String> e2 = e(str2);
if (e2 != null) {
this.c.put(str2, e2);
}
}
}
}
private synchronized void c() {
LinkedList linkedList = new LinkedList(this.c.keySet());
b();
if (!linkedList.isEmpty()) {
a(this.b, linkedList);
}
}
public synchronized void a(dc dcVar, String str) {
LinkedList linkedList;
boolean z = false;
synchronized (this) {
el.a(4, d, NPStringFog.decode("0F140923020E040E3B001602"));
String a2 = dcVar.a();
List<String> list = this.c.get(str);
if (list == null) {
el.a(4, d, NPStringFog.decode("20151A412A00130452251514"));
linkedList = new LinkedList();
z = true;
} else {
linkedList = list;
}
linkedList.add(a2);
if (linkedList.size() > a.intValue()) {
b(linkedList.get(0));
linkedList.remove(0);
}
this.c.put(str, linkedList);
a(str, linkedList);
if (z) {
c();
}
}
}
boolean b(String str) {
return new dc(str).c();
}
public boolean a(String str, String str2) {
List<String> list = this.c.get(str2);
boolean z = false;
if (list != null) {
b(str);
z = list.remove(str);
}
if (list != null && !list.isEmpty()) {
this.c.put(str2, list);
a(str2, list);
} else {
d(str2);
}
return z;
}
public List<String> a() {
return new ArrayList(this.c.keySet());
}
public List<String> c(String str) {
return this.c.get(str);
}
public synchronized boolean d(String str) {
boolean a2;
if (Looper.myLooper() == Looper.getMainLooper()) {
el.a(6, d, NPStringFog.decode("0A191E020F13032A071A140C150B0525091D0D1B1E2701132304060F3B08184628234C521C05030F070F00451D005019090B412A243B205019091C04060153"));
}
File fileStreamPath = dl.a().b().getFileStreamPath(NPStringFog.decode("403601141C131E361700140813270F03000A40190307014F") + str);
List<String> c = c(str);
if (c != null) {
el.a(4, d, NPStringFog.decode("0A191E020F13032A071A140C150B0525091D0D1B1E2701132304060F3B08185441090A063D1503152C0D0806191D505041") + c.size());
for (int i = 0; i < c.size(); i++) {
String str2 = c.get(i);
b(str2);
el.a(4, d, NPStringFog.decode("0A191E020F13032A071A140C150B0525091D0D1B1E2701132304060F3B0818544115001F010608054E030B0A1105505041") + str2);
}
}
this.c.remove(str);
a2 = a(fileStreamPath);
c();
return a2;
}
private synchronized boolean a(File file) {
boolean z;
z = false;
if (file != null) {
if (file.exists()) {
el.a(4, d, NPStringFog.decode("3A021408000647111D4E14080D0B150245020B021E081D15020B110B500B080204475F52") + file.getAbsolutePath());
z = file.delete();
if (z) {
el.a(4, d, NPStringFog.decode("2A1501041A040345020B021E081D15020B110B500B080204"));
} else {
el.a(6, d, NPStringFog.decode("2D11030F0115470117021519044E11021701070319040002024514071C08"));
}
}
}
return z;
}
void b() {
a(dl.a().b().getFileStreamPath(NPStringFog.decode("403601141C131E361700140813270F03000A40190307014F") + this.b));
}
private synchronized List<String> e(String str) {
DataInputStream dataInputStream;
ArrayList arrayList;
Throwable th;
int readUnsignedShort;
ArrayList arrayList2 = null;
synchronized (this) {
if (Looper.myLooper() == Looper.getMainLooper()) {
el.a(6, d, NPStringFog.decode("1C150C052813080834071C08490C18130029335C4D282A48471707001E040F0941080B521A18084123202E2B521A181F040F0546"));
}
File fileStreamPath = dl.a().b().getFileStreamPath(NPStringFog.decode("403601141C131E361700140813270F03000A40190307014F") + str);
if (fileStreamPath.exists()) {
try {
dataInputStream = new DataInputStream(new FileInputStream(fileStreamPath));
try {
readUnsignedShort = dataInputStream.readUnsignedShort();
} catch (Throwable th2) {
arrayList = null;
th = th2;
}
} catch (Throwable th3) {
dataInputStream = null;
arrayList = null;
th = th3;
}
if (readUnsignedShort == 0) {
fb.a(dataInputStream);
} else {
arrayList = new ArrayList(readUnsignedShort);
for (int i = 0; i < readUnsignedShort; i++) {
try {
int readUnsignedShort2 = dataInputStream.readUnsignedShort();
el.a(4, d, NPStringFog.decode("1C150C054E081300004E") + i + NPStringFog.decode("4E140C150F2D020B151A184D5C4E") + readUnsignedShort2);
byte[] bArr = new byte[readUnsignedShort2];
dataInputStream.readFully(bArr);
arrayList.add(new String(bArr));
} catch (Throwable th4) {
th = th4;
el.a(6, d, NPStringFog.decode("2B021F0E1C41100D170050010E0F050E0B154E0008131D0814111700044D07070D02"), th);
fb.a(dataInputStream);
arrayList2 = arrayList;
return arrayList2;
}
}
if (dataInputStream.readUnsignedShort() == 0) {
}
fb.a(dataInputStream);
}
} else {
el.a(5, d, NPStringFog.decode("2F17080F1A4104041106154D07070D02451601151E0F491547000A0703194F"));
arrayList = null;
}
arrayList2 = arrayList;
}
return arrayList2;
}
private synchronized boolean a(String str, List<String> list) {
DataOutputStream dataOutputStream;
boolean z;
boolean z2 = false;
synchronized (this) {
if (Looper.myLooper() == Looper.getMainLooper()) {
el.a(6, d, NPStringFog.decode("1D111B043A0E210C1E0B580F181A043C385E4E3929484E13120B1C071E0A41010F47111A0B502020272F47111A1C150C054F"));
}
File fileStreamPath = dl.a().b().getFileStreamPath(NPStringFog.decode("403601141C131E361700140813270F03000A40190307014F") + str);
try {
} catch (Throwable th) {
th = th;
dataOutputStream = null;
}
if (fa.a(fileStreamPath)) {
dataOutputStream = new DataOutputStream(new FileOutputStream(fileStreamPath));
try {
dataOutputStream.writeShort(list.size());
for (int i = 0; i < list.size(); i++) {
byte[] bytes = list.get(i).getBytes();
int length = bytes.length;
el.a(4, d, NPStringFog.decode("190204150B410E11171C50") + i + NPStringFog.decode("4E140C150F2D020B151A184D5C4E") + length);
dataOutputStream.writeShort(length);
dataOutputStream.write(bytes);
}
dataOutputStream.writeShort(0);
z = true;
fb.a(dataOutputStream);
} catch (Throwable th2) {
th = th2;
el.a(6, d, NPStringFog.decode(""), th);
fb.a(dataOutputStream);
z = false;
z2 = z;
return z2;
}
z2 = z;
} else {
fb.a((Closeable) null);
}
}
return z2;
}
}