apkfuckery/com.discord/smali/com/facebook/soloader/g.smali

860 lines
17 KiB
Smali
Raw Normal View History

2019-02-04 20:08:30 +00:00
.class public final Lcom/facebook/soloader/g;
.super Ljava/lang/Object;
2019-02-04 20:29:01 +00:00
.source "MinElf.java"
2019-02-04 20:08:30 +00:00
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/soloader/g$a;
}
.end annotation
# direct methods
.method private static a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/16 v0, 0x8
invoke-static {p0, p1, v0, p2, p3}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;IJ)V
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->getLong()J
move-result-wide p0
return-wide p0
.end method
.method private static a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;IJ)V
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
invoke-virtual {p1, p2}, Ljava/nio/ByteBuffer;->limit(I)Ljava/nio/Buffer;
:goto_0
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result p2
if-lez p2, :cond_0
invoke-virtual {p0, p1, p3, p4}, Ljava/nio/channels/FileChannel;->read(Ljava/nio/ByteBuffer;J)I
move-result p2
const/4 v1, -0x1
if-eq p2, v1, :cond_0
int-to-long v1, p2
add-long/2addr p3, v1
goto :goto_0
:cond_0
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
move-result p0
if-gtz p0, :cond_1
invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
return-void
:cond_1
new-instance p0, Lcom/facebook/soloader/g$a;
const-string p1, "ELF file truncated"
invoke-direct {p0, p1}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
throw p0
2019-02-04 20:29:01 +00:00
return-void
2019-02-04 20:08:30 +00:00
.end method
.method private static a(Ljava/nio/channels/FileChannel;)[Ljava/lang/String;
2019-05-03 18:53:54 +00:00
.locals 35
2019-02-04 20:08:30 +00:00
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v0, p0
const/16 v1, 0x8
invoke-static {v1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v1
sget-object v2, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v1, v2}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
const-wide/16 v2, 0x0
invoke-static {v0, v1, v2, v3}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v4
const-wide/32 v6, 0x464c457f
cmp-long v8, v4, v6
if-nez v8, :cond_23
const-wide/16 v4, 0x4
invoke-static {v0, v1, v4, v5}, Lcom/facebook/soloader/g;->d(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)S
move-result v6
const/4 v8, 0x1
if-ne v6, v8, :cond_0
goto :goto_0
:cond_0
const/4 v8, 0x0
:goto_0
const-wide/16 v9, 0x5
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->d(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)S
move-result v6
const/4 v11, 0x2
if-ne v6, v11, :cond_1
sget-object v6, Ljava/nio/ByteOrder;->BIG_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v1, v6}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
:cond_1
2019-02-04 20:29:01 +00:00
const-wide/16 v11, 0x1c
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const-wide/16 v13, 0x20
2019-02-04 20:08:30 +00:00
if-eqz v8, :cond_2
2019-02-04 20:29:01 +00:00
invoke-static {v0, v1, v11, v12}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
move-result-wide v15
goto :goto_1
:cond_2
2019-02-04 20:29:01 +00:00
invoke-static {v0, v1, v13, v14}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
move-result-wide v15
:goto_1
const-wide/16 v9, 0x2c
if-eqz v8, :cond_3
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->c(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)I
move-result v6
int-to-long v4, v6
goto :goto_2
:cond_3
const-wide/16 v4, 0x38
invoke-static {v0, v1, v4, v5}, Lcom/facebook/soloader/g;->c(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)I
move-result v4
int-to-long v4, v4
:goto_2
if-eqz v8, :cond_4
const-wide/16 v2, 0x2a
invoke-static {v0, v1, v2, v3}, Lcom/facebook/soloader/g;->c(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)I
move-result v2
2019-02-04 20:29:01 +00:00
goto :goto_3
2019-02-04 20:08:30 +00:00
:cond_4
const-wide/16 v2, 0x36
2019-02-04 20:29:01 +00:00
invoke-static {v0, v1, v2, v3}, Lcom/facebook/soloader/g;->c(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)I
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result v2
:goto_3
2019-02-04 20:08:30 +00:00
const-wide/32 v23, 0xffff
const-wide/16 v9, 0x28
cmp-long v3, v4, v23
if-nez v3, :cond_7
if-eqz v8, :cond_5
2019-02-04 20:29:01 +00:00
invoke-static {v0, v1, v13, v14}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
move-result-wide v3
2019-02-04 20:29:01 +00:00
goto :goto_4
2019-02-04 20:08:30 +00:00
:cond_5
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v3
2019-02-04 20:29:01 +00:00
:goto_4
2019-02-04 20:08:30 +00:00
if-eqz v8, :cond_6
2019-02-04 20:29:01 +00:00
add-long/2addr v3, v11
2019-02-04 20:08:30 +00:00
invoke-static {v0, v1, v3, v4}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v3
2019-02-04 20:29:01 +00:00
goto :goto_5
2019-02-04 20:08:30 +00:00
:cond_6
const-wide/16 v5, 0x2c
add-long/2addr v3, v5
2019-02-04 20:29:01 +00:00
invoke-static {v0, v1, v3, v4}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v3
2019-05-03 18:53:54 +00:00
:goto_5
2019-02-04 20:29:01 +00:00
move-wide v4, v3
2019-02-04 20:08:30 +00:00
:cond_7
move-wide v13, v15
const-wide/16 v11, 0x0
2019-02-04 20:29:01 +00:00
:goto_6
2019-02-04 20:08:30 +00:00
const-wide/16 v23, 0x1
const-wide/16 v25, 0x8
cmp-long v3, v11, v4
if-gez v3, :cond_a
const-wide/16 v21, 0x0
add-long v9, v13, v21
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v9
2019-05-03 18:53:54 +00:00
const-wide/16 v29, 0x2
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v3, v9, v29
2019-02-04 20:08:30 +00:00
if-nez v3, :cond_9
if-eqz v8, :cond_8
const-wide/16 v9, 0x4
add-long/2addr v13, v9
invoke-static {v0, v1, v13, v14}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v9
2019-02-04 20:29:01 +00:00
goto :goto_7
2019-02-04 20:08:30 +00:00
:cond_8
add-long v13, v13, v25
invoke-static {v0, v1, v13, v14}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v9
2019-05-03 18:53:54 +00:00
goto :goto_7
2019-02-04 20:08:30 +00:00
:cond_9
int-to-long v9, v2
add-long/2addr v13, v9
add-long v11, v11, v23
const-wide/16 v9, 0x28
2019-02-04 20:29:01 +00:00
goto :goto_6
2019-02-04 20:08:30 +00:00
:cond_a
const-wide/16 v9, 0x0
2019-05-03 18:53:54 +00:00
:goto_7
2019-02-04 20:08:30 +00:00
const-wide/16 v21, 0x0
cmp-long v3, v9, v21
if-eqz v3, :cond_22
move-wide v11, v9
move-wide/from16 v13, v21
const/4 v3, 0x0
2019-05-03 18:53:54 +00:00
:goto_8
2019-02-04 20:08:30 +00:00
if-eqz v8, :cond_b
2019-05-03 18:53:54 +00:00
move/from16 v29, v8
2019-02-04 20:08:30 +00:00
add-long v7, v11, v21
invoke-static {v0, v1, v7, v8}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:29:01 +00:00
move-result-wide v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_9
2019-02-04 20:08:30 +00:00
:cond_b
2019-05-03 18:53:54 +00:00
move/from16 v29, v8
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
add-long v7, v11, v21
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v0, v1, v7, v8}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result-wide v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_9
const-string v6, "malformed DT_NEEDED section"
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v31, v7, v23
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-nez v31, :cond_d
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide/from16 v31, v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const v9, 0x7fffffff
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eq v3, v9, :cond_c
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-int/lit8 v3, v3, 0x1
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_b
2019-02-04 20:08:30 +00:00
:cond_c
new-instance v0, Lcom/facebook/soloader/g$a;
2019-05-03 18:53:54 +00:00
invoke-direct {v0, v6}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
throw v0
:cond_d
2019-05-03 18:53:54 +00:00
move-wide/from16 v31, v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const-wide/16 v9, 0x5
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v17, v7, v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-nez v17, :cond_f
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v29, :cond_e
2019-02-04 20:08:30 +00:00
const-wide/16 v13, 0x4
2019-05-03 18:53:54 +00:00
add-long v9, v11, v13
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_a
2019-02-04 20:08:30 +00:00
:cond_e
2019-05-03 18:53:54 +00:00
add-long v9, v11, v25
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_a
move-wide v13, v9
2019-02-04 20:08:30 +00:00
:cond_f
2019-05-03 18:53:54 +00:00
:goto_b
const-wide/16 v9, 0x10
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v29, :cond_10
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide/from16 v33, v25
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_c
2019-02-04 20:08:30 +00:00
:cond_10
2019-05-03 18:53:54 +00:00
move-wide/from16 v33, v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_c
add-long v11, v11, v33
2019-02-04 20:08:30 +00:00
const-wide/16 v21, 0x0
2019-05-03 18:53:54 +00:00
cmp-long v33, v7, v21
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-nez v33, :cond_21
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v7, v13, v21
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v7, :cond_20
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const/4 v7, 0x0
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_d
int-to-long v11, v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v8, v11, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-gez v8, :cond_16
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-long v11, v15, v21
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v11, v12}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v11
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v8, v11, v23
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-nez v8, :cond_14
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v29, :cond_11
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-long v11, v15, v25
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v11, v12}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v11
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_e
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:cond_11
2019-05-03 18:53:54 +00:00
add-long v11, v15, v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v11, v12}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v11
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_e
if-eqz v29, :cond_12
2019-02-04 20:08:30 +00:00
const-wide/16 v17, 0x14
2019-05-03 18:53:54 +00:00
add-long v9, v15, v17
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v8
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide/from16 v27, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide v4, v8
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const-wide/16 v8, 0x28
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_f
2019-02-04 20:08:30 +00:00
:cond_12
2019-05-03 18:53:54 +00:00
move-wide/from16 v27, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const-wide/16 v8, 0x28
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-long v4, v15, v8
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v4, v5}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_f
cmp-long v10, v11, v13
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-gtz v10, :cond_15
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-long/2addr v4, v11
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v10, v13, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-gez v10, :cond_15
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v29, :cond_13
2019-02-04 20:08:30 +00:00
const-wide/16 v4, 0x4
2019-05-03 18:53:54 +00:00
add-long v7, v15, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v7, v8}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
move-result-wide v4
2019-05-03 18:53:54 +00:00
goto :goto_10
2019-02-04 20:08:30 +00:00
:cond_13
add-long v4, v15, v25
invoke-static {v0, v1, v4, v5}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
move-result-wide v4
2019-05-03 18:53:54 +00:00
:goto_10
sub-long/2addr v13, v11
2019-02-04 20:08:30 +00:00
add-long/2addr v4, v13
2019-05-03 18:53:54 +00:00
goto :goto_11
2019-02-04 20:08:30 +00:00
:cond_14
2019-05-03 18:53:54 +00:00
move-wide/from16 v27, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const-wide/16 v8, 0x28
2019-02-04 20:08:30 +00:00
:cond_15
2019-05-03 18:53:54 +00:00
int-to-long v4, v2
add-long/2addr v15, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-int/lit8 v7, v7, 0x1
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide/from16 v4, v27
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const-wide/16 v9, 0x10
2019-02-04 20:08:30 +00:00
const-wide/16 v21, 0x0
2019-05-03 18:53:54 +00:00
goto :goto_d
2019-02-04 20:08:30 +00:00
:cond_16
const-wide/16 v4, 0x0
2019-05-03 18:53:54 +00:00
:goto_11
const-wide/16 v7, 0x0
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
cmp-long v2, v4, v7
2019-02-04 20:08:30 +00:00
if-eqz v2, :cond_1f
new-array v2, v3, [Ljava/lang/String;
const/4 v3, 0x0
2019-05-03 18:53:54 +00:00
:goto_12
if-eqz v29, :cond_17
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
add-long v9, v31, v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_13
2019-02-04 20:08:30 +00:00
:cond_17
2019-05-03 18:53:54 +00:00
add-long v9, v31, v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v9, v10}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v9
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_13
cmp-long v7, v9, v23
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-nez v7, :cond_1b
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v29, :cond_18
2019-02-04 20:08:30 +00:00
const-wide/16 v19, 0x4
2019-05-03 18:53:54 +00:00
add-long v7, v31, v19
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v7, v8}, Lcom/facebook/soloader/g;->b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_14
2019-02-04 20:08:30 +00:00
:cond_18
const-wide/16 v19, 0x4
2019-05-03 18:53:54 +00:00
add-long v7, v31, v25
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v7, v8}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-wide v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_14
add-long/2addr v7, v4
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
new-instance v11, Ljava/lang/StringBuilder;
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_15
add-long v12, v7, v23
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-static {v0, v1, v7, v8}, Lcom/facebook/soloader/g;->d(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)S
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eqz v7, :cond_19
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
int-to-char v7, v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
invoke-virtual {v11, v7}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide v7, v12
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_15
2019-02-04 20:08:30 +00:00
:cond_19
2019-05-03 18:53:54 +00:00
invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-result-object v7
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
aput-object v7, v2, v3
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
const v7, 0x7fffffff
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-eq v3, v7, :cond_1a
2019-02-04 20:08:30 +00:00
add-int/lit8 v3, v3, 0x1
2019-05-03 18:53:54 +00:00
goto :goto_16
2019-02-04 20:08:30 +00:00
:cond_1a
new-instance v0, Lcom/facebook/soloader/g$a;
2019-05-03 18:53:54 +00:00
invoke-direct {v0, v6}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
throw v0
:cond_1b
2019-05-03 18:53:54 +00:00
const v7, 0x7fffffff
2019-02-04 20:08:30 +00:00
const-wide/16 v19, 0x4
2019-05-03 18:53:54 +00:00
:goto_16
if-eqz v29, :cond_1c
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
move-wide/from16 v11, v25
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_17
2019-02-04 20:08:30 +00:00
:cond_1c
2019-05-03 18:53:54 +00:00
const-wide/16 v11, 0x10
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
:goto_17
add-long v31, v31, v11
2019-02-04 20:08:30 +00:00
const-wide/16 v21, 0x0
2019-05-03 18:53:54 +00:00
cmp-long v8, v9, v21
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
if-nez v8, :cond_1e
2019-02-04 20:08:30 +00:00
array-length v0, v2
if-ne v3, v0, :cond_1d
return-object v2
:cond_1d
new-instance v0, Lcom/facebook/soloader/g$a;
2019-05-03 18:53:54 +00:00
invoke-direct {v0, v6}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
throw v0
:cond_1e
2019-05-03 18:53:54 +00:00
move-wide/from16 v7, v21
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto :goto_12
2019-02-04 20:08:30 +00:00
:cond_1f
new-instance v0, Lcom/facebook/soloader/g$a;
const-string v1, "did not find file offset of DT_STRTAB table"
invoke-direct {v0, v1}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
throw v0
:cond_20
new-instance v0, Lcom/facebook/soloader/g$a;
const-string v1, "Dynamic section string-table not found"
invoke-direct {v0, v1}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
throw v0
:cond_21
2019-05-03 18:53:54 +00:00
const-wide/16 v8, 0x28
2019-02-04 20:08:30 +00:00
const-wide/16 v19, 0x4
2019-05-03 18:53:54 +00:00
move/from16 v8, v29
move-wide/from16 v9, v31
2019-02-04 20:08:30 +00:00
2019-05-03 18:53:54 +00:00
goto/16 :goto_8
2019-02-04 20:08:30 +00:00
:cond_22
new-instance v0, Lcom/facebook/soloader/g$a;
const-string v1, "ELF file does not contain dynamic linking information"
invoke-direct {v0, v1}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
throw v0
:cond_23
new-instance v0, Lcom/facebook/soloader/g$a;
const-string v1, "file is not ELF"
invoke-direct {v0, v1}, Lcom/facebook/soloader/g$a;-><init>(Ljava/lang/String;)V
throw v0
2019-02-04 20:29:01 +00:00
return-void
2019-02-04 20:08:30 +00:00
.end method
.method private static b(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)J
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x4
invoke-static {p0, p1, v0, p2, p3}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;IJ)V
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->getInt()I
move-result p0
int-to-long p0, p0
const-wide p2, 0xffffffffL
and-long/2addr p0, p2
return-wide p0
.end method
.method private static c(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)I
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x2
invoke-static {p0, p1, v0, p2, p3}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;IJ)V
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->getShort()S
move-result p0
const p1, 0xffff
and-int/2addr p0, p1
return p0
.end method
.method private static d(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;J)S
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x1
invoke-static {p0, p1, v0, p2, p3}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;Ljava/nio/ByteBuffer;IJ)V
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->get()B
move-result p0
and-int/lit16 p0, p0, 0xff
int-to-short p0, p0
return p0
.end method
.method public static r(Ljava/io/File;)[Ljava/lang/String;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
new-instance v0, Ljava/io/FileInputStream;
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
:try_start_0
invoke-virtual {v0}, Ljava/io/FileInputStream;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object p0
invoke-static {p0}, Lcom/facebook/soloader/g;->a(Ljava/nio/channels/FileChannel;)[Ljava/lang/String;
move-result-object p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-virtual {v0}, Ljava/io/FileInputStream;->close()V
return-object p0
:catchall_0
move-exception p0
invoke-virtual {v0}, Ljava/io/FileInputStream;->close()V
throw p0
.end method