apkfuckery/com.discord/smali_classes2/g0/x$g.smali

404 lines
7.9 KiB
Smali
Raw Normal View History

2020-11-13 01:15:36 +00:00
.class public final Lg0/x$g;
.super Lg0/x;
2020-11-12 02:11:44 +00:00
.source "ParameterHandler.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
2020-11-13 01:15:36 +00:00
value = Lg0/x;
2020-11-12 02:11:44 +00:00
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "g"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
2020-11-13 01:15:36 +00:00
"Lg0/x<",
2020-11-12 02:11:44 +00:00
"TT;>;"
}
.end annotation
# instance fields
.field public final a:Ljava/lang/reflect/Method;
.field public final b:I
.field public final c:Ljava/lang/String;
2020-11-13 01:15:36 +00:00
.field public final d:Lg0/h;
2020-11-12 02:11:44 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
2020-11-13 01:15:36 +00:00
"Lg0/h<",
2020-11-12 02:11:44 +00:00
"TT;",
"Ljava/lang/String;",
">;"
}
.end annotation
.end field
.field public final e:Z
# direct methods
2020-11-13 01:15:36 +00:00
.method public constructor <init>(Ljava/lang/reflect/Method;ILjava/lang/String;Lg0/h;Z)V
2020-11-12 02:11:44 +00:00
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/reflect/Method;",
"I",
"Ljava/lang/String;",
2020-11-13 01:15:36 +00:00
"Lg0/h<",
2020-11-12 02:11:44 +00:00
"TT;",
"Ljava/lang/String;",
">;Z)V"
}
.end annotation
2020-11-13 01:15:36 +00:00
invoke-direct {p0}, Lg0/x;-><init>()V
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iput-object p1, p0, Lg0/x$g;->a:Ljava/lang/reflect/Method;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iput p2, p0, Lg0/x$g;->b:I
2020-11-12 02:11:44 +00:00
const-string p1, "name == null"
invoke-static {p3, p1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/String;
2020-11-13 01:15:36 +00:00
iput-object p1, p0, Lg0/x$g;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iput-object p4, p0, Lg0/x$g;->d:Lg0/h;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iput-boolean p5, p0, Lg0/x$g;->e:Z
2020-11-12 02:11:44 +00:00
return-void
.end method
# virtual methods
2020-11-13 01:15:36 +00:00
.method public a(Lg0/z;Ljava/lang/Object;)V
2020-11-12 02:11:44 +00:00
.locals 17
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
2020-11-13 01:15:36 +00:00
"Lg0/z;",
2020-11-12 02:11:44 +00:00
"TT;)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v0, p0
move-object/from16 v1, p1
move-object/from16 v2, p2
const/4 v3, 0x0
if-eqz v2, :cond_b
2020-11-13 01:15:36 +00:00
iget-object v4, v0, Lg0/x$g;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iget-object v5, v0, Lg0/x$g;->d:Lg0/h;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
invoke-interface {v5, v2}, Lg0/h;->convert(Ljava/lang/Object;)Ljava/lang/Object;
2020-11-12 02:11:44 +00:00
move-result-object v2
check-cast v2, Ljava/lang/String;
2020-11-13 01:15:36 +00:00
iget-boolean v5, v0, Lg0/x$g;->e:Z
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iget-object v6, v1, Lg0/z;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
if-eqz v6, :cond_a
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v6
const/4 v7, 0x0
:goto_0
if-ge v7, v6, :cond_8
invoke-virtual {v2, v7}, Ljava/lang/String;->codePointAt(I)I
move-result v8
const/16 v9, 0x2f
const/4 v10, -0x1
const-string v11, " \"<>^`{}|\\?#"
const/16 v12, 0x7f
const/16 v13, 0x25
const/16 v14, 0x20
if-lt v8, v14, :cond_1
if-ge v8, v12, :cond_1
invoke-virtual {v11, v8}, Ljava/lang/String;->indexOf(I)I
move-result v15
if-ne v15, v10, :cond_1
if-nez v5, :cond_0
if-eq v8, v9, :cond_1
if-ne v8, v13, :cond_0
goto :goto_1
:cond_0
invoke-static {v8}, Ljava/lang/Character;->charCount(I)I
move-result v8
add-int/2addr v7, v8
goto :goto_0
:cond_1
:goto_1
2020-11-13 01:15:36 +00:00
new-instance v8, Ld0/e;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
invoke-direct {v8}, Ld0/e;-><init>()V
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
invoke-virtual {v8, v2, v3, v7}, Ld0/e;->Q(Ljava/lang/String;II)Ld0/e;
2020-11-12 02:11:44 +00:00
const/4 v3, 0x0
:goto_2
if-ge v7, v6, :cond_7
invoke-virtual {v2, v7}, Ljava/lang/String;->codePointAt(I)I
move-result v13
if-eqz v5, :cond_2
const/16 v15, 0x9
if-eq v13, v15, :cond_6
const/16 v15, 0xa
if-eq v13, v15, :cond_6
const/16 v15, 0xc
if-eq v13, v15, :cond_6
const/16 v15, 0xd
if-ne v13, v15, :cond_2
goto :goto_5
:cond_2
if-lt v13, v14, :cond_4
if-ge v13, v12, :cond_4
invoke-virtual {v11, v13}, Ljava/lang/String;->indexOf(I)I
move-result v15
if-ne v15, v10, :cond_4
if-nez v5, :cond_3
if-eq v13, v9, :cond_4
const/16 v9, 0x25
if-ne v13, v9, :cond_3
goto :goto_3
:cond_3
2020-11-13 01:15:36 +00:00
invoke-virtual {v8, v13}, Ld0/e;->U(I)Ld0/e;
2020-11-12 02:11:44 +00:00
goto :goto_5
:cond_4
:goto_3
if-nez v3, :cond_5
2020-11-13 01:15:36 +00:00
new-instance v3, Ld0/e;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
invoke-direct {v3}, Ld0/e;-><init>()V
2020-11-12 02:11:44 +00:00
:cond_5
2020-11-13 01:15:36 +00:00
invoke-virtual {v3, v13}, Ld0/e;->U(I)Ld0/e;
2020-11-12 02:11:44 +00:00
:goto_4
2020-11-13 01:15:36 +00:00
invoke-virtual {v3}, Ld0/e;->K()Z
2020-11-12 02:11:44 +00:00
move-result v9
if-nez v9, :cond_6
2020-11-13 01:15:36 +00:00
invoke-virtual {v3}, Ld0/e;->readByte()B
2020-11-12 02:11:44 +00:00
move-result v9
and-int/lit16 v9, v9, 0xff
const/16 v15, 0x25
2020-11-13 01:15:36 +00:00
invoke-virtual {v8, v15}, Ld0/e;->F(I)Ld0/e;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
sget-object v15, Lg0/z;->l:[C
2020-11-12 02:11:44 +00:00
shr-int/lit8 v16, v9, 0x4
and-int/lit8 v16, v16, 0xf
aget-char v15, v15, v16
2020-11-13 01:15:36 +00:00
invoke-virtual {v8, v15}, Ld0/e;->F(I)Ld0/e;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
sget-object v15, Lg0/z;->l:[C
2020-11-12 02:11:44 +00:00
and-int/lit8 v9, v9, 0xf
aget-char v9, v15, v9
2020-11-13 01:15:36 +00:00
invoke-virtual {v8, v9}, Ld0/e;->F(I)Ld0/e;
2020-11-12 02:11:44 +00:00
goto :goto_4
:cond_6
:goto_5
invoke-static {v13}, Ljava/lang/Character;->charCount(I)I
move-result v9
add-int/2addr v7, v9
const/16 v9, 0x2f
goto :goto_2
:cond_7
2020-11-13 01:15:36 +00:00
invoke-virtual {v8}, Ld0/e;->s()Ljava/lang/String;
2020-11-12 02:11:44 +00:00
move-result-object v3
goto :goto_6
:cond_8
move-object v3, v2
:goto_6
2020-11-13 01:15:36 +00:00
iget-object v5, v1, Lg0/z;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
2020-11-13 01:15:36 +00:00
const-string/jumbo v7, "{"
2020-11-12 02:11:44 +00:00
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2020-11-13 01:15:36 +00:00
const-string/jumbo v4, "}"
2020-11-12 02:11:44 +00:00
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-virtual {v5, v4, v3}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object v3
2020-11-13 01:15:36 +00:00
sget-object v4, Lg0/z;->m:Ljava/util/regex/Pattern;
2020-11-12 02:11:44 +00:00
invoke-virtual {v4, v3}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
move-result-object v4
invoke-virtual {v4}, Ljava/util/regex/Matcher;->matches()Z
move-result v4
if-nez v4, :cond_9
2020-11-13 01:15:36 +00:00
iput-object v3, v1, Lg0/z;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
return-void
:cond_9
new-instance v1, Ljava/lang/IllegalArgumentException;
const-string v3, "@Path parameters shouldn\'t perform path traversal (\'.\' or \'..\'): "
invoke-static {v3, v2}, Lf/e/c/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
invoke-direct {v1, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
:cond_a
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1}, Ljava/lang/AssertionError;-><init>()V
throw v1
:cond_b
2020-11-13 01:15:36 +00:00
iget-object v1, v0, Lg0/x$g;->a:Ljava/lang/reflect/Method;
2020-11-12 02:11:44 +00:00
2020-11-13 01:15:36 +00:00
iget v2, v0, Lg0/x$g;->b:I
2020-11-12 02:11:44 +00:00
const-string v4, "Path parameter \""
invoke-static {v4}, Lf/e/c/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
2020-11-13 01:15:36 +00:00
iget-object v5, v0, Lg0/x$g;->c:Ljava/lang/String;
2020-11-12 02:11:44 +00:00
const-string v6, "\" value must not be null."
invoke-static {v4, v5, v6}, Lf/e/c/a/a;->w(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object v4
new-array v3, v3, [Ljava/lang/Object;
2020-11-13 01:15:36 +00:00
invoke-static {v1, v2, v4, v3}, Lg0/h0;->l(Ljava/lang/reflect/Method;ILjava/lang/String;[Ljava/lang/Object;)Ljava/lang/RuntimeException;
2020-11-12 02:11:44 +00:00
move-result-object v1
throw v1
.end method