- 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
548 lines
12 KiB
Smali
548 lines
12 KiB
Smali
.class public final Lcom/google/protobuf/ByteString$Output;
|
|
.super Ljava/io/OutputStream;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/google/protobuf/ByteString;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Output"
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final EMPTY_BYTE_ARRAY:[B
|
|
|
|
|
|
# instance fields
|
|
.field private buffer:[B
|
|
|
|
.field private bufferPos:I
|
|
|
|
.field private final flushedBuffers:Ljava/util/ArrayList;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/google/protobuf/ByteString;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private flushedBuffersTotalBytes:I
|
|
|
|
.field private final initialCapacity:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v0, v0, [B
|
|
|
|
sput-object v0, Lcom/google/protobuf/ByteString$Output;->EMPTY_BYTE_ARRAY:[B
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(I)V
|
|
.locals 1
|
|
|
|
.line 1083
|
|
invoke-direct {p0}, Ljava/io/OutputStream;-><init>()V
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
iput p1, p0, Lcom/google/protobuf/ByteString$Output;->initialCapacity:I
|
|
|
|
.line 1088
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1089
|
|
new-array p1, p1, [B
|
|
|
|
iput-object p1, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
return-void
|
|
|
|
.line 1085
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "Buffer size < 0"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private copyArray([BI)[B
|
|
.locals 2
|
|
|
|
.line 1135
|
|
new-array v0, p2, [B
|
|
|
|
.line 1136
|
|
array-length v1, p1
|
|
|
|
invoke-static {v1, p2}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result p2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p1, v1, v0, v1, p2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private flushFullBuffer(I)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1196
|
|
new-instance v1, Lcom/google/protobuf/ByteString$LiteralByteString;
|
|
|
|
iget-object v2, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
invoke-direct {v1, v2}, Lcom/google/protobuf/ByteString$LiteralByteString;-><init>([B)V
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
iget v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffersTotalBytes:I
|
|
|
|
iget-object v1, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
.line 1197
|
|
array-length v1, v1
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
iput v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffersTotalBytes:I
|
|
|
|
iget v1, p0, Lcom/google/protobuf/ByteString$Output;->initialCapacity:I
|
|
|
|
ushr-int/lit8 v0, v0, 0x1
|
|
|
|
.line 1201
|
|
invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {v1, p1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
.line 1202
|
|
new-array p1, p1, [B
|
|
|
|
iput-object p1, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput p1, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private flushLastBuffer()V
|
|
.locals 3
|
|
|
|
iget v0, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
iget-object v1, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
.line 1211
|
|
array-length v2, v1
|
|
|
|
if-ge v0, v2, :cond_0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
.line 1213
|
|
invoke-direct {p0, v1, v0}, Lcom/google/protobuf/ByteString$Output;->copyArray([BI)[B
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1214
|
|
new-instance v2, Lcom/google/protobuf/ByteString$LiteralByteString;
|
|
|
|
invoke-direct {v2, v0}, Lcom/google/protobuf/ByteString$LiteralByteString;-><init>([B)V
|
|
|
|
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1219
|
|
new-instance v1, Lcom/google/protobuf/ByteString$LiteralByteString;
|
|
|
|
iget-object v2, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
invoke-direct {v1, v2}, Lcom/google/protobuf/ByteString$LiteralByteString;-><init>([B)V
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
sget-object v0, Lcom/google/protobuf/ByteString$Output;->EMPTY_BYTE_ARRAY:[B
|
|
|
|
iput-object v0, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
:cond_1
|
|
:goto_0
|
|
iget v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffersTotalBytes:I
|
|
|
|
iget v1, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
iput v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffersTotalBytes:I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public declared-synchronized reset()V
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1179
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffersTotalBytes:I
|
|
|
|
iput v0, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 1182
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized size()I
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffersTotalBytes:I
|
|
|
|
iget v1, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
.line 1171
|
|
monitor-exit p0
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public declared-synchronized toByteString()Lcom/google/protobuf/ByteString;
|
|
.locals 1
|
|
|
|
monitor-enter p0
|
|
|
|
.line 1129
|
|
:try_start_0
|
|
invoke-direct {p0}, Lcom/google/protobuf/ByteString$Output;->flushLastBuffer()V
|
|
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1130
|
|
invoke-static {v0}, Lcom/google/protobuf/ByteString;->copyFrom(Ljava/lang/Iterable;)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit p0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 1188
|
|
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString$Output;->size()I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
filled-new-array {v0, v1}, [Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "<ByteString.Output@%s size=%d>"
|
|
|
|
.line 1186
|
|
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public declared-synchronized write(I)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget v0, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
iget-object v1, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
.line 1094
|
|
array-length v1, v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 1095
|
|
invoke-direct {p0, v0}, Lcom/google/protobuf/ByteString$Output;->flushFullBuffer(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
iget v1, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
iput v2, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
int-to-byte p1, p1
|
|
|
|
.line 1097
|
|
aput-byte p1, v0, v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 1098
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public declared-synchronized write([BII)V
|
|
.locals 3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
.line 1102
|
|
array-length v1, v0
|
|
|
|
iget v2, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
if-gt p3, v1, :cond_0
|
|
|
|
.line 1104
|
|
invoke-static {p1, p2, v0, v2, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
iget p1, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
add-int/2addr p1, p3
|
|
|
|
iput p1, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 1108
|
|
:cond_0
|
|
array-length v1, v0
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
.line 1109
|
|
invoke-static {p1, p2, v0, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
add-int/2addr p2, v1
|
|
|
|
sub-int/2addr p3, v1
|
|
|
|
.line 1114
|
|
invoke-direct {p0, p3}, Lcom/google/protobuf/ByteString$Output;->flushFullBuffer(I)V
|
|
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 1115
|
|
invoke-static {p1, p2, v0, v1, p3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
iput p3, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 1118
|
|
:goto_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public writeTo(Ljava/io/OutputStream;)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1151
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/google/protobuf/ByteString$Output;->flushedBuffers:Ljava/util/ArrayList;
|
|
|
|
.line 1154
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v1
|
|
|
|
new-array v1, v1, [Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Lcom/google/protobuf/ByteString;
|
|
|
|
iget-object v1, p0, Lcom/google/protobuf/ByteString$Output;->buffer:[B
|
|
|
|
iget v2, p0, Lcom/google/protobuf/ByteString$Output;->bufferPos:I
|
|
|
|
.line 1157
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 1158
|
|
array-length v3, v0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
if-ge v4, v3, :cond_0
|
|
|
|
aget-object v5, v0, v4
|
|
|
|
.line 1159
|
|
invoke-virtual {v5, p1}, Lcom/google/protobuf/ByteString;->writeTo(Ljava/io/OutputStream;)V
|
|
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 1162
|
|
:cond_0
|
|
invoke-direct {p0, v1, v2}, Lcom/google/protobuf/ByteString$Output;->copyArray([BI)[B
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/io/OutputStream;->write([B)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
.line 1157
|
|
:try_start_1
|
|
monitor-exit p0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|