j.smali
.class public final Lsg/bigo/sdk/network/f/j;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lsg/bigo/sdk/network/c/c;
# instance fields
.field public a:I
.field public b:[I
.field public c:[I
.field private d:I
# direct methods
.method public constructor <init>(I)V
.registers 2
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 25
iput p1, p0, Lsg/bigo/sdk/network/f/j;->d:I
return-void
.end method
# virtual methods
.method public final a(Ljava/nio/ByteBuffer;)I
.registers 2
const/4 p1, 0x0
return p1
.end method
.method public final a()Ljava/nio/ByteBuffer;
.registers 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
const/4 v0, 0x0
return-object v0
.end method
.method public final b()I
.registers 2
const/4 v0, 0x0
return v0
.end method
.method public final b(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
.registers 5
.line 52
iget-object v0, p0, Lsg/bigo/sdk/network/f/j;->b:[I
if-nez v0, :cond_5
return-object p1
.line 56
:cond_5
invoke-static {p1}, Lsg/bigo/svcapi/proto/ProtoHelper;->peekUri(Ljava/nio/ByteBuffer;)I
move-result v0
.line 57
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->array()[B
move-result-object v1
const/16 v2, 0xa
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->limit()I
move-result p1
invoke-static {v1, v2, p1}, Ljava/util/Arrays;->copyOfRange([BII)[B
move-result-object p1
.line 59
new-instance v1, Lsg/bigo/sdk/network/f/c/y;
invoke-direct {v1}, Lsg/bigo/sdk/network/f/c/y;-><init>()V
.line 60
iget v2, p0, Lsg/bigo/sdk/network/f/j;->a:I
iput v2, v1, Lsg/bigo/sdk/network/f/c/y;->a:I
.line 61
iput v0, v1, Lsg/bigo/sdk/network/f/c/y;->b:I
.line 62
iput-object p1, v1, Lsg/bigo/sdk/network/f/c/y;->c:[B
.line 64
invoke-virtual {v1}, Lsg/bigo/sdk/network/f/c/y;->size()I
move-result p1
invoke-static {p1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object p1
.line 65
sget-object v0, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {p1, v0}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
.line 66
invoke-virtual {v1, p1}, Lsg/bigo/sdk/network/f/c/y;->marshall(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
.line 67
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->array()[B
move-result-object p1
iget-object v0, p0, Lsg/bigo/sdk/network/f/j;->b:[I
const/16 v1, 0x20
invoke-static {p1, v0, v1}, Lsg/bigo/svcapi/util/TEACrypt;->encrypt([B[II)[B
move-result-object p1
.line 69
new-instance v0, Lsg/bigo/sdk/network/f/c/a;
invoke-direct {v0}, Lsg/bigo/sdk/network/f/c/a;-><init>()V
.line 70
iget v1, p0, Lsg/bigo/sdk/network/f/j;->d:I
iput v1, v0, Lsg/bigo/sdk/network/f/c/a;->a:I
.line 71
iput-object p1, v0, Lsg/bigo/sdk/network/f/c/a;->b:[B
const/16 p1, 0xd17
.line 72
invoke-static {p1, v0}, Lsg/bigo/svcapi/proto/ProtoHelper;->protoToByteBuffer(ILsg/bigo/svcapi/proto/Marshallable;)Ljava/nio/ByteBuffer;
move-result-object p1
return-object p1
.end method
.method public final c(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
.registers 6
const-string v0, "yysdk-net-udp"
.line 77
iget-object v1, p0, Lsg/bigo/sdk/network/f/j;->c:[I
const/4 v2, 0x0
if-nez v1, :cond_8
return-object v2
.line 81
:cond_8
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->limit()I
move-result v1
invoke-static {v1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v1
.line 82
sget-object v3, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v1, v3}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
.line 83
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 84
invoke-virtual {v1, p1}, Ljava/nio/ByteBuffer;->put(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;
.line 85
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->rewind()Ljava/nio/Buffer;
.line 86
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;
.line 88
invoke-static {v1}, Lsg/bigo/svcapi/proto/ProtoHelper;->skipHeader(Ljava/nio/ByteBuffer;)V
.line 90
new-instance p1, Lsg/bigo/sdk/network/f/c/a;
invoke-direct {p1}, Lsg/bigo/sdk/network/f/c/a;-><init>()V
.line 92
:try_start_29
invoke-virtual {p1, v1}, Lsg/bigo/sdk/network/f/c/a;->unmarshall(Ljava/nio/ByteBuffer;)V
:try_end_2c
.catch Lsg/bigo/svcapi/proto/InvalidProtocolData; {:try_start_29 .. :try_end_2c} :catch_82
.line 98
iget-object p1, p1, Lsg/bigo/sdk/network/f/c/a;->b:[B
iget-object v1, p0, Lsg/bigo/sdk/network/f/j;->c:[I
const/16 v3, 0x20
invoke-static {p1, v1, v3}, Lsg/bigo/svcapi/util/TEACrypt;->decrypt([B[II)[B
move-result-object p1
.line 99
array-length v1, p1
invoke-static {v1}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v1
.line 100
sget-object v3, Ljava/nio/ByteOrder;->LITTLE_ENDIAN:Ljava/nio/ByteOrder;
invoke-virtual {v1, v3}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
.line 101
invoke-virtual {v1, p1}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;
.line 102
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;
.line 104
new-instance p1, Lsg/bigo/sdk/network/f/c/y;
invoke-direct {p1}, Lsg/bigo/sdk/network/f/c/y;-><init>()V
.line 106
:try_start_4b
invoke-virtual {p1, v1}, Lsg/bigo/sdk/network/f/c/y;->unmarshall(Ljava/nio/ByteBuffer;)V
:try_end_4e
.catch Lsg/bigo/svcapi/proto/InvalidProtocolData; {:try_start_4b .. :try_end_4e} :catch_7b
.line 112
iget-object v0, p1, Lsg/bigo/sdk/network/f/c/y;->c:[B
if-nez v0, :cond_54
const/4 v0, 0x0
goto :goto_57
:cond_54
iget-object v0, p1, Lsg/bigo/sdk/network/f/c/y;->c:[B
array-length v0, v0
:goto_57
add-int/lit8 v0, v0, 0xa
.line 113
invoke-static {v0}, Ljava/nio/ByteBuffer;->allocate(I)Ljava/nio/ByteBuffer;
move-result-object v1
.line 114
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;
.line 115
invoke-virtual {v1, v0}, Ljava/nio/ByteBuffer;->putInt(I)Ljava/nio/ByteBuffer;
.line 116
iget v0, p1, Lsg/bigo/sdk/network/f/c/y;->b:I
invoke-virtual {v1, v0}, Ljava/nio/ByteBuffer;->putInt(I)Ljava/nio/ByteBuffer;
const/4 v0, 0x1
.line 117
invoke-virtual {v1, v0}, Ljava/nio/ByteBuffer;->putShort(S)Ljava/nio/ByteBuffer;
.line 118
iget-object v0, p1, Lsg/bigo/sdk/network/f/c/y;->c:[B
if-eqz v0, :cond_77
.line 119
iget-object p1, p1, Lsg/bigo/sdk/network/f/c/y;->c:[B
invoke-virtual {v1, p1}, Ljava/nio/ByteBuffer;->put([B)Ljava/nio/ByteBuffer;
.line 121
:cond_77
invoke-virtual {v1}, Ljava/nio/ByteBuffer;->flip()Ljava/nio/Buffer;
return-object v1
:catch_7b
move-exception p1
const-string v1, "unmarshal PCS_UdpRouter failed"
.line 108
invoke-static {v0, v1, p1}, Lsg/bigo/log/TraceLog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
return-object v2
:catch_82
move-exception p1
const-string v1, "unmarshal PCS_EncryptUdpRouter failed"
.line 94
invoke-static {v0, v1, p1}, Lsg/bigo/log/TraceLog;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
return-object v2
.end method