j.smali

.class public final Lcom/cmcm/safewallet/data/ctrl/j;
.super Ljava/lang/Object;
.source "TokenResourceManager.java"


# static fields
.field private static UD:Ljava/lang/String;

.field public static final UE:Ljava/lang/String;

.field public static final UF:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .registers 2

    .prologue
    .line 37
    invoke-static {}, Lcom/cmcm/safewallet/entry/WalletApp;->lO()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;

    move-result-object v0

    invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/cmcm/safewallet/data/ctrl/j;->UD:Ljava/lang/String;

    .line 39
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v1, Lcom/cmcm/safewallet/data/ctrl/j;->UD:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    sget-object v1, Ljava/io/File;->separator:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "coin/tokens.json"

    invoke-virtual {v0, v1}, 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

    sput-object v0, Lcom/cmcm/safewallet/data/ctrl/j;->UE:Ljava/lang/String;

    .line 40
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    sget-object v1, Lcom/cmcm/safewallet/data/ctrl/j;->UE:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, "_tmp"

    invoke-virtual {v0, v1}, 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

    sput-object v0, Lcom/cmcm/safewallet/data/ctrl/j;->UF:Ljava/lang/String;

    return-void
.end method

.method private constructor <init>()V
    .registers 1

    .prologue
    .line 47
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 49
    return-void
.end method

.method synthetic constructor <init>(B)V
    .registers 2

    .prologue
    .line 36
    invoke-direct {p0}, Lcom/cmcm/safewallet/data/ctrl/j;-><init>()V

    return-void
.end method

.method public static declared-synchronized M(Ljava/lang/String;Ljava/lang/String;)Z
    .registers 7

    .prologue
    .line 116
    const-class v3, Lcom/cmcm/safewallet/data/ctrl/j;

    monitor-enter v3

    const/4 v2, 0x0

    .line 118
    :try_start_4
    new-instance v1, Ljava/io/BufferedWriter;

    new-instance v0, Ljava/io/FileWriter;

    new-instance v4, Ljava/io/File;

    invoke-direct {v4, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v0, v4}, Ljava/io/FileWriter;-><init>(Ljava/io/File;)V

    invoke-direct {v1, v0}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
    :try_end_13
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_13} :catch_24
    .catchall {:try_start_4 .. :try_end_13} :catchall_35

    .line 119
    :try_start_13
    invoke-virtual {v1, p1}, Ljava/io/BufferedWriter;->write(Ljava/lang/String;)V
    :try_end_16
    .catch Ljava/lang/Exception; {:try_start_13 .. :try_end_16} :catch_44
    .catchall {:try_start_13 .. :try_end_16} :catchall_41

    .line 126
    :try_start_16
    invoke-virtual {v1}, Ljava/io/BufferedWriter;->close()V
    :try_end_19
    .catch Ljava/io/IOException; {:try_start_16 .. :try_end_19} :catch_1c
    .catchall {:try_start_16 .. :try_end_19} :catchall_21

    .line 132
    :goto_19
    const/4 v0, 0x1

    :goto_1a
    monitor-exit v3

    return v0

    .line 128
    :catch_1c
    move-exception v0

    :try_start_1d
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
    :try_end_20
    .catchall {:try_start_1d .. :try_end_20} :catchall_21

    goto :goto_19

    .line 116
    :catchall_21
    move-exception v0

    monitor-exit v3

    throw v0

    .line 121
    :catch_24
    move-exception v0

    move-object v1, v2

    :goto_26
    :try_start_26
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_29
    .catchall {:try_start_26 .. :try_end_29} :catchall_41

    .line 124
    if-eqz v1, :cond_2e

    .line 126
    :try_start_2b
    invoke-virtual {v1}, Ljava/io/BufferedWriter;->close()V
    :try_end_2e
    .catch Ljava/io/IOException; {:try_start_2b .. :try_end_2e} :catch_30
    .catchall {:try_start_2b .. :try_end_2e} :catchall_21

    .line 122
    :cond_2e
    :goto_2e
    const/4 v0, 0x0

    goto :goto_1a

    .line 128
    :catch_30
    move-exception v0

    :try_start_31
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
    :try_end_34
    .catchall {:try_start_31 .. :try_end_34} :catchall_21

    goto :goto_2e

    .line 124
    :catchall_35
    move-exception v0

    :goto_36
    if-eqz v2, :cond_3b

    .line 126
    :try_start_38
    invoke-virtual {v2}, Ljava/io/BufferedWriter;->close()V
    :try_end_3b
    .catch Ljava/io/IOException; {:try_start_38 .. :try_end_3b} :catch_3c
    .catchall {:try_start_38 .. :try_end_3b} :catchall_21

    .line 129
    :cond_3b
    :goto_3b
    :try_start_3b
    throw v0

    .line 128
    :catch_3c
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_40
    .catchall {:try_start_3b .. :try_end_40} :catchall_21

    goto :goto_3b

    .line 124
    :catchall_41
    move-exception v0

    move-object v2, v1

    goto :goto_36

    .line 121
    :catch_44
    move-exception v0

    goto :goto_26
.end method

.method public static N(Ljava/lang/String;Ljava/lang/String;)Z
    .registers 10

    .prologue
    const/4 v0, 0x1

    const/4 v2, 0x0

    const/4 v1, 0x0

    .line 160
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_a6

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v3

    if-nez v3, :cond_a6

    .line 164
    new-instance v5, Ljava/io/File;

    invoke-direct {v5, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 166
    :try_start_14
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v3

    if-eqz v3, :cond_79

    invoke-virtual {v5}, Ljava/io/File;->canRead()Z

    move-result v3

    if-eqz v3, :cond_79

    move v3, v0

    .line 167
    :goto_21
    if-eqz v3, :cond_7b

    .line 168
    invoke-virtual {v5}, Ljava/io/File;->delete()Z

    .line 176
    :cond_26
    :goto_26
    new-instance v3, Lokhttp3/ah;

    invoke-direct {v3}, Lokhttp3/ah;-><init>()V

    .line 177
    new-instance v4, Lokhttp3/am;

    invoke-direct {v4}, Lokhttp3/am;-><init>()V

    invoke-virtual {v4, p0}, Lokhttp3/am;->hJ(Ljava/lang/String;)Lokhttp3/am;

    move-result-object v4

    invoke-virtual {v4}, Lokhttp3/am;->build()Lokhttp3/al;

    move-result-object v4

    .line 1430
    const/4 v6, 0x0

    invoke-static {v3, v4, v6}, Lokhttp3/aj;->a(Lokhttp3/ah;Lokhttp3/al;Z)Lokhttp3/aj;

    move-result-object v3

    .line 180
    invoke-interface {v3}, Lokhttp3/f;->QA()Lokhttp3/ao;

    move-result-object v3

    .line 182
    invoke-virtual {v3}, Lokhttp3/ao;->isSuccessful()Z

    move-result v4

    if-eqz v4, :cond_95

    .line 2177
    iget-object v3, v3, Lokhttp3/ao;->bWL:Lokhttp3/aq;

    .line 183
    invoke-virtual {v3}, Lokhttp3/aq;->byteStream()Ljava/io/InputStream;
    :try_end_4c
    .catch Ljava/lang/Exception; {:try_start_14 .. :try_end_4c} :catch_8b
    .catchall {:try_start_14 .. :try_end_4c} :catchall_9d

    move-result-object v4

    .line 184
    :try_start_4d
    new-instance v3, Ljava/io/FileOutputStream;

    invoke-direct {v3, v5}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_52
    .catch Ljava/lang/Exception; {:try_start_4d .. :try_end_52} :catch_b0
    .catchall {:try_start_4d .. :try_end_52} :catchall_a8

    .line 185
    const/16 v2, 0x400

    :try_start_54
    new-array v2, v2, [B

    .line 188
    :goto_56
    invoke-virtual {v4, v2}, Ljava/io/InputStream;->read([B)I

    move-result v6

    const/4 v7, -0x1

    if-eq v6, v7, :cond_8e

    .line 189
    const/4 v7, 0x0

    invoke-virtual {v3, v2, v7, v6}, Ljava/io/FileOutputStream;->write([BII)V
    :try_end_61
    .catch Ljava/lang/Exception; {:try_start_54 .. :try_end_61} :catch_62
    .catchall {:try_start_54 .. :try_end_61} :catchall_aa

    goto :goto_56

    .line 197
    :catch_62
    move-exception v0

    move-object v2, v3

    move-object v3, v4

    .line 198
    :goto_65
    :try_start_65
    invoke-virtual {v5}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_6e

    .line 199
    invoke-virtual {v5}, Ljava/io/File;->delete()Z

    .line 201
    :cond_6e
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_71
    .catchall {:try_start_65 .. :try_end_71} :catchall_ad

    .line 204
    invoke-static {v3}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    .line 205
    invoke-static {v2}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    move v0, v1

    .line 208
    :goto_78
    return v0

    :cond_79
    move v3, v1

    .line 166
    goto :goto_21

    .line 170
    :cond_7b
    :try_start_7b
    invoke-virtual {v5}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v3

    .line 171
    if-eqz v3, :cond_26

    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v4

    if-nez v4, :cond_26

    .line 172
    invoke-virtual {v3}, Ljava/io/File;->mkdir()Z
    :try_end_8a
    .catch Ljava/lang/Exception; {:try_start_7b .. :try_end_8a} :catch_8b
    .catchall {:try_start_7b .. :try_end_8a} :catchall_9d

    goto :goto_26

    .line 197
    :catch_8b
    move-exception v0

    move-object v3, v2

    goto :goto_65

    .line 204
    :cond_8e
    invoke-static {v4}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    .line 205
    invoke-static {v3}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    goto :goto_78

    .line 204
    :cond_95
    invoke-static {v2}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    .line 205
    invoke-static {v2}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    move v0, v1

    .line 194
    goto :goto_78

    .line 204
    :catchall_9d
    move-exception v0

    move-object v4, v2

    :goto_9f
    invoke-static {v4}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    .line 205
    invoke-static {v2}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    throw v0

    :cond_a6
    move v0, v1

    .line 208
    goto :goto_78

    .line 204
    :catchall_a8
    move-exception v0

    goto :goto_9f

    :catchall_aa
    move-exception v0

    move-object v2, v3

    goto :goto_9f

    :catchall_ad
    move-exception v0

    move-object v4, v3

    goto :goto_9f

    .line 197
    :catch_b0
    move-exception v0

    move-object v3, v4

    goto :goto_65
.end method

.method public static declared-synchronized V(Ljava/lang/String;)Ljava/lang/String;
    .registers 6

    .prologue
    const/4 v0, 0x0

    .line 136
    const-class v3, Lcom/cmcm/safewallet/data/ctrl/j;

    monitor-enter v3

    .line 138
    :try_start_4
    new-instance v2, Ljava/io/BufferedReader;

    new-instance v1, Ljava/io/FileReader;

    new-instance v4, Ljava/io/File;

    invoke-direct {v4, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-direct {v1, v4}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V

    invoke-direct {v2, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
    :try_end_13
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_13} :catch_52
    .catchall {:try_start_4 .. :try_end_13} :catchall_42

    .line 139
    :try_start_13
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    .line 141
    :goto_18
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v4

    if-eqz v4, :cond_2d

    .line 142
    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_21
    .catch Ljava/lang/Exception; {:try_start_13 .. :try_end_21} :catch_22
    .catchall {:try_start_13 .. :try_end_21} :catchall_50

    goto :goto_18

    .line 146
    :catch_22
    move-exception v1

    :goto_23
    :try_start_23
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_26
    .catchall {:try_start_23 .. :try_end_26} :catchall_50

    .line 148
    if-eqz v2, :cond_2b

    .line 150
    :try_start_28
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_2b
    .catch Ljava/io/IOException; {:try_start_28 .. :try_end_2b} :catch_3d
    .catchall {:try_start_28 .. :try_end_2b} :catchall_3a

    .line 156
    :cond_2b
    :goto_2b
    monitor-exit v3

    return-object v0

    .line 144
    :cond_2d
    :try_start_2d
    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_30
    .catch Ljava/lang/Exception; {:try_start_2d .. :try_end_30} :catch_22
    .catchall {:try_start_2d .. :try_end_30} :catchall_50

    move-result-object v0

    .line 150
    :try_start_31
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_34
    .catch Ljava/io/IOException; {:try_start_31 .. :try_end_34} :catch_35
    .catchall {:try_start_31 .. :try_end_34} :catchall_3a

    goto :goto_2b

    .line 152
    :catch_35
    move-exception v1

    :try_start_36
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_39
    .catchall {:try_start_36 .. :try_end_39} :catchall_3a

    goto :goto_2b

    .line 136
    :catchall_3a
    move-exception v0

    monitor-exit v3

    throw v0

    .line 152
    :catch_3d
    move-exception v1

    :try_start_3e
    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_41
    .catchall {:try_start_3e .. :try_end_41} :catchall_3a

    goto :goto_2b

    .line 148
    :catchall_42
    move-exception v1

    move-object v2, v0

    move-object v0, v1

    :goto_45
    if-eqz v2, :cond_4a

    .line 150
    :try_start_47
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_4a
    .catch Ljava/io/IOException; {:try_start_47 .. :try_end_4a} :catch_4b
    .catchall {:try_start_47 .. :try_end_4a} :catchall_3a

    .line 153
    :cond_4a
    :goto_4a
    :try_start_4a
    throw v0

    .line 152
    :catch_4b
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_4f
    .catchall {:try_start_4a .. :try_end_4f} :catchall_3a

    goto :goto_4a

    .line 148
    :catchall_50
    move-exception v0

    goto :goto_45

    .line 146
    :catch_52
    move-exception v1

    move-object v2, v0

    goto :goto_23
.end method

.method private static bb(Ljava/lang/String;)I
    .registers 5

    .prologue
    const/4 v0, -0x1

    .line 289
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-eqz v1, :cond_8

    .line 306
    :cond_7
    :goto_7
    return v0

    .line 293
    :cond_8
    :try_start_8
    new-instance v1, Lorg/json/JSONTokener;

    invoke-direct {v1, p0}, Lorg/json/JSONTokener;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Lorg/json/JSONTokener;->nextValue()Ljava/lang/Object;

    move-result-object v1

    .line 294
    instance-of v2, v1, Lorg/json/JSONObject;

    if-eqz v2, :cond_22

    .line 296
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 297
    const-string v2, "version"

    const/4 v3, -0x1

    invoke-virtual {v1, v2, v3}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;I)I
    :try_end_20
    .catch Lorg/json/JSONException; {:try_start_8 .. :try_end_20} :catch_28

    move-result v0

    goto :goto_7

    .line 298
    :cond_22
    instance-of v1, v1, Lorg/json/JSONArray;

    if-eqz v1, :cond_7

    .line 300
    const/4 v0, 0x1

    goto :goto_7

    .line 305
    :catch_28
    move-exception v1

    invoke-virtual {v1}, Lorg/json/JSONException;->printStackTrace()V

    goto :goto_7
.end method

.method public static deleteFile(Ljava/lang/String;)Z
    .registers 3

    .prologue
    .line 213
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 214
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_10

    .line 215
    invoke-virtual {v0}, Ljava/io/File;->delete()Z

    move-result v0

    .line 217
    :goto_f
    return v0

    :cond_10
    const/4 v0, 0x0

    goto :goto_f
.end method

.method public static jf()Lcom/cmcm/safewallet/data/ctrl/j;
    .registers 1

    .prologue
    .line 56
    invoke-static {}, Lcom/cmcm/safewallet/data/ctrl/k;->jm()Lcom/cmcm/safewallet/data/ctrl/j;

    move-result-object v0

    return-object v0
.end method

.method public static jg()I
    .registers 2

    .prologue
    .line 2224
    sget-object v0, Lcom/cmcm/safewallet/data/ctrl/j;->UE:Ljava/lang/String;

    .line 2225
    new-instance v1, Ljava/io/File;

    invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 2226
    invoke-virtual {v1}, Ljava/io/File;->exists()Z

    move-result v0

    if-eqz v0, :cond_27

    invoke-virtual {v1}, Ljava/io/File;->isFile()Z

    move-result v0

    if-eqz v0, :cond_27

    invoke-virtual {v1}, Ljava/io/File;->canRead()Z

    move-result v0

    if-eqz v0, :cond_27

    const/4 v0, 0x1

    .line 233
    :goto_1a
    if-eqz v0, :cond_29

    .line 234
    sget-object v0, Lcom/cmcm/safewallet/data/ctrl/j;->UE:Ljava/lang/String;

    invoke-static {v0}, Lcom/cmcm/safewallet/data/ctrl/j;->V(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/cmcm/safewallet/data/ctrl/j;->bb(Ljava/lang/String;)I

    move-result v0

    .line 236
    :goto_26
    return v0

    .line 2226
    :cond_27
    const/4 v0, 0x0

    goto :goto_1a

    .line 236
    :cond_29
    const/4 v0, -0x1

    goto :goto_26
.end method

.method public static jh()I
    .registers 3

    .prologue
    .line 244
    invoke-static {}, Lcom/cmcm/safewallet/entry/WalletApp;->lO()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;

    move-result-object v0

    .line 245
    const/4 v1, 0x0

    .line 247
    :try_start_9
    const-string v2, "coin/tokens.json"

    invoke-virtual {v0, v2}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;

    move-result-object v1

    .line 248
    invoke-static {v1}, Lcom/cmcm/safewallet/utils/h;->f(Ljava/io/InputStream;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/cmcm/safewallet/data/ctrl/j;->bb(Ljava/lang/String;)I
    :try_end_16
    .catch Ljava/io/IOException; {:try_start_9 .. :try_end_16} :catch_1b
    .catchall {:try_start_9 .. :try_end_16} :catchall_24

    move-result v0

    .line 253
    invoke-static {v1}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    .line 251
    :goto_1a
    return v0

    .line 250
    :catch_1b
    move-exception v0

    :try_start_1c
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
    :try_end_1f
    .catchall {:try_start_1c .. :try_end_1f} :catchall_24

    .line 253
    invoke-static {v1}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    .line 251
    const/4 v0, -0x1

    goto :goto_1a

    .line 253
    :catchall_24
    move-exception v0

    invoke-static {v1}, Lcom/cmcm/safewallet/utils/r;->a(Ljava/io/Closeable;)V

    throw v0
.end method

.method public static ji()Ljava/lang/String;
    .registers 3

    .prologue
    .line 261
    const-string v0, "tokenlist"

    const-string v1, "url"

    const-string v2, ""

    invoke-static {v0, v1, v2}, Lcom/cmcm/safewallet/data/g/b;->s(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static jj()Ljava/lang/String;
    .registers 3

    .prologue
    .line 268
    const-string v0, "tokenlist"

    const-string v1, "md5"

    const-string v2, ""

    invoke-static {v0, v1, v2}, Lcom/cmcm/safewallet/data/g/b;->s(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static jk()I
    .registers 3

    .prologue
    .line 275
    const-string v0, "tokenlist"

    const-string v1, "version"

    const/4 v2, -0x1

    invoke-static {v0, v1, v2}, Lcom/cmcm/safewallet/data/g/b;->f(Ljava/lang/String;Ljava/lang/String;I)I

    move-result v0

    return v0
.end method

.method public static jl()Z
    .registers 3

    .prologue
    .line 282
    invoke-static {}, Lcom/cmcm/safewallet/data/ctrl/j;->ji()Ljava/lang/String;

    move-result-object v0

    .line 283
    invoke-static {}, Lcom/cmcm/safewallet/data/ctrl/j;->jj()Ljava/lang/String;

    move-result-object v1

    .line 284
    invoke-static {}, Lcom/cmcm/safewallet/data/ctrl/j;->jk()I

    move-result v2

    .line 285
    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1c

    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_1c

    if-lez v2, :cond_1c

    const/4 v0, 0x1

    :goto_1b
    return v0

    :cond_1c
    const/4 v0, 0x0

    goto :goto_1b
.end method


# virtual methods
.method public final declared-synchronized ba(Ljava/lang/String;)Z
    .registers 4

    .prologue
    .line 60
    monitor-enter p0

    :try_start_1
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 61
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_15

    invoke-virtual {v0}, Ljava/io/File;->canRead()Z
    :try_end_f
    .catchall {:try_start_1 .. :try_end_f} :catchall_17

    move-result v0

    if-eqz v0, :cond_15

    const/4 v0, 0x1

    :goto_13
    monitor-exit p0

    return v0

    :cond_15
    const/4 v0, 0x0

    goto :goto_13

    .line 60
    :catchall_17
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public final declared-synchronized d(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 9

    .prologue
    const/4 v2, 0x0

    const/4 v0, 0x0

    .line 65
    monitor-enter p0

    :try_start_3
    invoke-virtual {p1}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;
    :try_end_6
    .catchall {:try_start_3 .. :try_end_6} :catchall_60

    move-result-object v1

    .line 70
    :try_start_7
    new-instance v3, Ljava/io/File;

    invoke-direct {v3, p3}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 71
    invoke-virtual {v3}, Ljava/io/File;->exists()Z

    move-result v4

    if-eqz v4, :cond_19

    invoke-virtual {v3}, Ljava/io/File;->canRead()Z

    move-result v4

    if-eqz v4, :cond_19

    const/4 v0, 0x1

    .line 72
    :cond_19
    if-eqz v0, :cond_4b

    .line 73
    invoke-virtual {v3}, Ljava/io/File;->delete()Z
    :try_end_1e
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_1e} :catch_5b
    .catchall {:try_start_7 .. :try_end_1e} :catchall_60

    .line 84
    :cond_1e
    :goto_1e
    :try_start_1e
    invoke-virtual {v1, p2}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;
    :try_end_21
    .catch Ljava/lang/Exception; {:try_start_1e .. :try_end_21} :catch_a6
    .catchall {:try_start_1e .. :try_end_21} :catchall_83

    move-result-object v3

    .line 85
    :try_start_22
    new-instance v1, Ljava/io/FileOutputStream;

    invoke-direct {v1, p3}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V
    :try_end_27
    .catch Ljava/lang/Exception; {:try_start_22 .. :try_end_27} :catch_a9
    .catchall {:try_start_22 .. :try_end_27} :catchall_9e

    .line 87
    const/16 v0, 0x400

    :try_start_29
    new-array v0, v0, [B

    .line 89
    :goto_2b
    invoke-virtual {v3, v0}, Ljava/io/InputStream;->read([B)I

    move-result v2

    const/4 v4, -0x1

    if-eq v2, v4, :cond_63

    .line 90
    const/4 v4, 0x0

    invoke-virtual {v1, v0, v4, v2}, Ljava/io/OutputStream;->write([BII)V
    :try_end_36
    .catch Ljava/lang/Exception; {:try_start_29 .. :try_end_36} :catch_37
    .catchall {:try_start_29 .. :try_end_36} :catchall_a1

    goto :goto_2b

    .line 93
    :catch_37
    move-exception v0

    move-object v2, v3

    :goto_39
    :try_start_39
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_3c
    .catchall {:try_start_39 .. :try_end_3c} :catchall_a3

    .line 95
    if-eqz v2, :cond_41

    .line 97
    :try_start_3e
    invoke-virtual {v2}, Ljava/io/InputStream;->close()V
    :try_end_41
    .catch Ljava/io/IOException; {:try_start_3e .. :try_end_41} :catch_79
    .catchall {:try_start_3e .. :try_end_41} :catchall_60

    .line 103
    :cond_41
    :goto_41
    if-eqz v1, :cond_49

    .line 105
    :try_start_43
    invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V

    .line 106
    invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
    :try_end_49
    .catch Ljava/io/IOException; {:try_start_43 .. :try_end_49} :catch_7e
    .catchall {:try_start_43 .. :try_end_49} :catchall_60

    .line 113
    :cond_49
    :goto_49
    monitor-exit p0

    return-void

    .line 75
    :cond_4b
    :try_start_4b
    invoke-virtual {v3}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    .line 76
    if-eqz v0, :cond_1e

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v3

    if-nez v3, :cond_1e

    .line 77
    invoke-virtual {v0}, Ljava/io/File;->mkdir()Z
    :try_end_5a
    .catch Ljava/lang/Exception; {:try_start_4b .. :try_end_5a} :catch_5b
    .catchall {:try_start_4b .. :try_end_5a} :catchall_60

    goto :goto_1e

    .line 81
    :catch_5b
    move-exception v0

    :try_start_5c
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_5f
    .catchall {:try_start_5c .. :try_end_5f} :catchall_60

    goto :goto_1e

    .line 65
    :catchall_60
    move-exception v0

    monitor-exit p0

    throw v0

    .line 95
    :cond_63
    if-eqz v3, :cond_68

    .line 97
    :try_start_65
    invoke-virtual {v3}, Ljava/io/InputStream;->close()V
    :try_end_68
    .catch Ljava/io/IOException; {:try_start_65 .. :try_end_68} :catch_74
    .catchall {:try_start_65 .. :try_end_68} :catchall_60

    .line 105
    :cond_68
    :goto_68
    :try_start_68
    invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V

    .line 106
    invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
    :try_end_6e
    .catch Ljava/io/IOException; {:try_start_68 .. :try_end_6e} :catch_6f
    .catchall {:try_start_68 .. :try_end_6e} :catchall_60

    goto :goto_49

    .line 108
    :catch_6f
    move-exception v0

    :try_start_70
    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_49

    .line 99
    :catch_74
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_68

    :catch_79
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_41

    .line 108
    :catch_7e
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V
    :try_end_82
    .catchall {:try_start_70 .. :try_end_82} :catchall_60

    goto :goto_49

    .line 95
    :catchall_83
    move-exception v0

    move-object v1, v2

    move-object v3, v2

    :goto_86
    if-eqz v3, :cond_8b

    .line 97
    :try_start_88
    invoke-virtual {v3}, Ljava/io/InputStream;->close()V
    :try_end_8b
    .catch Ljava/io/IOException; {:try_start_88 .. :try_end_8b} :catch_94
    .catchall {:try_start_88 .. :try_end_8b} :catchall_60

    .line 103
    :cond_8b
    :goto_8b
    if-eqz v1, :cond_93

    .line 105
    :try_start_8d
    invoke-virtual {v1}, Ljava/io/OutputStream;->flush()V

    .line 106
    invoke-virtual {v1}, Ljava/io/OutputStream;->close()V
    :try_end_93
    .catch Ljava/io/IOException; {:try_start_8d .. :try_end_93} :catch_99
    .catchall {:try_start_8d .. :try_end_93} :catchall_60

    .line 110
    :cond_93
    :goto_93
    :try_start_93
    throw v0

    .line 99
    :catch_94
    move-exception v2

    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_8b

    .line 108
    :catch_99
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_9d
    .catchall {:try_start_93 .. :try_end_9d} :catchall_60

    goto :goto_93

    .line 95
    :catchall_9e
    move-exception v0

    move-object v1, v2

    goto :goto_86

    :catchall_a1
    move-exception v0

    goto :goto_86

    :catchall_a3
    move-exception v0

    move-object v3, v2

    goto :goto_86

    .line 93
    :catch_a6
    move-exception v0

    move-object v1, v2

    goto :goto_39

    :catch_a9
    move-exception v0

    move-object v1, v2

    move-object v2, v3

    goto :goto_39
.end method