- 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
269 lines
4.7 KiB
Smali
269 lines
4.7 KiB
Smali
.class public abstract Lcom/google/firebase/messaging/ByteStreams;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/firebase/messaging/ByteStreams$LimitedInputStream;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public static combineBuffers(Ljava/util/Queue;I)[B
|
|
.locals 6
|
|
|
|
.line 97
|
|
invoke-interface {p0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-array p0, v1, [B
|
|
|
|
return-object p0
|
|
|
|
.line 100
|
|
:cond_0
|
|
invoke-interface {p0}, Ljava/util/Queue;->remove()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [B
|
|
|
|
.line 101
|
|
array-length v2, v0
|
|
|
|
if-ne v2, p1, :cond_1
|
|
|
|
return-object v0
|
|
|
|
.line 104
|
|
:cond_1
|
|
array-length v2, v0
|
|
|
|
sub-int v2, p1, v2
|
|
|
|
.line 105
|
|
invoke-static {v0, p1}, Ljava/util/Arrays;->copyOf([BI)[B
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
if-lez v2, :cond_2
|
|
|
|
.line 107
|
|
invoke-interface {p0}, Ljava/util/Queue;->remove()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, [B
|
|
|
|
.line 108
|
|
array-length v4, v3
|
|
|
|
invoke-static {v2, v4}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v4
|
|
|
|
sub-int v5, p1, v2
|
|
|
|
.line 110
|
|
invoke-static {v3, v1, v0, v5, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
sub-int/2addr v2, v4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static limit(Ljava/io/InputStream;J)Ljava/io/InputStream;
|
|
.locals 1
|
|
|
|
.line 128
|
|
new-instance v0, Lcom/google/firebase/messaging/ByteStreams$LimitedInputStream;
|
|
|
|
invoke-direct {v0, p0, p1, p2}, Lcom/google/firebase/messaging/ByteStreams$LimitedInputStream;-><init>(Ljava/io/InputStream;J)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static saturatedCast(J)I
|
|
.locals 2
|
|
|
|
const-wide/32 v0, 0x7fffffff
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const p0, 0x7fffffff
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const-wide/32 v0, -0x80000000
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
const/high16 p0, -0x80000000
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
long-to-int p0, p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static toByteArray(Ljava/io/InputStream;)[B
|
|
.locals 2
|
|
|
|
.line 124
|
|
new-instance v0, Ljava/util/ArrayDeque;
|
|
|
|
const/16 v1, 0x14
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayDeque;-><init>(I)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/google/firebase/messaging/ByteStreams;->toByteArrayInternal(Ljava/io/InputStream;Ljava/util/Queue;I)[B
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static toByteArrayInternal(Ljava/io/InputStream;Ljava/util/Queue;I)[B
|
|
.locals 7
|
|
|
|
.line 64
|
|
invoke-static {p2}, Ljava/lang/Integer;->highestOneBit(I)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
mul-int/2addr v0, v1
|
|
|
|
const/16 v2, 0x80
|
|
|
|
invoke-static {v2, v0}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v0
|
|
|
|
const/16 v2, 0x2000
|
|
|
|
invoke-static {v2, v0}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v0
|
|
|
|
:goto_0
|
|
const/4 v2, -0x1
|
|
|
|
const v3, 0x7ffffff7
|
|
|
|
if-ge p2, v3, :cond_3
|
|
|
|
sub-int/2addr v3, p2
|
|
|
|
.line 73
|
|
invoke-static {v0, v3}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v3
|
|
|
|
new-array v4, v3, [B
|
|
|
|
.line 74
|
|
invoke-interface {p1, v4}, Ljava/util/Queue;->add(Ljava/lang/Object;)Z
|
|
|
|
const/4 v5, 0x0
|
|
|
|
:goto_1
|
|
if-ge v5, v3, :cond_1
|
|
|
|
sub-int v6, v3, v5
|
|
|
|
.line 78
|
|
invoke-virtual {p0, v4, v5, v6}, Ljava/io/InputStream;->read([BII)I
|
|
|
|
move-result v6
|
|
|
|
if-ne v6, v2, :cond_0
|
|
|
|
.line 80
|
|
invoke-static {p1, p2}, Lcom/google/firebase/messaging/ByteStreams;->combineBuffers(Ljava/util/Queue;I)[B
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
add-int/2addr v5, v6
|
|
|
|
add-int/2addr p2, v6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
int-to-long v2, v0
|
|
|
|
const/16 v4, 0x1000
|
|
|
|
if-ge v0, v4, :cond_2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
move v0, v1
|
|
|
|
:goto_2
|
|
int-to-long v4, v0
|
|
|
|
mul-long/2addr v2, v4
|
|
|
|
.line 72
|
|
invoke-static {v2, v3}, Lcom/google/firebase/messaging/ByteStreams;->saturatedCast(J)I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 88
|
|
:cond_3
|
|
invoke-virtual {p0}, Ljava/io/InputStream;->read()I
|
|
|
|
move-result p0
|
|
|
|
if-ne p0, v2, :cond_4
|
|
|
|
.line 90
|
|
invoke-static {p1, v3}, Lcom/google/firebase/messaging/ByteStreams;->combineBuffers(Ljava/util/Queue;I)[B
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 92
|
|
:cond_4
|
|
new-instance p0, Ljava/lang/OutOfMemoryError;
|
|
|
|
const-string p1, "input is too large to fit in a byte array"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/OutOfMemoryError;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|