- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
442 lines
11 KiB
Smali
442 lines
11 KiB
Smali
.class public final Lcom/mbridge/msdk/thrid/okio/DeflaterSink;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lcom/mbridge/msdk/thrid/okio/Sink;
|
|
|
|
|
|
# instance fields
|
|
.field private closed:Z
|
|
|
|
.field private final deflater:Ljava/util/zip/Deflater;
|
|
|
|
.field private final sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/mbridge/msdk/thrid/okio/BufferedSink;Ljava/util/zip/Deflater;)V
|
|
.locals 0
|
|
|
|
.line 50
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
iput-object p2, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
return-void
|
|
|
|
.line 52
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "inflater == null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 51
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "source == null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/mbridge/msdk/thrid/okio/Sink;Ljava/util/zip/Deflater;)V
|
|
.locals 0
|
|
|
|
.line 42
|
|
invoke-static {p1}, Lcom/mbridge/msdk/thrid/okio/Okio;->buffer(Lcom/mbridge/msdk/thrid/okio/Sink;)Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;-><init>(Lcom/mbridge/msdk/thrid/okio/BufferedSink;Ljava/util/zip/Deflater;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private deflate(Z)V
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
.line 82
|
|
invoke-interface {v0}, Lcom/mbridge/msdk/thrid/okio/BufferedSink;->buffer()Lcom/mbridge/msdk/thrid/okio/Buffer;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
const/4 v1, 0x1
|
|
|
|
.line 84
|
|
invoke-virtual {v0, v1}, Lcom/mbridge/msdk/thrid/okio/Buffer;->writableSegment(I)Lcom/mbridge/msdk/thrid/okio/Segment;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v2, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 90
|
|
iget-object v3, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->data:[B
|
|
|
|
iget v4, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
rsub-int v5, v4, 0x2000
|
|
|
|
const/4 v6, 0x2
|
|
|
|
.line 91
|
|
invoke-virtual {v2, v3, v4, v5, v6}, Ljava/util/zip/Deflater;->deflate([BIII)I
|
|
|
|
move-result v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v2, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
iget-object v3, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->data:[B
|
|
|
|
iget v4, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
rsub-int v5, v4, 0x2000
|
|
|
|
.line 92
|
|
invoke-virtual {v2, v3, v4, v5}, Ljava/util/zip/Deflater;->deflate([BII)I
|
|
|
|
move-result v2
|
|
|
|
:goto_1
|
|
if-lez v2, :cond_2
|
|
|
|
.line 95
|
|
iget v3, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
add-int/2addr v3, v2
|
|
|
|
iput v3, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
.line 96
|
|
iget-wide v3, v0, Lcom/mbridge/msdk/thrid/okio/Buffer;->size:J
|
|
|
|
int-to-long v1, v2
|
|
|
|
add-long/2addr v3, v1
|
|
|
|
iput-wide v3, v0, Lcom/mbridge/msdk/thrid/okio/Buffer;->size:J
|
|
|
|
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
.line 97
|
|
invoke-interface {v1}, Lcom/mbridge/msdk/thrid/okio/BufferedSink;->emitCompleteSegments()Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iget-object v2, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 98
|
|
invoke-virtual {v2}, Ljava/util/zip/Deflater;->needsInput()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 99
|
|
iget p1, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->pos:I
|
|
|
|
iget v2, v1, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
if-ne p1, v2, :cond_3
|
|
|
|
.line 101
|
|
invoke-virtual {v1}, Lcom/mbridge/msdk/thrid/okio/Segment;->pop()Lcom/mbridge/msdk/thrid/okio/Segment;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, v0, Lcom/mbridge/msdk/thrid/okio/Buffer;->head:Lcom/mbridge/msdk/thrid/okio/Segment;
|
|
|
|
.line 102
|
|
invoke-static {v1}, Lcom/mbridge/msdk/thrid/okio/SegmentPool;->recycle(Lcom/mbridge/msdk/thrid/okio/Segment;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public close()V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 126
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-virtual {p0}, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->finishDeflate()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
:goto_0
|
|
:try_start_1
|
|
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 132
|
|
invoke-virtual {v1}, Ljava/util/zip/Deflater;->end()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_1
|
|
move-exception v1
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_1
|
|
:goto_1
|
|
:try_start_2
|
|
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
.line 138
|
|
invoke-interface {v1}, Lcom/mbridge/msdk/thrid/okio/Sink;->close()V
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_2
|
|
move-exception v1
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_2
|
|
:goto_2
|
|
const/4 v1, 0x1
|
|
|
|
iput-boolean v1, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->closed:Z
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 144
|
|
invoke-static {v0}, Lcom/mbridge/msdk/thrid/okio/Util;->sneakyRethrow(Ljava/lang/Throwable;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public finishDeflate()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 115
|
|
invoke-virtual {v0}, Ljava/util/zip/Deflater;->finish()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 116
|
|
invoke-direct {p0, v0}, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflate(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public flush()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 110
|
|
invoke-direct {p0, v0}, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflate(Z)V
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
.line 111
|
|
invoke-interface {v0}, Lcom/mbridge/msdk/thrid/okio/BufferedSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public timeout()Lcom/mbridge/msdk/thrid/okio/Timeout;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
.line 148
|
|
invoke-interface {v0}, Lcom/mbridge/msdk/thrid/okio/Sink;->timeout()Lcom/mbridge/msdk/thrid/okio/Timeout;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 152
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "DeflaterSink("
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->sink:Lcom/mbridge/msdk/thrid/okio/BufferedSink;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ")"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public write(Lcom/mbridge/msdk/thrid/okio/Buffer;J)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 58
|
|
iget-wide v0, p1, Lcom/mbridge/msdk/thrid/okio/Buffer;->size:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
move-wide v4, p2
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/mbridge/msdk/thrid/okio/Util;->checkOffsetAndCount(JJJ)V
|
|
|
|
:goto_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v0, p2, v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
.line 61
|
|
iget-object v0, p1, Lcom/mbridge/msdk/thrid/okio/Buffer;->head:Lcom/mbridge/msdk/thrid/okio/Segment;
|
|
|
|
.line 62
|
|
iget v1, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
iget v2, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->pos:I
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
int-to-long v1, v1
|
|
|
|
invoke-static {p2, p3, v1, v2}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v1
|
|
|
|
long-to-int v1, v1
|
|
|
|
iget-object v2, p0, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflater:Ljava/util/zip/Deflater;
|
|
|
|
.line 63
|
|
iget-object v3, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->data:[B
|
|
|
|
iget v4, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->pos:I
|
|
|
|
invoke-virtual {v2, v3, v4, v1}, Ljava/util/zip/Deflater;->setInput([BII)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 66
|
|
invoke-direct {p0, v2}, Lcom/mbridge/msdk/thrid/okio/DeflaterSink;->deflate(Z)V
|
|
|
|
.line 69
|
|
iget-wide v2, p1, Lcom/mbridge/msdk/thrid/okio/Buffer;->size:J
|
|
|
|
int-to-long v4, v1
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
iput-wide v2, p1, Lcom/mbridge/msdk/thrid/okio/Buffer;->size:J
|
|
|
|
.line 70
|
|
iget v2, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->pos:I
|
|
|
|
add-int/2addr v2, v1
|
|
|
|
iput v2, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->pos:I
|
|
|
|
.line 71
|
|
iget v1, v0, Lcom/mbridge/msdk/thrid/okio/Segment;->limit:I
|
|
|
|
if-ne v2, v1, :cond_0
|
|
|
|
.line 72
|
|
invoke-virtual {v0}, Lcom/mbridge/msdk/thrid/okio/Segment;->pop()Lcom/mbridge/msdk/thrid/okio/Segment;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p1, Lcom/mbridge/msdk/thrid/okio/Buffer;->head:Lcom/mbridge/msdk/thrid/okio/Segment;
|
|
|
|
.line 73
|
|
invoke-static {v0}, Lcom/mbridge/msdk/thrid/okio/SegmentPool;->recycle(Lcom/mbridge/msdk/thrid/okio/Segment;)V
|
|
|
|
:cond_0
|
|
sub-long/2addr p2, v4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|