b.smali
.class public final Lcom/uc/crashsdk/a/b;
.super Ljava/lang/Object;
.source "ProGuard"
# static fields
.field private static final a:[I
.field private static final b:[I
.field private static final c:[I
# direct methods
.method static constructor <clinit>()V
.registers 2
.prologue
const/16 v1, 0x8
.line 15
new-array v0, v1, [I
fill-array-data v0, :array_18
sput-object v0, Lcom/uc/crashsdk/a/b;->a:[I
.line 16
new-array v0, v1, [I
fill-array-data v0, :array_2c
sput-object v0, Lcom/uc/crashsdk/a/b;->b:[I
.line 17
new-array v0, v1, [I
fill-array-data v0, :array_40
sput-object v0, Lcom/uc/crashsdk/a/b;->c:[I
return-void
.line 15
:array_18
.array-data 4
0x7e
0x93
0x73
0xf1
0x65
0xc6
0xd7
0x86
.end array-data
.line 16
:array_2c
.array-data 4
0x7d
0xb9
0xe9
0xe2
0x81
0x8e
0x97
0xb0
.end array-data
.line 17
:array_40
.array-data 4
0xee
0xb9
0xe9
0xb3
0x81
0x8e
0x97
0xa7
.end array-data
.end method
.method public static a(Ljava/lang/String;)Ljava/lang/String;
.registers 7
.prologue
const/4 v1, 0x0
.line 28
new-instance v0, Ljava/io/File;
invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 30
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v2
if-nez v2, :cond_e
move-object v0, v1
.line 55
:goto_d
return-object v0
.line 35
:cond_e
:try_start_e
new-instance v2, Ljava/io/FileInputStream;
invoke-direct {v2, v0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_end_13
.catch Ljava/lang/Exception; {:try_start_e .. :try_end_13} :catch_46
.catchall {:try_start_e .. :try_end_13} :catchall_55
.line 36
:try_start_13
invoke-virtual {v0}, Ljava/io/File;->length()J
move-result-wide v4
long-to-int v0, v4
new-array v0, v0, [B
.line 38
invoke-virtual {v2, v0}, Ljava/io/FileInputStream;->read([B)I
.line 40
invoke-static {v2}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
:try_end_20
.catch Ljava/lang/Exception; {:try_start_13 .. :try_end_20} :catch_5d
.catchall {:try_start_13 .. :try_end_20} :catchall_5a
.line 43
:try_start_20
sget-object v2, Lcom/uc/crashsdk/a/b;->a:[I
invoke-static {v0, v2}, Lcom/uc/crashsdk/a/b;->a([B[I)[B
move-result-object v2
.line 45
if-eqz v2, :cond_50
array-length v0, v2
if-lez v0, :cond_50
.line 46
array-length v3, v2
.line 48
add-int/lit8 v0, v3, -0x1
aget-byte v0, v2, v0
const/16 v4, 0xa
if-ne v0, v4, :cond_40
new-instance v0, Ljava/lang/String;
const/4 v4, 0x0
add-int/lit8 v3, v3, -0x1
invoke-direct {v0, v2, v4, v3}, Ljava/lang/String;-><init>([BII)V
:try_end_3c
.catch Ljava/lang/Exception; {:try_start_20 .. :try_end_3c} :catch_46
.catchall {:try_start_20 .. :try_end_3c} :catchall_55
.line 57
:goto_3c
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
goto :goto_d
.line 48
:cond_40
:try_start_40
new-instance v0, Ljava/lang/String;
invoke-direct {v0, v2}, Ljava/lang/String;-><init>([B)V
:try_end_45
.catch Ljava/lang/Exception; {:try_start_40 .. :try_end_45} :catch_46
.catchall {:try_start_40 .. :try_end_45} :catchall_55
goto :goto_3c
.line 53
:catch_46
move-exception v0
move-object v2, v1
:goto_48
:try_start_48
invoke-static {v0}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
:try_end_4b
.catchall {:try_start_48 .. :try_end_4b} :catchall_5a
.line 57
invoke-static {v2}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
move-object v0, v1
.line 55
goto :goto_d
.line 57
:cond_50
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
move-object v0, v1
.line 52
goto :goto_d
.line 57
:catchall_55
move-exception v0
:goto_56
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 58
throw v0
.line 57
:catchall_5a
move-exception v0
move-object v1, v2
goto :goto_56
.line 53
:catch_5d
move-exception v0
goto :goto_48
.end method
.method public static a(Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
.registers 13
.prologue
const/4 v2, 0x0
const/4 v3, 0x1
const/4 v4, 0x0
.line 285
if-nez p2, :cond_6
.line 352
:cond_5
:goto_5
return-object p0
.line 288
:cond_6
invoke-static {p0}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_5
.line 292
new-instance v7, Ljava/io/File;
invoke-direct {v7, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 293
invoke-virtual {v7}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :cond_5
invoke-virtual {v7}, Ljava/io/File;->length()J
move-result-wide v0
const-wide/32 v8, 0x300000
cmp-long v0, v0, v8
if-gtz v0, :cond_5
.line 297
invoke-static {v7}, Lcom/uc/crashsdk/a/g;->e(Ljava/io/File;)[B
move-result-object v6
.line 298
if-eqz v6, :cond_5
array-length v0, v6
if-lez v0, :cond_5
.line 305
if-eqz p2, :cond_cc
.line 310
:try_start_2d
new-instance v5, Ljava/io/ByteArrayOutputStream;
invoke-direct {v5}, Ljava/io/ByteArrayOutputStream;-><init>()V
:try_end_32
.catch Ljava/lang/Throwable; {:try_start_2d .. :try_end_32} :catch_92
.catchall {:try_start_2d .. :try_end_32} :catchall_9f
.line 311
:try_start_32
new-instance v1, Ljava/util/zip/GZIPOutputStream;
invoke-direct {v1, v5}, Ljava/util/zip/GZIPOutputStream;-><init>(Ljava/io/OutputStream;)V
:try_end_37
.catch Ljava/lang/Throwable; {:try_start_32 .. :try_end_37} :catch_c2
.catchall {:try_start_32 .. :try_end_37} :catchall_b9
.line 312
:try_start_37
invoke-virtual {v1, v6}, Ljava/util/zip/GZIPOutputStream;->write([B)V
.line 313
invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->flush()V
:try_end_3d
.catch Ljava/lang/Throwable; {:try_start_37 .. :try_end_3d} :catch_c6
.catchall {:try_start_37 .. :try_end_3d} :catchall_bb
.line 317
invoke-static {v5}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 318
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 322
:goto_43
:try_start_43
invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
:try_end_46
.catch Ljava/lang/Throwable; {:try_start_43 .. :try_end_46} :catch_a8
move-result-object v0
move v1, v3
.line 328
:goto_48
if-eqz v1, :cond_5
if-eqz v0, :cond_5
array-length v1, v0
if-lez v1, :cond_5
.line 331
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
move-object v5, v0
move v0, v3
.line 335
:goto_62
if-eqz v0, :cond_5
invoke-virtual {v7}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_c9
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v2, ".tmp"
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
move v2, v3
:goto_82
new-instance v6, Ljava/io/File;
invoke-direct {v6, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-static {v6, v5}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/File;[B)Z
move-result v0
if-nez v0, :cond_af
:goto_8d
if-eqz v4, :cond_5
move-object p0, v1
.line 350
goto/16 :goto_5
.line 314
:catch_92
move-exception v0
move-object v1, v2
:goto_94
:try_start_94
invoke-static {v0}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
:try_end_97
.catchall {:try_start_94 .. :try_end_97} :catchall_be
.line 317
invoke-static {v2}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 318
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
move-object v5, v2
.line 319
goto :goto_43
.line 317
:catchall_9f
move-exception v0
move-object v5, v2
:goto_a1
invoke-static {v5}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 318
invoke-static {v2}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 319
throw v0
.line 324
:catch_a8
move-exception v0
invoke-static {v0}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
move v1, v4
move-object v0, v6
goto :goto_48
.line 335
:cond_af
if-eqz v2, :cond_b7
invoke-virtual {v7}, Ljava/io/File;->delete()Z
invoke-virtual {v6, v7}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
:cond_b7
move v4, v3
goto :goto_8d
.line 317
:catchall_b9
move-exception v0
goto :goto_a1
:catchall_bb
move-exception v0
move-object v2, v1
goto :goto_a1
:catchall_be
move-exception v0
move-object v5, v2
move-object v2, v1
goto :goto_a1
.line 314
:catch_c2
move-exception v0
move-object v1, v2
move-object v2, v5
goto :goto_94
:catch_c6
move-exception v0
move-object v2, v5
goto :goto_94
:cond_c9
move-object v0, v1
move v2, v4
goto :goto_82
:cond_cc
move v0, v4
move-object v1, p0
move-object v5, v6
goto :goto_62
.end method
.method public static a(Ljava/lang/String;Ljava/lang/String;)Z
.registers 6
.prologue
const/4 v0, 0x0
.line 456
const/4 v2, 0x0
.line 458
:try_start_2
new-instance v3, Ljava/io/File;
invoke-direct {v3, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 459
invoke-virtual {v3}, Ljava/io/File;->exists()Z
move-result v1
if-eqz v1, :cond_10
.line 460
invoke-virtual {v3}, Ljava/io/File;->delete()Z
.line 462
:cond_10
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, v3}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
:try_end_15
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_15} :catch_18
.line 467
:goto_15
if-nez v1, :cond_1e
.line 488
:goto_17
return v0
.line 463
:catch_18
move-exception v1
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
move-object v1, v2
goto :goto_15
.line 471
:cond_1e
invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B
move-result-object v2
sget-object v3, Lcom/uc/crashsdk/a/b;->a:[I
invoke-static {v2, v3}, Lcom/uc/crashsdk/a/b;->b([B[I)[B
move-result-object v2
.line 473
if-nez v2, :cond_2e
.line 474
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
goto :goto_17
.line 480
:cond_2e
:try_start_2e
invoke-virtual {v1, v2}, Ljava/io/FileOutputStream;->write([B)V
:try_end_31
.catch Ljava/lang/Throwable; {:try_start_2e .. :try_end_31} :catch_36
.catchall {:try_start_2e .. :try_end_31} :catchall_3b
.line 481
const/4 v0, 0x1
.line 485
:goto_32
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
goto :goto_17
.line 482
:catch_36
move-exception v2
:try_start_37
invoke-static {v2}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
:try_end_3a
.catchall {:try_start_37 .. :try_end_3a} :catchall_3b
goto :goto_32
.line 485
:catchall_3b
move-exception v0
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/io/Closeable;)V
.line 486
throw v0
.end method
.method private static a([B[I)[B
.registers 10
.prologue
const/4 v1, 0x0
const/4 v3, 0x0
.line 385
array-length v0, p0
add-int/lit8 v0, v0, 0x0
const/4 v2, 0x2
if-lt v0, v2, :cond_f
if-eqz p1, :cond_f
array-length v0, p1
const/16 v2, 0x8
if-eq v0, v2, :cond_11
:cond_f
move-object v0, v1
.line 415
:cond_10
:goto_10
return-object v0
.line 390
:cond_11
array-length v0, p0
add-int/lit8 v0, v0, -0x2
add-int/lit8 v5, v0, 0x0
.line 394
:try_start_16
new-array v0, v5, [B
:try_end_18
.catch Ljava/lang/Exception; {:try_start_16 .. :try_end_18} :catch_2d
move v2, v3
move v4, v3
.line 403
:goto_1a
if-ge v2, v5, :cond_33
.line 404
add-int/lit8 v6, v2, 0x0
aget-byte v6, p0, v6
.line 405
rem-int/lit8 v7, v2, 0x8
aget v7, p1, v7
xor-int/2addr v6, v7
int-to-byte v6, v6
.line 406
aput-byte v6, v0, v2
.line 407
xor-int/2addr v4, v6
int-to-byte v4, v4
.line 403
add-int/lit8 v2, v2, 0x1
goto :goto_1a
.line 398
:catch_2d
move-exception v0
invoke-static {v0}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
move-object v0, v1
.line 400
goto :goto_10
.line 410
:cond_33
add-int/lit8 v2, v5, 0x0
aget-byte v2, p0, v2
aget v3, p1, v3
xor-int/2addr v3, v4
and-int/lit16 v3, v3, 0xff
int-to-byte v3, v3
if-ne v2, v3, :cond_4e
add-int/lit8 v2, v5, 0x1
add-int/lit8 v2, v2, 0x0
aget-byte v2, p0, v2
const/4 v3, 0x1
aget v3, p1, v3
xor-int/2addr v3, v4
and-int/lit16 v3, v3, 0xff
int-to-byte v3, v3
if-eq v2, v3, :cond_10
:cond_4e
move-object v0, v1
.line 415
goto :goto_10
.end method
.method private static b([B[I)[B
.registers 9
.prologue
const/4 v0, 0x0
const/4 v2, 0x0
.line 425
if-eqz p0, :cond_b
if-eqz p1, :cond_b
array-length v1, p1
const/16 v3, 0x8
if-eq v1, v3, :cond_c
.line 452
:cond_b
:goto_b
return-object v0
.line 429
:cond_c
array-length v4, p0
.line 433
add-int/lit8 v1, v4, 0x2
:try_start_f
new-array v0, v1, [B
:try_end_11
.catch Ljava/lang/Exception; {:try_start_f .. :try_end_11} :catch_24
move v1, v2
move v3, v2
.line 442
:goto_13
if-ge v1, v4, :cond_29
.line 443
aget-byte v5, p0, v1
.line 444
rem-int/lit8 v6, v1, 0x8
aget v6, p1, v6
xor-int/2addr v6, v5
int-to-byte v6, v6
.line 445
aput-byte v6, v0, v1
.line 446
xor-int/2addr v3, v5
int-to-byte v3, v3
.line 442
add-int/lit8 v1, v1, 0x1
goto :goto_13
.line 437
:catch_24
move-exception v1
invoke-static {v1}, Lcom/uc/crashsdk/a/g;->a(Ljava/lang/Throwable;)V
goto :goto_b
.line 449
:cond_29
aget v1, p1, v2
xor-int/2addr v1, v3
int-to-byte v1, v1
aput-byte v1, v0, v4
.line 450
add-int/lit8 v1, v4, 0x1
const/4 v2, 0x1
aget v2, p1, v2
xor-int/2addr v2, v3
int-to-byte v2, v2
aput-byte v2, v0, v1
goto :goto_b
.end method