-
-
[原创]记一次独特的android逆向过程
-
发表于: 2023-4-21 11:23 30195
-
多年之前的有一天,领导说要逆向一个android app,据说,有些不法分子会使用该软件来从事危害国家安全的事,天下兴亡匹夫有责,为了维护国家安全,尽到每个公民的义务和责任,我积极接下了该任务。
拿过来之后,发现可以重打包。用dex2jar将classes.dex文件转换为jar包,利用jd-gui等分析源码,并尝试搜索decrypt,encrypt,decode,encode等关键字,竟然什么也没有!然后就一脸懵逼不会了,我奉劝给位java开发者,在开发的时候,加解密函数最好不要用decrypt,encrypt等字眼,用了的话,最少要混淆一下,否则,后果会很严重。
虽然咱技术差啥也不会,但是会用百度呀,双击打开iexplorer浏览器,并在百度中搜索"java 网络通信"等字样,关键字之间用空格隔开,在结果中,发现java中的网络功能一般都要使用read,readLine等函数,搜索之,发现以下几个地方比较可疑:
以及如下部分:
算了不装了,分析这些代码的过程其实并不快乐。
这其中涉及的其他代码也还有很多,java加解密过程过于繁琐,还原起来确实费劲。最终经过提炼,解密函数如下:
声明一下,该解密函数在某些情况下存在问题,会导致解密失败,原因未知。
本文开头被吊起胃口的同学们,不好意思只有这些了。
软件下载地址:
https://download.csdn.net/download/m0_37567738/88415580?spm=1001.2014.3001.5501
public abstract
class
bj
implements bg
{
private static final
int
a
=
32
;
private static final ThreadLocal b
=
new ThreadLocal()
{
protected char[] a()
{
return
new char[
'?'
];
}
};
private static final char[] a(char[] paramArrayOfChar,
int
paramInt1,
int
paramInt2)
{
char[] arrayOfChar
=
new char[paramInt2];
if
(paramInt1 >
0
) {
System.arraycopy(paramArrayOfChar,
0
, arrayOfChar,
0
, paramInt1);
}
return
arrayOfChar;
}
protected static final
int
b(CharSequence paramCharSequence,
int
paramInt1,
int
paramInt2)
{
if
(paramInt1 < paramInt2)
{
int
j
=
paramInt1
+
1
;
int
i
=
paramCharSequence.charAt(paramInt1);
if
((i <
55296
) || (i >
57343
)) {
return
i;
}
if
(i <
=
56319
)
{
if
(j
=
=
paramInt2) {
return
-
i;
}
char c
=
paramCharSequence.charAt(j);
if
(Character.isLowSurrogate(c)) {
return
Character.toCodePoint(i, c);
}
throw new IllegalArgumentException(
"Expected low surrogate but got char '"
+
c
+
"' with value "
+
c
+
" at index "
+
j);
}
throw new IllegalArgumentException(
"Unexpected low surrogate character '"
+
i
+
"' with value "
+
i
+
" at index "
+
(j
-
1
));
}
throw new IndexOutOfBoundsException(
"Index exceeds specified range"
);
}
protected
int
a(CharSequence paramCharSequence,
int
paramInt1,
int
paramInt2)
{
if
(paramInt1 < paramInt2)
{
i
=
b(paramCharSequence, paramInt1, paramInt2);
if
((i >
=
0
) && (a(i)
=
=
null)) {}
}
else
{
return
paramInt1;
}
if
(Character.isSupplementaryCodePoint(i)) {}
for
(
int
i
=
2
;; i
=
1
)
{
paramInt1
+
=
i;
break
;
}
}
public Appendable a(final Appendable paramAppendable)
{
bi.a(paramAppendable);
new Appendable()
{
int
a
=
-
1
;
char[] b
=
new char[
2
];
private void a(char[] paramAnonymousArrayOfChar,
int
paramAnonymousInt)
{
int
i
=
0
;
while
(i < paramAnonymousInt)
{
paramAppendable.append(paramAnonymousArrayOfChar[i]);
i
+
=
1
;
}
}
public Appendable append(char paramAnonymousChar)
{
if
(this.a !
=
-
1
)
{
if
(!Character.isLowSurrogate(paramAnonymousChar)) {
throw new IllegalArgumentException(
"Expected low surrogate character but got '"
+
paramAnonymousChar
+
"' with value "
+
paramAnonymousChar);
}
arrayOfChar
=
bj.this.a(Character.toCodePoint((char)this.a, paramAnonymousChar));
if
(arrayOfChar !
=
null) {
a(arrayOfChar, arrayOfChar.length);
}
for
(;;)
{
this.a
=
-
1
;
return
this;
paramAppendable.append((char)this.a);
paramAppendable.append(paramAnonymousChar);
}
}
if
(Character.isHighSurrogate(paramAnonymousChar))
{
this.a
=
paramAnonymousChar;
return
this;
}
if
(Character.isLowSurrogate(paramAnonymousChar)) {
throw new IllegalArgumentException(
"Unexpected low surrogate character '"
+
paramAnonymousChar
+
"' with value "
+
paramAnonymousChar);
}
char[] arrayOfChar
=
bj.this.a(paramAnonymousChar);
if
(arrayOfChar !
=
null)
{
a(arrayOfChar, arrayOfChar.length);
return
this;
}
paramAppendable.append(paramAnonymousChar);
return
this;
}
public Appendable append(CharSequence paramAnonymousCharSequence)
{
return
append(paramAnonymousCharSequence,
0
, paramAnonymousCharSequence.length());
}
public Appendable append(CharSequence paramAnonymousCharSequence,
int
paramAnonymousInt1,
int
paramAnonymousInt2)
{
int
i;
char[] arrayOfChar;
if
(paramAnonymousInt1 < paramAnonymousInt2)
{
if
(this.a
=
=
-
1
) {
break
label257;
}
i
=
paramAnonymousInt1
+
1
;
char c1
=
paramAnonymousCharSequence.charAt(paramAnonymousInt1);
if
(!Character.isLowSurrogate(c1)) {
throw new IllegalArgumentException(
"Expected low surrogate character but got "
+
c1);
}
arrayOfChar
=
bj.this.a(Character.toCodePoint((char)this.a, c1));
if
(arrayOfChar
=
=
null) {
break
label146;
}
a(arrayOfChar, arrayOfChar.length);
paramAnonymousInt1
+
=
1
;
this.a
=
-
1
;
}
for
(;;)
{
i
=
bj.this.a(paramAnonymousCharSequence, i, paramAnonymousInt2);
if
(i > paramAnonymousInt1) {
paramAppendable.append(paramAnonymousCharSequence, paramAnonymousInt1, i);
}
if
(i
=
=
paramAnonymousInt2)
{
return
this;
label146:
paramAppendable.append((char)this.a);
break
;
}
paramAnonymousInt1
=
bj.b(paramAnonymousCharSequence, i, paramAnonymousInt2);
if
(paramAnonymousInt1 <
0
)
{
this.a
=
(
-
paramAnonymousInt1);
return
this;
}
arrayOfChar
=
bj.this.a(paramAnonymousInt1);
if
(arrayOfChar !
=
null)
{
a(arrayOfChar, arrayOfChar.length);
label208:
if
(!Character.isSupplementaryCodePoint(paramAnonymousInt1)) {
break
label252;
}
}
label252:
for
(paramAnonymousInt1
=
2
;; paramAnonymousInt1
=
1
)
{
paramAnonymousInt1
=
i
+
paramAnonymousInt1;
i
=
paramAnonymousInt1;
break
;
int
j
=
Character.toChars(paramAnonymousInt1, this.b,
0
);
a(this.b, j);
break
label208;
}
label257:
i
=
paramAnonymousInt1;
}
}
};
}
public String a(String paramString)
{
int
i
=
paramString.length();
int
j
=
a(paramString,
0
, i);
if
(j
=
=
i) {
return
paramString;
}
return
a(paramString, j);
}
protected final String a(String paramString,
int
paramInt)
{
int
n
=
paramString.length();
Object
localObject1
=
(char[])b.get();
int
m
=
0
;
int
i
=
0
;
int
k
=
paramInt;
paramInt
=
i;
if
(k < n)
{
int
i1
=
b(paramString, k, n);
if
(i1 <
0
) {
throw new IllegalArgumentException(
"Trailing high surrogate at end of input"
);
}
char[] arrayOfChar
=
a(i1);
i
=
paramInt;
Object
localObject3
=
localObject1;
if
(arrayOfChar !
=
null)
{
i
=
k
-
m;
j
=
paramInt
+
i
+
arrayOfChar.length;
localObject2
=
localObject1;
if
(localObject1.length < j) {
localObject2
=
a((char[])localObject1, paramInt, j
+
(n
-
k)
+
32
);
}
j
=
paramInt;
if
(i >
0
)
{
paramString.getChars(m, k, (char[])localObject2, paramInt);
j
=
paramInt
+
i;
}
i
=
j;
localObject3
=
localObject2;
if
(arrayOfChar.length >
0
)
{
System.arraycopy(arrayOfChar,
0
, localObject2, j, arrayOfChar.length);
i
=
j
+
arrayOfChar.length;
localObject3
=
localObject2;
}
}
if
(Character.isSupplementaryCodePoint(i1)) {}
for
(paramInt
=
2
;; paramInt
=
1
)
{
m
=
paramInt
+
k;
k
=
a(paramString, m, n);
paramInt
=
i;
localObject1
=
localObject3;
break
;
}
}
int
j
=
n
-
m;
i
=
paramInt;
Object
localObject2
=
localObject1;
if
(j >
0
)
{
i
=
j
+
paramInt;
localObject2
=
localObject1;
if
(localObject1.length < i) {
localObject2
=
a((char[])localObject1, paramInt, i);
}
paramString.getChars(m, n, (char[])localObject2, paramInt);
}
return
new String((char[])localObject2,
0
, i);
}
protected abstract char[] a(
int
paramInt);
}
public abstract
class
bj
implements bg
{
private static final
int
a
=
32
;
private static final ThreadLocal b
=
new ThreadLocal()
{
protected char[] a()
{
return
new char[
'?'
];
}
};
private static final char[] a(char[] paramArrayOfChar,
int
paramInt1,
int
paramInt2)
{
char[] arrayOfChar
=
new char[paramInt2];
if
(paramInt1 >
0
) {
System.arraycopy(paramArrayOfChar,
0
, arrayOfChar,
0
, paramInt1);
}
return
arrayOfChar;
}
protected static final
int
b(CharSequence paramCharSequence,
int
paramInt1,
int
paramInt2)
{
if
(paramInt1 < paramInt2)
{
int
j
=
paramInt1
+
1
;
int
i
=
paramCharSequence.charAt(paramInt1);
if
((i <
55296
) || (i >
57343
)) {
return
i;
}
if
(i <
=
56319
)
{
if
(j
=
=
paramInt2) {
return
-
i;
}
char c
=
paramCharSequence.charAt(j);
if
(Character.isLowSurrogate(c)) {
return
Character.toCodePoint(i, c);
}
throw new IllegalArgumentException(
"Expected low surrogate but got char '"
+
c
+
"' with value "
+
c
+
" at index "
+
j);
}
throw new IllegalArgumentException(
"Unexpected low surrogate character '"
+
i
+
"' with value "
+
i
+
" at index "
+
(j
-
1
));
}
throw new IndexOutOfBoundsException(
"Index exceeds specified range"
);
}
protected
int
a(CharSequence paramCharSequence,
int
paramInt1,
int
paramInt2)
{
if
(paramInt1 < paramInt2)
{
i
=
b(paramCharSequence, paramInt1, paramInt2);
if
((i >
=
0
) && (a(i)
=
=
null)) {}
}
else
{
return
paramInt1;
}
if
(Character.isSupplementaryCodePoint(i)) {}
for
(
int
i
=
2
;; i
=
1
)
{
paramInt1
+
=
i;
break
;
}
}
public Appendable a(final Appendable paramAppendable)
{
bi.a(paramAppendable);
new Appendable()
{
int
a
=
-
1
;
char[] b
=
new char[
2
];
private void a(char[] paramAnonymousArrayOfChar,
int
paramAnonymousInt)
{
int
i
=
0
;
while
(i < paramAnonymousInt)
{
paramAppendable.append(paramAnonymousArrayOfChar[i]);
i
+
=
1
;
}
}
public Appendable append(char paramAnonymousChar)
{
if
(this.a !
=
-
1
)
{
if
(!Character.isLowSurrogate(paramAnonymousChar)) {
throw new IllegalArgumentException(
"Expected low surrogate character but got '"
+
paramAnonymousChar
+
"' with value "
+
paramAnonymousChar);
}
arrayOfChar
=
bj.this.a(Character.toCodePoint((char)this.a, paramAnonymousChar));
if
(arrayOfChar !
=
null) {
a(arrayOfChar, arrayOfChar.length);
}
for
(;;)
{
this.a
=
-
1
;
return
this;
paramAppendable.append((char)this.a);
paramAppendable.append(paramAnonymousChar);
}
}
if
(Character.isHighSurrogate(paramAnonymousChar))
{
this.a
=
paramAnonymousChar;
return
this;
}
if
(Character.isLowSurrogate(paramAnonymousChar)) {
throw new IllegalArgumentException(
"Unexpected low surrogate character '"
+
paramAnonymousChar
+
"' with value "
+
paramAnonymousChar);
}
char[] arrayOfChar
=
bj.this.a(paramAnonymousChar);
if
(arrayOfChar !
=
null)
{
a(arrayOfChar, arrayOfChar.length);
return
this;
}
paramAppendable.append(paramAnonymousChar);
return
this;
}
public Appendable append(CharSequence paramAnonymousCharSequence)
{
return
append(paramAnonymousCharSequence,
0
, paramAnonymousCharSequence.length());
}
public Appendable append(CharSequence paramAnonymousCharSequence,
int
paramAnonymousInt1,
int
paramAnonymousInt2)
{
int
i;
char[] arrayOfChar;
if
(paramAnonymousInt1 < paramAnonymousInt2)
{
if
(this.a
=
=
-
1
) {
break
label257;
}
i
=
paramAnonymousInt1
+
1
;
char c1
=
paramAnonymousCharSequence.charAt(paramAnonymousInt1);
if
(!Character.isLowSurrogate(c1)) {
throw new IllegalArgumentException(
"Expected low surrogate character but got "
+
c1);
}
arrayOfChar
=
bj.this.a(Character.toCodePoint((char)this.a, c1));
if
(arrayOfChar
=
=
null) {
break
label146;
}
a(arrayOfChar, arrayOfChar.length);
paramAnonymousInt1
+
=
1
;
this.a
=
-
1
;
}
for
(;;)
{
i
=
bj.this.a(paramAnonymousCharSequence, i, paramAnonymousInt2);
if
(i > paramAnonymousInt1) {
paramAppendable.append(paramAnonymousCharSequence, paramAnonymousInt1, i);
}
if
(i
=
=
paramAnonymousInt2)
{
return
this;
label146:
paramAppendable.append((char)this.a);
break
;
}
paramAnonymousInt1
=
bj.b(paramAnonymousCharSequence, i, paramAnonymousInt2);
if
(paramAnonymousInt1 <
0
)
{
this.a
=
(
-
paramAnonymousInt1);
return
this;
}
arrayOfChar
=
bj.this.a(paramAnonymousInt1);
if
(arrayOfChar !
=
null)
{
a(arrayOfChar, arrayOfChar.length);
label208:
if
(!Character.isSupplementaryCodePoint(paramAnonymousInt1)) {
break
label252;
}
}
label252:
for
(paramAnonymousInt1
=
2
;; paramAnonymousInt1
=
1
)
{
paramAnonymousInt1
=
i
+
paramAnonymousInt1;
i
=
paramAnonymousInt1;
break
;
int
j
=
Character.toChars(paramAnonymousInt1, this.b,
0
);
a(this.b, j);
break
label208;
}
label257:
i
=
paramAnonymousInt1;
}
}
};
}
public String a(String paramString)
{
int
i
=
paramString.length();
int
j
=
a(paramString,
0
, i);
if
(j
=
=
i) {
return
paramString;
}
return
a(paramString, j);
}
protected final String a(String paramString,
int
paramInt)
{
int
n
=
paramString.length();
Object
localObject1
=
(char[])b.get();
int
m
=
0
;
int
i
=
0
;
int
k
=
paramInt;
paramInt
=
i;
if
(k < n)
{
int
i1
=
b(paramString, k, n);
if
(i1 <
0
) {
throw new IllegalArgumentException(
"Trailing high surrogate at end of input"
);
}
char[] arrayOfChar
=
a(i1);
i
=
paramInt;
Object
localObject3
=
localObject1;
if
(arrayOfChar !
=
null)
{
i
=
k
-
m;
j
=
paramInt
+
i
+
arrayOfChar.length;
localObject2
=
localObject1;
if
(localObject1.length < j) {
localObject2
=
a((char[])localObject1, paramInt, j
+
(n
-
k)
+
32
);
}
j
=
paramInt;
if
(i >
0
)
{
paramString.getChars(m, k, (char[])localObject2, paramInt);
j
=
paramInt
+
i;
}
i
=
j;
localObject3
=
localObject2;
if
(arrayOfChar.length >
0
)
{
System.arraycopy(arrayOfChar,
0
, localObject2, j, arrayOfChar.length);
i
=
j
+
arrayOfChar.length;
localObject3
=
localObject2;
}
}
if
(Character.isSupplementaryCodePoint(i1)) {}
for
(paramInt
=
2
;; paramInt
=
1
)
{
m
=
paramInt
+
k;
k
=
a(paramString, m, n);
paramInt
=
i;
localObject1
=
localObject3;
break
;
}
}
int
j
=
n
-
m;
i
=
paramInt;
Object
localObject2
=
localObject1;
if
(j >
0
)
{
i
=
j
+
paramInt;
localObject2
=
localObject1;
if
(localObject1.length < i) {
localObject2
=
a((char[])localObject1, paramInt, i);
}
paramString.getChars(m, n, (char[])localObject2, paramInt);
}
return
new String((char[])localObject2,
0
, i);
}
protected abstract char[] a(
int
paramInt);
}
import
com.gtomato.talkbox.TalkBoxApplication;
import
java.io.BufferedOutputStream;
import
java.io.IOException;
import
java.net.Socket;
import
java.nio.ByteBuffer;
import
java.nio.channels.SelectableChannel;
import
java.nio.channels.SelectionKey;
import
java.nio.channels.Selector;
import
java.nio.channels.SocketChannel;
import
java.util.LinkedList;
import
java.util.Queue;
import
java.util.concurrent.ConcurrentLinkedQueue;
import
java.util.concurrent.atomic.AtomicBoolean;
public
class
fa
extends et
implements Runnable
{
private static final
int
r
=
30000
;
private static final
int
s
=
10000
;
private static final
int
t
=
1
;
private static final
int
u
=
3
;
private static final
int
v
=
10
;
private static final short w
=
6
;
private static final short x
=
7
;
private static final byte[] y;
private Selector A;
private Socket B;
private fa.b C;
private Thread D;
private final
Object
E
=
new
Object
();
private final
Object
F
=
new
Object
();
private volatile boolean G;
private AtomicBoolean H
=
new AtomicBoolean(false);
private AtomicBoolean I
=
new AtomicBoolean(false);
private gt J
=
gt.a();
private TalkBoxApplication K
=
gx.b;
private ByteBuffer L
=
ByteBuffer.allocate(
8192
);
private byte[] M
=
null;
private SocketChannel z;
static
{
if
(!fa.
class
.desiredAssertionStatus()) {}
for
(boolean
bool
=
true;;
bool
=
false)
{
q
=
bool
;
byte[] arrayOfByte
=
new byte[
2
];
arrayOfByte[
0
]
=
1
;
y
=
arrayOfByte;
return
;
}
}
public fa(gj paramgj)
{
super
(paramgj);
}
private void a(fl paramfl)
{
if
((!q) && (paramfl
=
=
null)) {
throw new AssertionError();
}
this.K.a(paramfl.c(), paramfl.a(), paramfl.b(), paramfl.d(), paramfl.e());
}
private void a(SelectionKey paramSelectionKey)
{
boolean
bool
=
true;
SocketChannel localSocketChannel
=
(SocketChannel)paramSelectionKey.channel();
this.L.clear();
int
i;
try
{
i
=
localSocketChannel.read(this.L);
if
(i
=
=
-
1
)
{
paramSelectionKey.channel().close();
paramSelectionKey.cancel();
throw new IOException();
}
}
catch (Exception localException)
{
paramSelectionKey.cancel();
localSocketChannel.close();
throw localException;
}
paramSelectionKey
=
this.J;
long
l
=
i;
byte[] arrayOfByte2;
if
(gx.d()
=
=
1
)
{
paramSelectionKey.b(l,
bool
);
paramSelectionKey
=
(byte[])null;
paramSelectionKey
=
(byte[])null;
if
(this.M !
=
null) {
paramSelectionKey
=
(byte[])this.M.clone();
}
arrayOfByte2
=
this.L.array();
if
(paramSelectionKey
=
=
null) {
break
label192;
}
byte[] arrayOfByte1
=
new byte[paramSelectionKey.length
+
i];
System.arraycopy(paramSelectionKey,
0
, arrayOfByte1,
0
, paramSelectionKey.length);
System.arraycopy(arrayOfByte2,
0
, arrayOfByte1, paramSelectionKey.length, i);
paramSelectionKey
=
arrayOfByte1;
}
for
(;;)
{
paramSelectionKey
=
a(paramSelectionKey, localSocketChannel);
if
(paramSelectionKey
=
=
null) {
break
label208;
}
this.M
=
((byte[])paramSelectionKey.clone());
return
;
bool
=
false;
break
;
label192:
paramSelectionKey
=
new byte[i];
System.arraycopy(arrayOfByte2,
0
, paramSelectionKey,
0
, i);
}
label208:
this.M
=
null;
}
private boolean a(ez paramez)
{
paramez
=
paramez.a();
if
(paramez !
=
null) {}
switch (paramez.a())
{
case
3
:
default:
return
true;
}
return
false;
}
private byte[] a(byte[] paramArrayOfByte, SocketChannel paramSocketChannel)
{
if
(paramArrayOfByte
=
=
null) {
paramSocketChannel
=
null;
}
do
{
return
paramSocketChannel;
paramSocketChannel
=
paramArrayOfByte;
}
while
(paramArrayOfByte.length <
2
);
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
if
(paramArrayOfByte.length <
2
) {}
for
(;;)
{
return
paramArrayOfByte;
byte[] arrayOfByte
=
new byte[
2
];
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
System.arraycopy(paramArrayOfByte,
0
, arrayOfByte,
0
,
2
);
if
(paramArrayOfByte.length >
2
)
{
paramSocketChannel
=
new byte[paramArrayOfByte.length
-
2
];
System.arraycopy(paramArrayOfByte,
2
, paramSocketChannel,
0
, paramArrayOfByte.length
-
2
);
}
int
i;
for
(;;)
{
i
=
fn.b(arrayOfByte);
if
(i !
=
0
) {
break
label112;
}
gu.c(
"[PC] HeartBeat Received..."
);
this.k
=
System.currentTimeMillis();
paramArrayOfByte
=
paramSocketChannel;
break
;
paramSocketChannel
=
new byte[
0
];
}
label112:
if
(i
=
=
6
)
{
paramArrayOfByte
=
fn.a(gx.a(String.valueOf(this.h.c()))
+
";2"
);
arrayOfByte
=
new byte[paramArrayOfByte.length
+
2
];
System.arraycopy(fn.c(fn.c(paramArrayOfByte.length)),
0
, arrayOfByte,
0
,
2
);
System.arraycopy(paramArrayOfByte,
0
, arrayOfByte,
2
, paramArrayOfByte.length);
this.C.a(arrayOfByte);
paramArrayOfByte
=
paramSocketChannel;
break
;
}
paramArrayOfByte
=
paramSocketChannel;
if
(i
=
=
7
) {
break
;
}
if
(paramSocketChannel.length >
=
i)
{
paramArrayOfByte
=
new byte[i];
System.arraycopy(paramSocketChannel,
0
, paramArrayOfByte,
0
, i);
this.C.a(y);
a(fl.a(paramArrayOfByte));
if
(paramSocketChannel.length
-
i >
0
)
{
paramArrayOfByte
=
new byte[paramSocketChannel.length
-
i];
System.arraycopy(paramSocketChannel, i, paramArrayOfByte,
0
, paramSocketChannel.length
-
i);
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
break
;
}
paramArrayOfByte
=
new byte[
0
];
break
;
}
paramArrayOfByte
=
new byte[paramSocketChannel.length
+
2
];
System.arraycopy(arrayOfByte,
0
, paramArrayOfByte,
0
,
2
);
if
(paramSocketChannel.length >
0
) {
System.arraycopy(paramSocketChannel,
0
, paramArrayOfByte,
2
, paramSocketChannel.length);
}
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
}
}
/
*
Error
*
/
private void c(
int
paramInt)
{
/
/
Byte code:
/
/
0
: iload_1
/
/
1
: iconst_3
/
/
2
: if_icmpgt
+
29
-
>
31
/
/
5
: new
224
java
/
lang
/
StringBuilder
/
/
8
: dup
/
/
9
: ldc_w
282
/
/
12
: invokespecial
245
java
/
lang
/
StringBuilder:<init> (Ljava
/
lang
/
String;)V
/
/
15
: iload_1
/
/
16
: invokevirtual
285
java
/
lang
/
StringBuilder:append (I)Ljava
/
lang
/
StringBuilder;
/
/
19
: ldc_w
287
/
/
22
: invokevirtual
251
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
String;)Ljava
/
lang
/
StringBuilder;
/
/
25
: invokevirtual
254
java
/
lang
/
StringBuilder:toString ()Ljava
/
lang
/
String;
/
/
28
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
31
: aload_0
/
/
32
: getfield
289
fa:G Z
/
/
35
: ifeq
+
64
-
>
99
/
/
38
: aload_0
/
/
39
: invokespecial
292
fa:n ()V
/
/
42
: iload_1
/
/
43
: iconst_3
/
/
44
: if_icmple
+
71
-
>
115
/
/
47
: aload_0
/
/
48
: monitorenter
/
/
49
: aload_0
/
/
50
: getfield
289
fa:G Z
/
/
53
: ifeq
+
25
-
>
78
/
/
56
: aload_0
/
/
57
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
60
: iconst_0
/
/
61
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
64
: aload_0
/
/
65
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
68
: iconst_0
/
/
69
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
72
: aload_0
/
/
73
: iconst_0
/
/
74
: aconst_null
/
/
75
: invokevirtual
298
fa:a (ILey;)V
/
/
78
: aload_0
/
/
79
: monitorexit
/
/
80
: aload_0
/
/
81
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
84
: astore
4
/
/
86
: aload
4
/
/
88
: monitorenter
/
/
89
: aload_0
/
/
90
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
93
: invokevirtual
301
java
/
lang
/
Object
:notify ()V
/
/
96
: aload
4
/
/
98
: monitorexit
/
/
99
:
return
/
/
100
: astore
4
/
/
102
: aload_0
/
/
103
: monitorexit
/
/
104
: aload
4
/
/
106
: athrow
/
/
107
: astore
5
/
/
109
: aload
4
/
/
111
: monitorexit
/
/
112
: aload
5
/
/
114
: athrow
/
/
115
: aload_0
/
/
116
: monitorenter
/
/
117
: aload_0
/
/
118
: getfield
289
fa:G Z
/
/
121
: ifeq
+
9
-
>
130
/
/
124
: aload_0
/
/
125
: iconst_2
/
/
126
: aconst_null
/
/
127
: invokevirtual
298
fa:a (ILey;)V
/
/
130
: aload_0
/
/
131
: monitorexit
/
/
132
: iload_1
/
/
133
: sipush
5000
/
/
136
: imul
/
/
137
: i2l
/
/
138
: lstore_2
/
/
139
: lload_2
/
/
140
: invokestatic
307
java
/
lang
/
Thread:sleep (J)V
/
/
143
: aload_0
/
/
144
: getfield
289
fa:G Z
/
/
147
: ifeq
-
48
-
>
99
/
/
150
: aload_0
/
/
151
: invokespecial
310
fa:l ()V
/
/
154
: aload_0
/
/
155
: getfield
289
fa:G Z
/
/
158
: ifeq
-
59
-
>
99
/
/
161
: new
224
java
/
lang
/
StringBuilder
/
/
164
: dup
/
/
165
: ldc_w
312
/
/
168
: invokespecial
245
java
/
lang
/
StringBuilder:<init> (Ljava
/
lang
/
String;)V
/
/
171
: aload_0
/
/
172
: getfield
115
fa:B Ljava
/
net
/
Socket;
/
/
175
: invokevirtual
318
java
/
net
/
Socket:getInetAddress ()Ljava
/
net
/
InetAddress;
/
/
178
: invokevirtual
321
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
Object
;)Ljava
/
lang
/
StringBuilder;
/
/
181
: ldc_w
323
/
/
184
: invokevirtual
251
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
String;)Ljava
/
lang
/
StringBuilder;
/
/
187
: aload_0
/
/
188
: getfield
115
fa:B Ljava
/
net
/
Socket;
/
/
191
: invokevirtual
326
java
/
net
/
Socket:getPort ()I
/
/
194
: invokevirtual
285
java
/
lang
/
StringBuilder:append (I)Ljava
/
lang
/
StringBuilder;
/
/
197
: invokevirtual
254
java
/
lang
/
StringBuilder:toString ()Ljava
/
lang
/
String;
/
/
200
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
203
: aload_0
/
/
204
: ldc_w
327
/
/
207
: invokevirtual
329
fa:b (I)V
/
/
210
: aload_0
/
/
211
: getfield
265
fa:C Lfa$b;
/
/
214
: invokevirtual
331
fa$b:b ()Z
/
/
217
: pop
/
/
218
: aload_0
/
/
219
: aconst_null
/
/
220
: putfield
90
fa:M [B
/
/
223
: aload_0
/
/
224
: getfield
88
fa:L Ljava
/
nio
/
ByteBuffer;
/
/
227
: invokevirtual
156
java
/
nio
/
ByteBuffer:clear ()Ljava
/
nio
/
Buffer
;
/
/
230
: pop
/
/
231
: aload_0
/
/
232
: getfield
276
fa:z Ljava
/
nio
/
channels
/
SocketChannel;
/
/
235
: aload_0
/
/
236
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
239
: iconst_1
/
/
240
: invokevirtual
337
java
/
nio
/
channels
/
SocketChannel:register (Ljava
/
nio
/
channels
/
Selector;I)Ljava
/
nio
/
channels
/
SelectionKey;
/
/
243
: pop
/
/
244
: aload_0
/
/
245
: monitorenter
/
/
246
: aload_0
/
/
247
: getfield
289
fa:G Z
/
/
250
: ifeq
+
25
-
>
275
/
/
253
: aload_0
/
/
254
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
257
: iconst_0
/
/
258
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
261
: aload_0
/
/
262
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
265
: iconst_0
/
/
266
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
269
: aload_0
/
/
270
: iconst_3
/
/
271
: aconst_null
/
/
272
: invokevirtual
298
fa:a (ILey;)V
/
/
275
: aload_0
/
/
276
: monitorexit
/
/
277
:
return
/
/
278
: astore
4
/
/
280
: aload_0
/
/
281
: monitorexit
/
/
282
: aload
4
/
/
284
: athrow
/
/
285
: astore
4
/
/
287
: aload_0
/
/
288
: aload
4
/
/
290
: invokespecial
339
fa:a (Lez;)Z
/
/
293
: ifeq
+
18
-
>
311
/
/
296
: aload_0
/
/
297
: iload_1
/
/
298
: iconst_1
/
/
299
: iadd
/
/
300
: invokespecial
341
fa:c (I)V
/
/
303
:
return
/
/
304
: astore
4
/
/
306
: aload_0
/
/
307
: monitorexit
/
/
308
: aload
4
/
/
310
: athrow
/
/
311
: aload_0
/
/
312
: aload
4
/
/
314
: invokevirtual
200
ez:a ()Ley;
/
/
317
: invokevirtual
344
fa:a (Ley;)V
/
/
320
:
return
/
/
321
: astore
4
/
/
323
: invokestatic
345
gx:b ()Z
/
/
326
: ifeq
+
11
-
>
337
/
/
329
: aload_0
/
/
330
: iload_1
/
/
331
: iconst_1
/
/
332
: iadd
/
/
333
: invokespecial
341
fa:c (I)V
/
/
336
:
return
/
/
337
: aload_0
/
/
338
: invokevirtual
348
fa:i ()V
/
/
341
:
return
/
/
342
: astore
4
/
/
344
: goto
-
201
-
>
143
/
/
Local variable table:
/
/
start length slot name signature
/
/
0
347
0
this fa
/
/
0
347
1
paramInt
int
/
/
138
2
2
l
long
/
/
84
13
4
localObject1
Object
/
/
100
10
4
localObject2
Object
/
/
278
5
4
localObject3
Object
/
/
285
4
4
localez ez
/
/
304
9
4
localObject4
Object
/
/
321
1
4
localException Exception
/
/
342
1
4
localInterruptedException InterruptedException
/
/
107
6
5
localObject5
Object
/
/
Exception table:
/
/
from
to target
type
/
/
49
78
100
finally
/
/
78
80
100
finally
/
/
102
104
100
finally
/
/
89
99
107
finally
/
/
109
112
107
finally
/
/
246
275
278
finally
/
/
275
277
278
finally
/
/
280
282
278
finally
/
/
150
246
285
ez
/
/
282
285
285
ez
/
/
117
130
304
finally
/
/
130
132
304
finally
/
/
306
308
304
finally
/
/
150
246
321
java
/
lang
/
Exception
/
/
282
285
321
java
/
lang
/
Exception
/
/
139
143
342
java
/
lang
/
InterruptedException
}
private void l()
{
System.setProperty(
"java.net.preferIPv4Stack"
,
"true"
);
System.setProperty(
"java.net.preferIPv6Addresses"
,
"false"
);
if
(this.A !
=
null) {}
try
{
if
(this.A.isOpen()) {
this.A.close();
}
this.A
=
Selector.
open
();
if
(this.z !
=
null) {}
try
{
this.z.close();
this.z
=
SocketChannel.
open
();
de localde;
if
(this.G)
{
if
(!gx.b()) {
break
label163;
}
localde
=
dd.a(gx.a(String.valueOf(this.h.c())));
if
(localde.e()) {
a(localde.a().replace(
"http://"
, ""), localde.b());
}
}
else
{
if
(this.G) {
break
label185;
}
return
;
}
this.i
=
null;
throw new ez(new ey(
3
, localde.f()));
label163:
gu.d(
"No network connection. Please check and reconnect."
);
throw new ez(new ey(
2
));
label185:
this.z.connect(this.i);
this.z.configureBlocking(false);
this.B
=
this.z.socket();
this.C
=
new fa.b(new BufferedOutputStream(this.B.getOutputStream()));
this.C.start();
return
;
}
catch (Exception localException1)
{
for
(;;) {}
}
}
catch (Exception localException2)
{
for
(;;) {}
}
}
private void m()
{
if
(gx.b())
{
try
{
if
(!this.G) {
return
;
}
if
(this.H.get()) {
return
;
}
}
finally
{}
this.H.
set
(true);
c(
1
);
return
;
}
a(new ey(
2
));
}
private void n()
{
gu.c(
"stop main network connection"
);
f();
if
(this.C !
=
null)
{
this.C.a();
this.C
=
null;
}
if
((gx.l() >
=
8
) && (this.A !
=
null)) {}
try
{
this.A.close();
}
catch (Exception localException1)
{
for
(;;)
{
gu.d(
"Error in closing socketSelector"
);
localException1.printStackTrace();
this.A
=
null;
}
}
finally
{
this.A
=
null;
}
if
(this.B !
=
null) {}
try
{
this.B.close();
}
catch (Exception localException2)
{
for
(;;)
{
gu.d(
"Error in closing socket"
);
localException2.printStackTrace();
this.B
=
null;
}
}
finally
{
this.B
=
null;
}
if
(this.z !
=
null) {}
try
{
this.z.close();
SelectionKey localSelectionKey
=
this.z.keyFor(this.A);
if
(localSelectionKey !
=
null) {
localSelectionKey.cancel();
}
}
catch (Exception localException3)
{
for
(;;)
{
gu.d(
"Error in closing socketChannel"
);
localException3.printStackTrace();
this.z
=
null;
}
}
finally
{
this.z
=
null;
}
this.j.clear();
a(
0
, null);
}
/
*
Error
*
/
public void a(ey arg1)
{
/
/
Byte code:
/
/
0
: aload_0
/
/
1
: monitorenter
/
/
2
: aload_0
/
/
3
: getfield
289
fa:G Z
/
/
6
: istore_2
/
/
7
: iload_2
/
/
8
: ifne
+
6
-
>
14
/
/
11
: aload_0
/
/
12
: monitorexit
/
/
13
:
return
/
/
14
: aload_0
/
/
15
: iconst_0
/
/
16
: putfield
289
fa:G Z
/
/
19
: aload_0
/
/
20
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
23
: iconst_0
/
/
24
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
27
: aload_0
/
/
28
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
31
: iconst_0
/
/
32
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
35
: aload_0
/
/
36
: iconst_0
/
/
37
: aload_1
/
/
38
: invokevirtual
298
fa:a (ILey;)V
/
/
41
: aload_0
/
/
42
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
45
: ifnull
+
26
-
>
71
/
/
48
: aload_0
/
/
49
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
52
: invokevirtual
482
java
/
lang
/
Thread:interrupt ()V
/
/
55
: aload_0
/
/
56
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
59
: astore_1
/
/
60
: aload_1
/
/
61
: monitorenter
/
/
62
: aload_0
/
/
63
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
66
: invokevirtual
301
java
/
lang
/
Object
:notify ()V
/
/
69
: aload_1
/
/
70
: monitorexit
/
/
71
: ldc_w
484
/
/
74
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
77
: goto
-
66
-
>
11
/
/
80
: astore_1
/
/
81
: aload_0
/
/
82
: monitorexit
/
/
83
: aload_1
/
/
84
: athrow
/
/
85
: astore_3
/
/
86
: aload_1
/
/
87
: monitorexit
/
/
88
: aload_3
/
/
89
: athrow
/
/
Local variable table:
/
/
start length slot name signature
/
/
0
90
0
this fa
/
/
6
2
2
bool
boolean
/
/
85
4
3
localObject
Object
/
/
Exception table:
/
/
from
to target
type
/
/
2
7
80
finally
/
/
14
62
80
finally
/
/
71
77
80
finally
/
/
88
90
80
finally
/
/
62
71
85
finally
/
/
86
88
85
finally
}
public void g()
{
try
{
if
((this.D !
=
null) && (!this.D.isInterrupted())) {
return
;
}
if
(this.H.get()) {
return
;
}
}
finally
{}
this.H.
set
(true);
synchronized (this.F)
{
Thread localThread
=
this.D;
if
(localThread !
=
null) {}
try
{
this.F.wait();
this.D
=
null;
try
{
this.I.
set
(false);
a(
2
, null);
this.G
=
true;
this.D
=
new Thread(this);
this.D.start();
return
;
}
finally
{}
}
catch (InterruptedException localInterruptedException)
{
for
(;;)
{
localInterruptedException.printStackTrace();
}
}
}
}
/
*
Error
*
/
public void h()
{
/
/
Byte code:
/
/
0
: aload_0
/
/
1
: monitorenter
/
/
2
: aload_0
/
/
3
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
6
: invokevirtual
447
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:get ()Z
/
/
9
: ifeq
+
6
-
>
15
/
/
12
: aload_0
/
/
13
: monitorexit
/
/
14
:
return
/
/
15
: aload_0
/
/
16
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
19
: ifnull
+
17
-
>
36
/
/
22
: aload_0
/
/
23
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
26
: invokevirtual
488
java
/
lang
/
Thread:isInterrupted ()Z
/
/
29
: ifne
+
7
-
>
36
/
/
32
: aload_0
/
/
33
: invokevirtual
348
fa:i ()V
/
/
36
: aload_0
/
/
37
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
40
: iconst_1
/
/
41
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
44
: aload_0
/
/
45
: monitorexit
/
/
46
: aload_0
/
/
47
: getfield
80
fa:F Ljava
/
lang
/
Object
;
/
/
50
: astore_1
/
/
51
: aload_1
/
/
52
: monitorenter
/
/
53
: aload_0
/
/
54
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
57
: astore_2
/
/
58
: aload_2
/
/
59
: ifnull
+
10
-
>
69
/
/
62
: aload_0
/
/
63
: getfield
80
fa:F Ljava
/
lang
/
Object
;
/
/
66
: invokevirtual
491
java
/
lang
/
Object
:wait ()V
/
/
69
: aload_0
/
/
70
: aconst_null
/
/
71
: putfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
74
: aload_1
/
/
75
: monitorexit
/
/
76
: aload_0
/
/
77
: monitorenter
/
/
78
: aload_0
/
/
79
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
82
: iconst_0
/
/
83
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
86
: aload_0
/
/
87
: iconst_2
/
/
88
: aconst_null
/
/
89
: invokevirtual
298
fa:a (ILey;)V
/
/
92
: aload_0
/
/
93
: iconst_1
/
/
94
: putfield
289
fa:G Z
/
/
97
: aload_0
/
/
98
: new
303
java
/
lang
/
Thread
/
/
101
: dup
/
/
102
: aload_0
/
/
103
: invokespecial
494
java
/
lang
/
Thread:<init> (Ljava
/
lang
/
Runnable;)V
/
/
106
: putfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
109
: aload_0
/
/
110
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
113
: invokevirtual
495
java
/
lang
/
Thread:start ()V
/
/
116
: ldc_w
498
/
/
119
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
122
: aload_0
/
/
123
: monitorexit
/
/
124
:
return
/
/
125
: astore_1
/
/
126
: aload_0
/
/
127
: monitorexit
/
/
128
: aload_1
/
/
129
: athrow
/
/
130
: astore_1
/
/
131
: aload_0
/
/
132
: monitorexit
/
/
133
: aload_1
/
/
134
: athrow
/
/
135
: astore_2
/
/
136
: aload_2
/
/
137
: invokevirtual
496
java
/
lang
/
InterruptedException:printStackTrace ()V
/
/
140
: goto
-
71
-
>
69
/
/
143
: astore_2
/
/
144
: aload_1
/
/
145
: monitorexit
/
/
146
: aload_2
/
/
147
: athrow
/
/
Local variable table:
/
/
start length slot name signature
/
/
0
148
0
this fa
/
/
125
4
1
localObject2
Object
/
/
130
15
1
localObject3
Object
/
/
57
2
2
localThread Thread
/
/
135
2
2
localInterruptedException InterruptedException
/
/
143
4
2
localObject4
Object
/
/
Exception table:
/
/
from
to target
type
/
/
78
124
125
finally
/
/
126
128
125
finally
/
/
2
14
130
finally
/
/
15
36
130
finally
/
/
36
46
130
finally
/
/
131
133
130
finally
/
/
62
69
135
java
/
lang
/
InterruptedException
/
/
53
58
143
finally
/
/
62
69
143
finally
/
/
69
76
143
finally
/
/
136
140
143
finally
/
/
144
146
143
finally
}
public void i()
{
try
{
a(null);
return
;
}
finally
{
localObject
=
finally
;
throw ((Throwable)localObject);
}
}
protected void j()
{
gu.c(
"Heart beat timeout. Close and reconnect."
);
gu.f(
"Push connection heart beat timeout"
);
if
(this.G) {
m();
}
}
public boolean k()
{
boolean
bool
=
false;
for
(;;)
{
try
{
int
i
=
this.e;
if
(i !
=
3
) {
return
bool
;
}
if
(this.k !
=
0L
)
{
if
(System.currentTimeMillis()
-
this.k >
600000L
) {
j();
}
}
else
{
this.k
=
System.currentTimeMillis();
}
}
finally
{}
if
(this.C !
=
null) {
bool
=
this.C.b();
}
}
}
/
*
Error
*
/
public void run()
{
/
/
Byte code:
/
/
0
: aload_0
/
/
1
: invokespecial
310
fa:l ()V
/
/
4
: aload_0
/
/
5
: getfield
289
fa:G Z
/
/
8
: ifeq
+
119
-
>
127
/
/
11
: new
224
java
/
lang
/
StringBuilder
/
/
14
: dup
/
/
15
: ldc_w
312
/
/
18
: invokespecial
245
java
/
lang
/
StringBuilder:<init> (Ljava
/
lang
/
String;)V
/
/
21
: aload_0
/
/
22
: getfield
115
fa:B Ljava
/
net
/
Socket;
/
/
25
: invokevirtual
318
java
/
net
/
Socket:getInetAddress ()Ljava
/
net
/
InetAddress;
/
/
28
: invokevirtual
321
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
Object
;)Ljava
/
lang
/
StringBuilder;
/
/
31
: ldc_w
323
/
/
34
: invokevirtual
251
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
String;)Ljava
/
lang
/
StringBuilder;
/
/
37
: aload_0
/
/
38
: getfield
115
fa:B Ljava
/
net
/
Socket;
/
/
41
: invokevirtual
326
java
/
net
/
Socket:getPort ()I
/
/
44
: invokevirtual
285
java
/
lang
/
StringBuilder:append (I)Ljava
/
lang
/
StringBuilder;
/
/
47
: invokevirtual
254
java
/
lang
/
StringBuilder:toString ()Ljava
/
lang
/
String;
/
/
50
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
53
: aload_0
/
/
54
: ldc_w
327
/
/
57
: invokevirtual
329
fa:b (I)V
/
/
60
: aload_0
/
/
61
: getfield
265
fa:C Lfa$b;
/
/
64
: invokevirtual
331
fa$b:b ()Z
/
/
67
: pop
/
/
68
: aload_0
/
/
69
: aconst_null
/
/
70
: putfield
90
fa:M [B
/
/
73
: aload_0
/
/
74
: getfield
88
fa:L Ljava
/
nio
/
ByteBuffer;
/
/
77
: invokevirtual
156
java
/
nio
/
ByteBuffer:clear ()Ljava
/
nio
/
Buffer
;
/
/
80
: pop
/
/
81
: aload_0
/
/
82
: getfield
276
fa:z Ljava
/
nio
/
channels
/
SocketChannel;
/
/
85
: aload_0
/
/
86
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
89
: iconst_1
/
/
90
: invokevirtual
337
java
/
nio
/
channels
/
SocketChannel:register (Ljava
/
nio
/
channels
/
Selector;I)Ljava
/
nio
/
channels
/
SelectionKey;
/
/
93
: pop
/
/
94
: aload_0
/
/
95
: monitorenter
/
/
96
: aload_0
/
/
97
: getfield
289
fa:G Z
/
/
100
: ifeq
+
25
-
>
125
/
/
103
: aload_0
/
/
104
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
107
: iconst_0
/
/
108
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
111
: aload_0
/
/
112
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
115
: iconst_0
/
/
116
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
119
: aload_0
/
/
120
: iconst_3
/
/
121
: aconst_null
/
/
122
: invokevirtual
298
fa:a (ILey;)V
/
/
125
: aload_0
/
/
126
: monitorexit
/
/
127
: iconst_0
/
/
128
: istore_2
/
/
129
: aload_0
/
/
130
: getfield
289
fa:G Z
/
/
133
: ifne
+
99
-
>
232
/
/
136
: aload_0
/
/
137
: getfield
80
fa:F Ljava
/
lang
/
Object
;
/
/
140
: astore
4
/
/
142
: aload
4
/
/
144
: monitorenter
/
/
145
: aload_0
/
/
146
: invokespecial
292
fa:n ()V
/
/
149
: aload_0
/
/
150
: aconst_null
/
/
151
: putfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
154
: aload_0
/
/
155
: getfield
80
fa:F Ljava
/
lang
/
Object
;
/
/
158
: invokevirtual
514
java
/
lang
/
Object
:notifyAll ()V
/
/
161
: aload
4
/
/
163
: monitorexit
/
/
164
:
return
/
/
165
: astore
4
/
/
167
: aload_0
/
/
168
: monitorexit
/
/
169
: aload
4
/
/
171
: athrow
/
/
172
: astore
4
/
/
174
: invokestatic
345
gx:b ()Z
/
/
177
: ifeq
+
20
-
>
197
/
/
180
: aload_0
/
/
181
: aload
4
/
/
183
: invokespecial
339
fa:a (Lez;)Z
/
/
186
: ifeq
+
11
-
>
197
/
/
189
: aload_0
/
/
190
: iconst_1
/
/
191
: invokespecial
341
fa:c (I)V
/
/
194
: goto
-
67
-
>
127
/
/
197
: aload_0
/
/
198
: aload
4
/
/
200
: invokevirtual
200
ez:a ()Ley;
/
/
203
: invokevirtual
344
fa:a (Ley;)V
/
/
206
: goto
-
79
-
>
127
/
/
209
: astore
4
/
/
211
: invokestatic
345
gx:b ()Z
/
/
214
: ifeq
+
11
-
>
225
/
/
217
: aload_0
/
/
218
: iconst_1
/
/
219
: invokespecial
341
fa:c (I)V
/
/
222
: goto
-
95
-
>
127
/
/
225
: aload_0
/
/
226
: invokevirtual
348
fa:i ()V
/
/
229
: goto
-
102
-
>
127
/
/
232
: iload_2
/
/
233
: istore_1
/
/
234
: aload_0
/
/
235
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
238
: invokevirtual
447
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:get ()Z
/
/
241
: ifne
+
62
-
>
303
/
/
244
: iload_2
/
/
245
: istore_1
/
/
246
: aload_0
/
/
247
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
250
: invokevirtual
517
java
/
nio
/
channels
/
Selector:select ()I
/
/
253
: istore_3
/
/
254
: iload_3
/
/
255
: ifne
+
138
-
>
393
/
/
258
: iload_2
/
/
259
: iconst_1
/
/
260
: iadd
/
/
261
: istore_2
/
/
262
: iload_2
/
/
263
: istore_1
/
/
264
: iload_2
/
/
265
: bipush
10
/
/
267
: if_icmple
+
36
-
>
303
/
/
270
: aload_0
/
/
271
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
274
: invokevirtual
370
java
/
nio
/
channels
/
Selector:close ()V
/
/
277
: iload_2
/
/
278
: istore_1
/
/
279
: aload_0
/
/
280
: invokestatic
374
java
/
nio
/
channels
/
Selector:
open
()Ljava
/
nio
/
channels
/
Selector;
/
/
283
: putfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
286
: iload_2
/
/
287
: istore_1
/
/
288
: aload_0
/
/
289
: getfield
276
fa:z Ljava
/
nio
/
channels
/
SocketChannel;
/
/
292
: aload_0
/
/
293
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
296
: iconst_1
/
/
297
: invokevirtual
337
java
/
nio
/
channels
/
SocketChannel:register (Ljava
/
nio
/
channels
/
Selector;I)Ljava
/
nio
/
channels
/
SelectionKey;
/
/
300
: pop
/
/
301
: iconst_0
/
/
302
: istore_1
/
/
303
: iload_1
/
/
304
: istore_2
/
/
305
: aload_0
/
/
306
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
309
: invokevirtual
447
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:get ()Z
/
/
312
: ifeq
-
183
-
>
129
/
/
315
: iload_1
/
/
316
: istore_2
/
/
317
: aload_0
/
/
318
: getfield
289
fa:G Z
/
/
321
: ifeq
-
192
-
>
129
/
/
324
: aload_0
/
/
325
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
328
: astore
4
/
/
330
: aload
4
/
/
332
: monitorenter
/
/
333
: aload_0
/
/
334
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
337
: ldc2_w
518
/
/
340
: invokevirtual
521
java
/
lang
/
Object
:wait (J)V
/
/
343
: aload
4
/
/
345
: monitorexit
/
/
346
: aload_0
/
/
347
: getfield
289
fa:G Z
/
/
350
: ifeq
-
47
-
>
303
/
/
353
: aload_0
/
/
354
: invokespecial
352
fa:m ()V
/
/
357
: goto
-
54
-
>
303
/
/
360
: astore
4
/
/
362
: iload_2
/
/
363
: istore_1
/
/
364
: aload
4
/
/
366
: invokevirtual
473
java
/
lang
/
Exception:printStackTrace ()V
/
/
369
: goto
-
92
-
>
277
/
/
372
: astore
4
/
/
374
: aload
4
/
/
376
: invokevirtual
473
java
/
lang
/
Exception:printStackTrace ()V
/
/
379
: aload_0
/
/
380
: getfield
289
fa:G Z
/
/
383
: ifeq
-
247
-
>
136
/
/
386
: aload_0
/
/
387
: invokespecial
352
fa:m ()V
/
/
390
: goto
-
87
-
>
303
/
/
393
: aload_0
/
/
394
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
397
: invokevirtual
525
java
/
nio
/
channels
/
Selector:selectedKeys ()Ljava
/
util
/
Set
;
/
/
400
: invokeinterface
531
1
0
/
/
405
: astore
4
/
/
407
: aload
4
/
/
409
: invokeinterface
536
1
0
/
/
414
: ifeq
+
99
-
>
513
/
/
417
: aload_0
/
/
418
: getfield
289
fa:G Z
/
/
421
: ifne
+
8
-
>
429
/
/
424
: iconst_0
/
/
425
: istore_1
/
/
426
: goto
-
123
-
>
303
/
/
429
: aload
4
/
/
431
: invokeinterface
539
1
0
/
/
436
: checkcast
146
java
/
nio
/
channels
/
SelectionKey
/
/
439
: astore
5
/
/
441
: aload
4
/
/
443
: invokeinterface
542
1
0
/
/
448
: aload
5
/
/
450
: invokevirtual
545
java
/
nio
/
channels
/
SelectionKey:isValid ()Z
/
/
453
: ifeq
-
46
-
>
407
/
/
456
: aload
5
/
/
458
: invokevirtual
548
java
/
nio
/
channels
/
SelectionKey:isReadable ()Z
/
/
461
: ifeq
-
54
-
>
407
/
/
464
: aload_0
/
/
465
: getfield
289
fa:G Z
/
/
468
: ifeq
-
61
-
>
407
/
/
471
: aload_0
/
/
472
: aload
5
/
/
474
: invokespecial
550
fa:a (Ljava
/
nio
/
channels
/
SelectionKey;)V
/
/
477
: goto
-
70
-
>
407
/
/
480
: astore
4
/
/
482
: iconst_0
/
/
483
: istore_1
/
/
484
: goto
-
110
-
>
374
/
/
487
: astore
5
/
/
489
: aload
5
/
/
491
: invokevirtual
496
java
/
lang
/
InterruptedException:printStackTrace ()V
/
/
494
: goto
-
151
-
>
343
/
/
497
: astore
5
/
/
499
: aload
4
/
/
501
: monitorexit
/
/
502
: aload
5
/
/
504
: athrow
/
/
505
: astore
5
/
/
507
: aload
4
/
/
509
: monitorexit
/
/
510
: aload
5
/
/
512
: athrow
/
/
513
: iconst_0
/
/
514
: istore_1
/
/
515
: goto
-
212
-
>
303
/
/
Local variable table:
/
/
start length slot name signature
/
/
0
518
0
this fa
/
/
233
282
1
i
int
/
/
128
235
2
j
int
/
/
253
2
3
k
int
/
/
140
22
4
localObject1
Object
/
/
165
5
4
localObject2
Object
/
/
172
27
4
localez ez
/
/
209
1
4
localException1 Exception
/
/
360
5
4
localException2 Exception
/
/
372
3
4
localException3 Exception
/
/
405
37
4
localIterator java.util.Iterator
/
/
480
28
4
localException4 Exception
/
/
439
34
5
localSelectionKey SelectionKey
/
/
487
3
5
localInterruptedException InterruptedException
/
/
497
6
5
localObject4
Object
/
/
505
6
5
localObject5
Object
/
/
Exception table:
/
/
from
to target
type
/
/
96
125
165
finally
/
/
125
127
165
finally
/
/
167
169
165
finally
/
/
0
96
172
ez
/
/
169
172
172
ez
/
/
0
96
209
java
/
lang
/
Exception
/
/
169
172
209
java
/
lang
/
Exception
/
/
270
277
360
java
/
lang
/
Exception
/
/
246
254
372
java
/
lang
/
Exception
/
/
279
286
372
java
/
lang
/
Exception
/
/
288
301
372
java
/
lang
/
Exception
/
/
364
369
372
java
/
lang
/
Exception
/
/
393
407
480
java
/
lang
/
Exception
/
/
407
424
480
java
/
lang
/
Exception
/
/
429
477
480
java
/
lang
/
Exception
/
/
333
343
487
java
/
lang
/
InterruptedException
/
/
333
343
497
finally
/
/
343
346
497
finally
/
/
489
494
497
finally
/
/
499
502
497
finally
/
/
145
164
505
finally
/
/
507
510
505
finally
}
class
a
extends Thread
{
private Queue c
=
new LinkedList();
private volatile boolean d
=
true;
static
{
if
(!fa.
class
.desiredAssertionStatus()) {}
for
(boolean
bool
=
true;;
bool
=
false)
{
b
=
bool
;
return
;
}
}
private a() {}
public void a()
{
this.d
=
false;
interrupt();
for
(;;)
{
synchronized (this.c)
{
this.c.notifyAll();
if
(this.c.isEmpty()) {
return
;
}
}
???
=
(fc)this.c.poll();
fa.this.h.b((fc)???);
}
}
public void a(fc paramfc)
{
if
((!b) && (paramfc
=
=
null)) {
throw new AssertionError();
}
synchronized (this.c)
{
this.c.add(paramfc);
this.c.notifyAll();
return
;
}
}
public void run()
{
for
(;;)
{
if
(!this.d) {
return
;
}
synchronized (this.c)
{
boolean
bool
=
this.c.isEmpty();
if
(!
bool
) {}
}
try
{
this.c.wait();
if
(this.c.isEmpty())
{
continue
;
localObject
=
finally
;
throw ((Throwable)localObject);
}
}
catch (InterruptedException localInterruptedException)
{
while
(localInterruptedException.getMessage()
=
=
null) {}
gu.d(localInterruptedException.getMessage());
return
;
}
fc localfc
=
(fc)this.c.poll();
fa.this.h.b(localfc);
}
}
}
class
b
extends Thread
{
private volatile boolean c;
private BufferedOutputStream d;
private ConcurrentLinkedQueue e
=
new ConcurrentLinkedQueue();
static
{
if
(!fa.
class
.desiredAssertionStatus()) {}
for
(boolean
bool
=
true;;
bool
=
false)
{
b
=
bool
;
return
;
}
}
public b(BufferedOutputStream paramBufferedOutputStream)
{
if
((!b) && (fa.a(fa.this)
=
=
null)) {
throw new AssertionError();
}
this.c
=
true;
this.d
=
paramBufferedOutputStream;
}
private boolean b(byte[] paramArrayOfByte)
{
if
((!b) && (paramArrayOfByte
=
=
null)) {
throw new AssertionError();
}
if
(!this.c) {
return
false;
}
for
(;;)
{
synchronized (fa.b(fa.this))
{
try
{
Object
localObject
=
ByteBuffer.wrap(paramArrayOfByte);
if
((!((ByteBuffer)localObject).hasRemaining()) || (!this.c))
{
if
(!((ByteBuffer)localObject).hasRemaining())
{
localObject
=
fa.c(fa.this);
long
l
=
paramArrayOfByte.length;
if
(gx.d() !
=
1
) {
break
label160;
}
bool
=
true;
((gt)localObject).a(l,
bool
);
}
return
true;
}
fa.b(fa.this).write((ByteBuffer)localObject);
continue
;
gu.d(paramArrayOfByte.getMessage());
}
catch (Exception paramArrayOfByte)
{
if
(paramArrayOfByte.getMessage()
=
=
null) {
break
label166;
}
}
if
(this.c) {
fa.d(fa.this);
}
return
false;
}
label160:
boolean
bool
=
false;
continue
;
label166:
gu.d(
"Fail to retrieve the output stream"
);
}
}
public void a()
{
synchronized (this.e)
{
this.c
=
false;
this.e.notifyAll();
interrupt();
try
{
this.d.close();
return
;
}
catch (IOException localIOException)
{
for
(;;)
{
gu.d(
"Error in closing output stream"
);
}
}
}
}
public void a(byte[] paramArrayOfByte)
{
synchronized (this.e)
{
if
(this.c)
{
this.e.add(paramArrayOfByte);
this.e.notifyAll();
}
return
;
}
}
public boolean b()
{
gu.c(
"[PC] Sending heart beat..."
);
return
b(ev.d);
}
public void run()
{
for
(;;)
{
if
((!this.c) || (isInterrupted()) || (!fa.a(fa.this).isConnected()) || (fa.a(fa.this).isOutputShutdown()) || (fa.a(fa.this).isClosed())) {
return
;
}
synchronized (this.e)
{
boolean
bool
=
this.e.isEmpty();
if
(!
bool
) {}
}
try
{
this.e.wait();
if
(this.e.isEmpty())
{
continue
;
localObject
=
finally
;
throw ((Throwable)localObject);
}
}
catch (InterruptedException localInterruptedException)
{
while
(localInterruptedException.getMessage()
=
=
null) {}
gu.d(localInterruptedException.getMessage());
return
;
}
byte[] arrayOfByte
=
(byte[])this.e.poll();
b(arrayOfByte);
}
}
}
}
import
com.gtomato.talkbox.TalkBoxApplication;
import
java.io.BufferedOutputStream;
import
java.io.IOException;
import
java.net.Socket;
import
java.nio.ByteBuffer;
import
java.nio.channels.SelectableChannel;
import
java.nio.channels.SelectionKey;
import
java.nio.channels.Selector;
import
java.nio.channels.SocketChannel;
import
java.util.LinkedList;
import
java.util.Queue;
import
java.util.concurrent.ConcurrentLinkedQueue;
import
java.util.concurrent.atomic.AtomicBoolean;
public
class
fa
extends et
implements Runnable
{
private static final
int
r
=
30000
;
private static final
int
s
=
10000
;
private static final
int
t
=
1
;
private static final
int
u
=
3
;
private static final
int
v
=
10
;
private static final short w
=
6
;
private static final short x
=
7
;
private static final byte[] y;
private Selector A;
private Socket B;
private fa.b C;
private Thread D;
private final
Object
E
=
new
Object
();
private final
Object
F
=
new
Object
();
private volatile boolean G;
private AtomicBoolean H
=
new AtomicBoolean(false);
private AtomicBoolean I
=
new AtomicBoolean(false);
private gt J
=
gt.a();
private TalkBoxApplication K
=
gx.b;
private ByteBuffer L
=
ByteBuffer.allocate(
8192
);
private byte[] M
=
null;
private SocketChannel z;
static
{
if
(!fa.
class
.desiredAssertionStatus()) {}
for
(boolean
bool
=
true;;
bool
=
false)
{
q
=
bool
;
byte[] arrayOfByte
=
new byte[
2
];
arrayOfByte[
0
]
=
1
;
y
=
arrayOfByte;
return
;
}
}
public fa(gj paramgj)
{
super
(paramgj);
}
private void a(fl paramfl)
{
if
((!q) && (paramfl
=
=
null)) {
throw new AssertionError();
}
this.K.a(paramfl.c(), paramfl.a(), paramfl.b(), paramfl.d(), paramfl.e());
}
private void a(SelectionKey paramSelectionKey)
{
boolean
bool
=
true;
SocketChannel localSocketChannel
=
(SocketChannel)paramSelectionKey.channel();
this.L.clear();
int
i;
try
{
i
=
localSocketChannel.read(this.L);
if
(i
=
=
-
1
)
{
paramSelectionKey.channel().close();
paramSelectionKey.cancel();
throw new IOException();
}
}
catch (Exception localException)
{
paramSelectionKey.cancel();
localSocketChannel.close();
throw localException;
}
paramSelectionKey
=
this.J;
long
l
=
i;
byte[] arrayOfByte2;
if
(gx.d()
=
=
1
)
{
paramSelectionKey.b(l,
bool
);
paramSelectionKey
=
(byte[])null;
paramSelectionKey
=
(byte[])null;
if
(this.M !
=
null) {
paramSelectionKey
=
(byte[])this.M.clone();
}
arrayOfByte2
=
this.L.array();
if
(paramSelectionKey
=
=
null) {
break
label192;
}
byte[] arrayOfByte1
=
new byte[paramSelectionKey.length
+
i];
System.arraycopy(paramSelectionKey,
0
, arrayOfByte1,
0
, paramSelectionKey.length);
System.arraycopy(arrayOfByte2,
0
, arrayOfByte1, paramSelectionKey.length, i);
paramSelectionKey
=
arrayOfByte1;
}
for
(;;)
{
paramSelectionKey
=
a(paramSelectionKey, localSocketChannel);
if
(paramSelectionKey
=
=
null) {
break
label208;
}
this.M
=
((byte[])paramSelectionKey.clone());
return
;
bool
=
false;
break
;
label192:
paramSelectionKey
=
new byte[i];
System.arraycopy(arrayOfByte2,
0
, paramSelectionKey,
0
, i);
}
label208:
this.M
=
null;
}
private boolean a(ez paramez)
{
paramez
=
paramez.a();
if
(paramez !
=
null) {}
switch (paramez.a())
{
case
3
:
default:
return
true;
}
return
false;
}
private byte[] a(byte[] paramArrayOfByte, SocketChannel paramSocketChannel)
{
if
(paramArrayOfByte
=
=
null) {
paramSocketChannel
=
null;
}
do
{
return
paramSocketChannel;
paramSocketChannel
=
paramArrayOfByte;
}
while
(paramArrayOfByte.length <
2
);
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
if
(paramArrayOfByte.length <
2
) {}
for
(;;)
{
return
paramArrayOfByte;
byte[] arrayOfByte
=
new byte[
2
];
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
System.arraycopy(paramArrayOfByte,
0
, arrayOfByte,
0
,
2
);
if
(paramArrayOfByte.length >
2
)
{
paramSocketChannel
=
new byte[paramArrayOfByte.length
-
2
];
System.arraycopy(paramArrayOfByte,
2
, paramSocketChannel,
0
, paramArrayOfByte.length
-
2
);
}
int
i;
for
(;;)
{
i
=
fn.b(arrayOfByte);
if
(i !
=
0
) {
break
label112;
}
gu.c(
"[PC] HeartBeat Received..."
);
this.k
=
System.currentTimeMillis();
paramArrayOfByte
=
paramSocketChannel;
break
;
paramSocketChannel
=
new byte[
0
];
}
label112:
if
(i
=
=
6
)
{
paramArrayOfByte
=
fn.a(gx.a(String.valueOf(this.h.c()))
+
";2"
);
arrayOfByte
=
new byte[paramArrayOfByte.length
+
2
];
System.arraycopy(fn.c(fn.c(paramArrayOfByte.length)),
0
, arrayOfByte,
0
,
2
);
System.arraycopy(paramArrayOfByte,
0
, arrayOfByte,
2
, paramArrayOfByte.length);
this.C.a(arrayOfByte);
paramArrayOfByte
=
paramSocketChannel;
break
;
}
paramArrayOfByte
=
paramSocketChannel;
if
(i
=
=
7
) {
break
;
}
if
(paramSocketChannel.length >
=
i)
{
paramArrayOfByte
=
new byte[i];
System.arraycopy(paramSocketChannel,
0
, paramArrayOfByte,
0
, i);
this.C.a(y);
a(fl.a(paramArrayOfByte));
if
(paramSocketChannel.length
-
i >
0
)
{
paramArrayOfByte
=
new byte[paramSocketChannel.length
-
i];
System.arraycopy(paramSocketChannel, i, paramArrayOfByte,
0
, paramSocketChannel.length
-
i);
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
break
;
}
paramArrayOfByte
=
new byte[
0
];
break
;
}
paramArrayOfByte
=
new byte[paramSocketChannel.length
+
2
];
System.arraycopy(arrayOfByte,
0
, paramArrayOfByte,
0
,
2
);
if
(paramSocketChannel.length >
0
) {
System.arraycopy(paramSocketChannel,
0
, paramArrayOfByte,
2
, paramSocketChannel.length);
}
paramArrayOfByte
=
(byte[])paramArrayOfByte.clone();
}
}
/
*
Error
*
/
private void c(
int
paramInt)
{
/
/
Byte code:
/
/
0
: iload_1
/
/
1
: iconst_3
/
/
2
: if_icmpgt
+
29
-
>
31
/
/
5
: new
224
java
/
lang
/
StringBuilder
/
/
8
: dup
/
/
9
: ldc_w
282
/
/
12
: invokespecial
245
java
/
lang
/
StringBuilder:<init> (Ljava
/
lang
/
String;)V
/
/
15
: iload_1
/
/
16
: invokevirtual
285
java
/
lang
/
StringBuilder:append (I)Ljava
/
lang
/
StringBuilder;
/
/
19
: ldc_w
287
/
/
22
: invokevirtual
251
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
String;)Ljava
/
lang
/
StringBuilder;
/
/
25
: invokevirtual
254
java
/
lang
/
StringBuilder:toString ()Ljava
/
lang
/
String;
/
/
28
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
31
: aload_0
/
/
32
: getfield
289
fa:G Z
/
/
35
: ifeq
+
64
-
>
99
/
/
38
: aload_0
/
/
39
: invokespecial
292
fa:n ()V
/
/
42
: iload_1
/
/
43
: iconst_3
/
/
44
: if_icmple
+
71
-
>
115
/
/
47
: aload_0
/
/
48
: monitorenter
/
/
49
: aload_0
/
/
50
: getfield
289
fa:G Z
/
/
53
: ifeq
+
25
-
>
78
/
/
56
: aload_0
/
/
57
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
60
: iconst_0
/
/
61
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
64
: aload_0
/
/
65
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
68
: iconst_0
/
/
69
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
72
: aload_0
/
/
73
: iconst_0
/
/
74
: aconst_null
/
/
75
: invokevirtual
298
fa:a (ILey;)V
/
/
78
: aload_0
/
/
79
: monitorexit
/
/
80
: aload_0
/
/
81
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
84
: astore
4
/
/
86
: aload
4
/
/
88
: monitorenter
/
/
89
: aload_0
/
/
90
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
93
: invokevirtual
301
java
/
lang
/
Object
:notify ()V
/
/
96
: aload
4
/
/
98
: monitorexit
/
/
99
:
return
/
/
100
: astore
4
/
/
102
: aload_0
/
/
103
: monitorexit
/
/
104
: aload
4
/
/
106
: athrow
/
/
107
: astore
5
/
/
109
: aload
4
/
/
111
: monitorexit
/
/
112
: aload
5
/
/
114
: athrow
/
/
115
: aload_0
/
/
116
: monitorenter
/
/
117
: aload_0
/
/
118
: getfield
289
fa:G Z
/
/
121
: ifeq
+
9
-
>
130
/
/
124
: aload_0
/
/
125
: iconst_2
/
/
126
: aconst_null
/
/
127
: invokevirtual
298
fa:a (ILey;)V
/
/
130
: aload_0
/
/
131
: monitorexit
/
/
132
: iload_1
/
/
133
: sipush
5000
/
/
136
: imul
/
/
137
: i2l
/
/
138
: lstore_2
/
/
139
: lload_2
/
/
140
: invokestatic
307
java
/
lang
/
Thread:sleep (J)V
/
/
143
: aload_0
/
/
144
: getfield
289
fa:G Z
/
/
147
: ifeq
-
48
-
>
99
/
/
150
: aload_0
/
/
151
: invokespecial
310
fa:l ()V
/
/
154
: aload_0
/
/
155
: getfield
289
fa:G Z
/
/
158
: ifeq
-
59
-
>
99
/
/
161
: new
224
java
/
lang
/
StringBuilder
/
/
164
: dup
/
/
165
: ldc_w
312
/
/
168
: invokespecial
245
java
/
lang
/
StringBuilder:<init> (Ljava
/
lang
/
String;)V
/
/
171
: aload_0
/
/
172
: getfield
115
fa:B Ljava
/
net
/
Socket;
/
/
175
: invokevirtual
318
java
/
net
/
Socket:getInetAddress ()Ljava
/
net
/
InetAddress;
/
/
178
: invokevirtual
321
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
Object
;)Ljava
/
lang
/
StringBuilder;
/
/
181
: ldc_w
323
/
/
184
: invokevirtual
251
java
/
lang
/
StringBuilder:append (Ljava
/
lang
/
String;)Ljava
/
lang
/
StringBuilder;
/
/
187
: aload_0
/
/
188
: getfield
115
fa:B Ljava
/
net
/
Socket;
/
/
191
: invokevirtual
326
java
/
net
/
Socket:getPort ()I
/
/
194
: invokevirtual
285
java
/
lang
/
StringBuilder:append (I)Ljava
/
lang
/
StringBuilder;
/
/
197
: invokevirtual
254
java
/
lang
/
StringBuilder:toString ()Ljava
/
lang
/
String;
/
/
200
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
203
: aload_0
/
/
204
: ldc_w
327
/
/
207
: invokevirtual
329
fa:b (I)V
/
/
210
: aload_0
/
/
211
: getfield
265
fa:C Lfa$b;
/
/
214
: invokevirtual
331
fa$b:b ()Z
/
/
217
: pop
/
/
218
: aload_0
/
/
219
: aconst_null
/
/
220
: putfield
90
fa:M [B
/
/
223
: aload_0
/
/
224
: getfield
88
fa:L Ljava
/
nio
/
ByteBuffer;
/
/
227
: invokevirtual
156
java
/
nio
/
ByteBuffer:clear ()Ljava
/
nio
/
Buffer
;
/
/
230
: pop
/
/
231
: aload_0
/
/
232
: getfield
276
fa:z Ljava
/
nio
/
channels
/
SocketChannel;
/
/
235
: aload_0
/
/
236
: getfield
333
fa:A Ljava
/
nio
/
channels
/
Selector;
/
/
239
: iconst_1
/
/
240
: invokevirtual
337
java
/
nio
/
channels
/
SocketChannel:register (Ljava
/
nio
/
channels
/
Selector;I)Ljava
/
nio
/
channels
/
SelectionKey;
/
/
243
: pop
/
/
244
: aload_0
/
/
245
: monitorenter
/
/
246
: aload_0
/
/
247
: getfield
289
fa:G Z
/
/
250
: ifeq
+
25
-
>
275
/
/
253
: aload_0
/
/
254
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
257
: iconst_0
/
/
258
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
261
: aload_0
/
/
262
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
265
: iconst_0
/
/
266
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
269
: aload_0
/
/
270
: iconst_3
/
/
271
: aconst_null
/
/
272
: invokevirtual
298
fa:a (ILey;)V
/
/
275
: aload_0
/
/
276
: monitorexit
/
/
277
:
return
/
/
278
: astore
4
/
/
280
: aload_0
/
/
281
: monitorexit
/
/
282
: aload
4
/
/
284
: athrow
/
/
285
: astore
4
/
/
287
: aload_0
/
/
288
: aload
4
/
/
290
: invokespecial
339
fa:a (Lez;)Z
/
/
293
: ifeq
+
18
-
>
311
/
/
296
: aload_0
/
/
297
: iload_1
/
/
298
: iconst_1
/
/
299
: iadd
/
/
300
: invokespecial
341
fa:c (I)V
/
/
303
:
return
/
/
304
: astore
4
/
/
306
: aload_0
/
/
307
: monitorexit
/
/
308
: aload
4
/
/
310
: athrow
/
/
311
: aload_0
/
/
312
: aload
4
/
/
314
: invokevirtual
200
ez:a ()Ley;
/
/
317
: invokevirtual
344
fa:a (Ley;)V
/
/
320
:
return
/
/
321
: astore
4
/
/
323
: invokestatic
345
gx:b ()Z
/
/
326
: ifeq
+
11
-
>
337
/
/
329
: aload_0
/
/
330
: iload_1
/
/
331
: iconst_1
/
/
332
: iadd
/
/
333
: invokespecial
341
fa:c (I)V
/
/
336
:
return
/
/
337
: aload_0
/
/
338
: invokevirtual
348
fa:i ()V
/
/
341
:
return
/
/
342
: astore
4
/
/
344
: goto
-
201
-
>
143
/
/
Local variable table:
/
/
start length slot name signature
/
/
0
347
0
this fa
/
/
0
347
1
paramInt
int
/
/
138
2
2
l
long
/
/
84
13
4
localObject1
Object
/
/
100
10
4
localObject2
Object
/
/
278
5
4
localObject3
Object
/
/
285
4
4
localez ez
/
/
304
9
4
localObject4
Object
/
/
321
1
4
localException Exception
/
/
342
1
4
localInterruptedException InterruptedException
/
/
107
6
5
localObject5
Object
/
/
Exception table:
/
/
from
to target
type
/
/
49
78
100
finally
/
/
78
80
100
finally
/
/
102
104
100
finally
/
/
89
99
107
finally
/
/
109
112
107
finally
/
/
246
275
278
finally
/
/
275
277
278
finally
/
/
280
282
278
finally
/
/
150
246
285
ez
/
/
282
285
285
ez
/
/
117
130
304
finally
/
/
130
132
304
finally
/
/
306
308
304
finally
/
/
150
246
321
java
/
lang
/
Exception
/
/
282
285
321
java
/
lang
/
Exception
/
/
139
143
342
java
/
lang
/
InterruptedException
}
private void l()
{
System.setProperty(
"java.net.preferIPv4Stack"
,
"true"
);
System.setProperty(
"java.net.preferIPv6Addresses"
,
"false"
);
if
(this.A !
=
null) {}
try
{
if
(this.A.isOpen()) {
this.A.close();
}
this.A
=
Selector.
open
();
if
(this.z !
=
null) {}
try
{
this.z.close();
this.z
=
SocketChannel.
open
();
de localde;
if
(this.G)
{
if
(!gx.b()) {
break
label163;
}
localde
=
dd.a(gx.a(String.valueOf(this.h.c())));
if
(localde.e()) {
a(localde.a().replace(
"http://"
, ""), localde.b());
}
}
else
{
if
(this.G) {
break
label185;
}
return
;
}
this.i
=
null;
throw new ez(new ey(
3
, localde.f()));
label163:
gu.d(
"No network connection. Please check and reconnect."
);
throw new ez(new ey(
2
));
label185:
this.z.connect(this.i);
this.z.configureBlocking(false);
this.B
=
this.z.socket();
this.C
=
new fa.b(new BufferedOutputStream(this.B.getOutputStream()));
this.C.start();
return
;
}
catch (Exception localException1)
{
for
(;;) {}
}
}
catch (Exception localException2)
{
for
(;;) {}
}
}
private void m()
{
if
(gx.b())
{
try
{
if
(!this.G) {
return
;
}
if
(this.H.get()) {
return
;
}
}
finally
{}
this.H.
set
(true);
c(
1
);
return
;
}
a(new ey(
2
));
}
private void n()
{
gu.c(
"stop main network connection"
);
f();
if
(this.C !
=
null)
{
this.C.a();
this.C
=
null;
}
if
((gx.l() >
=
8
) && (this.A !
=
null)) {}
try
{
this.A.close();
}
catch (Exception localException1)
{
for
(;;)
{
gu.d(
"Error in closing socketSelector"
);
localException1.printStackTrace();
this.A
=
null;
}
}
finally
{
this.A
=
null;
}
if
(this.B !
=
null) {}
try
{
this.B.close();
}
catch (Exception localException2)
{
for
(;;)
{
gu.d(
"Error in closing socket"
);
localException2.printStackTrace();
this.B
=
null;
}
}
finally
{
this.B
=
null;
}
if
(this.z !
=
null) {}
try
{
this.z.close();
SelectionKey localSelectionKey
=
this.z.keyFor(this.A);
if
(localSelectionKey !
=
null) {
localSelectionKey.cancel();
}
}
catch (Exception localException3)
{
for
(;;)
{
gu.d(
"Error in closing socketChannel"
);
localException3.printStackTrace();
this.z
=
null;
}
}
finally
{
this.z
=
null;
}
this.j.clear();
a(
0
, null);
}
/
*
Error
*
/
public void a(ey arg1)
{
/
/
Byte code:
/
/
0
: aload_0
/
/
1
: monitorenter
/
/
2
: aload_0
/
/
3
: getfield
289
fa:G Z
/
/
6
: istore_2
/
/
7
: iload_2
/
/
8
: ifne
+
6
-
>
14
/
/
11
: aload_0
/
/
12
: monitorexit
/
/
13
:
return
/
/
14
: aload_0
/
/
15
: iconst_0
/
/
16
: putfield
289
fa:G Z
/
/
19
: aload_0
/
/
20
: getfield
97
fa:H Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
23
: iconst_0
/
/
24
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
27
: aload_0
/
/
28
: getfield
99
fa:I Ljava
/
util
/
concurrent
/
atomic
/
AtomicBoolean;
/
/
31
: iconst_0
/
/
32
: invokevirtual
295
java
/
util
/
concurrent
/
atomic
/
AtomicBoolean:
set
(Z)V
/
/
35
: aload_0
/
/
36
: iconst_0
/
/
37
: aload_1
/
/
38
: invokevirtual
298
fa:a (ILey;)V
/
/
41
: aload_0
/
/
42
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
45
: ifnull
+
26
-
>
71
/
/
48
: aload_0
/
/
49
: getfield
479
fa:D Ljava
/
lang
/
Thread;
/
/
52
: invokevirtual
482
java
/
lang
/
Thread:interrupt ()V
/
/
55
: aload_0
/
/
56
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
59
: astore_1
/
/
60
: aload_1
/
/
61
: monitorenter
/
/
62
: aload_0
/
/
63
: getfield
78
fa:E Ljava
/
lang
/
Object
;
/
/
66
: invokevirtual
301
java
/
lang
/
Object
:notify ()V
/
/
69
: aload_1
/
/
70
: monitorexit
/
/
71
: ldc_w
484
/
/
74
: invokestatic
215
gu:c (Ljava
/
lang
/
String;)V
/
/
77
: goto
-
66
-
>
11
/
/
80
: astore_1
/
/
81
: aload_0
/
/
82
: monitorexit
/
/
83
: aload_1
/
/
84
: athrow
/
/
85
: astore_3
/
/
86
: aload_1
/
/
87
: monitorexit
/
/
88
: aload_3
/
/
89
: athrow
/
/
Local variable table:
/
/
start length slot name signature
/
/
0
90
0
this fa
/
/
6
2
2
bool
boolean
/
/
85
4
3
localObject
Object
/
/
Exception table:
/
/
from
to target
type
/
/
2
7
80
finally
/
/
14
62
80
finally
/
/
71
77
80
finally
/
/
88
90
80
finally
/
/
62
71
85
finally
/
/
86
88
85
finally
}
public void g()
{
try
{
if
((this.D !
=
null) && (!this.D.isInterrupted())) {
return
;
}
if
(this.H.get()) {
return
;
}
}
finally
{}
this.H.
set
(true);
synchronized (this.F)
{
Thread localThread
=
this.D;
if
(localThread !
=
null) {}
try
{
this.F.wait();
this.D
=
null;
try
{
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
最后于 2024-2-3 15:57
被satadrover编辑
,原因:
赞赏记录
参与人
雪币
留言
时间
一笑人间万事
为你点赞~
2023-12-25 00:52
哆啦噩梦
为你点赞~
2023-6-12 10:24
704088
为你点赞~
2023-4-22 00:37
赞赏
他的文章
- RC4算法解析 5681
- [原创]Android应用之【隐藏桌面图标的一种方法】 4458
- [调查]闲下来不知道该做什么 7910
看原图
赞赏
雪币:
留言: