what-the-bank/sources/o/C17133uFJ.java

250 lines
9.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.common.base.Ascii;
import com.google.common.primitives.UnsignedBytes;
import java.io.BufferedInputStream;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
/* renamed from: o.uFJ, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C17133uFJ extends FilterInputStream {
private final int[] f;
private final int g;
private final int[] h;
private final byte[][] i;
private final byte[] j;
private final int k;
private final byte[] l;
private final int m;
private int n;
/* renamed from: o, reason: collision with root package name */
private int f9285o;
private int q;
private int r;
private static final byte[] a = Awr.c;
private static final int[] e = Awr.d;
private static final int[] c = Awr.e;
private static final int[] b = Awr.b;
private static final int[] d = Awr.a;
@Override // java.io.FilterInputStream, java.io.InputStream
public final boolean markSupported() {
return false;
}
public C17133uFJ(InputStream inputStream, int i, byte[] bArr, byte[][] bArr2) {
this(inputStream, i, bArr, bArr2, (byte) 0);
}
private C17133uFJ(InputStream inputStream, int i, byte[] bArr, byte[][] bArr2, byte b2) {
super(new BufferedInputStream(inputStream, 4096));
this.f = new int[4];
this.j = new byte[16];
this.l = new byte[16];
this.n = 1;
this.f9285o = Integer.MAX_VALUE;
this.r = 16;
this.q = 16;
this.g = i;
this.h = Awr.d(bArr, i);
byte[][] bArr3 = new byte[bArr2.length];
for (int i2 = 0; i2 < bArr2.length; i2++) {
bArr3[i2] = new byte[bArr2[i2].length];
int i3 = 0;
while (true) {
byte[] bArr4 = bArr2[i2];
if (i3 < bArr4.length) {
bArr3[i2][bArr4[i3]] = (byte) i3;
i3++;
}
}
}
this.i = bArr3;
this.k = 100;
this.m = 100;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int read() throws IOException {
c();
int i = this.r;
if (i >= this.q) {
return -1;
}
byte[] bArr = this.l;
this.r = i + 1;
return bArr[i] & UnsignedBytes.MAX_VALUE;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int read(byte[] bArr) throws IOException {
return read(bArr, 0, bArr.length);
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int read(byte[] bArr, int i, int i2) throws IOException {
int i3 = i + i2;
for (int i4 = i; i4 < i3; i4++) {
c();
int i5 = this.r;
if (i5 >= this.q) {
if (i4 == i) {
return -1;
}
return i2 - (i3 - i4);
}
byte[] bArr2 = this.l;
this.r = i5 + 1;
bArr[i4] = bArr2[i5];
}
return i2;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final long skip(long j) throws IOException {
long j2 = 0;
while (j2 < j && read() != -1) {
j2++;
}
return j2;
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final int available() throws IOException {
c();
return this.q - this.r;
}
@Override // java.io.FilterInputStream, java.io.InputStream, java.io.Closeable, java.lang.AutoCloseable
public final void close() throws IOException {
super.close();
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final synchronized void mark(int i) {
}
@Override // java.io.FilterInputStream, java.io.InputStream
public final synchronized void reset() throws IOException {
}
private int c() throws IOException {
if (this.f9285o == Integer.MAX_VALUE) {
this.f9285o = ((FilterInputStream) this).in.read();
}
if (this.r == 16) {
byte[] bArr = this.j;
int i = this.f9285o;
bArr[0] = (byte) i;
if (i < 0) {
throw new IllegalStateException("unexpected block size");
}
int i2 = 1;
do {
int read = ((FilterInputStream) this).in.read(this.j, i2, 16 - i2);
if (read <= 0) {
break;
}
i2 += read;
} while (i2 < 16);
if (i2 < 16) {
throw new IllegalStateException("unexpected block size");
}
int i3 = this.k;
if (i3 == this.m) {
d(this.j, this.l);
} else {
if (this.n <= i3) {
d(this.j, this.l);
} else {
byte[] bArr2 = this.j;
System.arraycopy(bArr2, 0, this.l, 0, bArr2.length);
}
int i4 = this.n;
if (i4 < this.m) {
this.n = i4 + 1;
} else {
this.n = 1;
}
}
int read2 = ((FilterInputStream) this).in.read();
this.f9285o = read2;
this.r = 0;
this.q = read2 < 0 ? 16 - (this.l[15] & UnsignedBytes.MAX_VALUE) : 16;
}
return this.q;
}
private void d(byte[] bArr, byte[] bArr2) {
int[] iArr = this.f;
char c2 = 1;
int i = (bArr[0] << Ascii.CAN) | ((bArr[1] & UnsignedBytes.MAX_VALUE) << 16) | ((bArr[2] & UnsignedBytes.MAX_VALUE) << 8) | (bArr[3] & UnsignedBytes.MAX_VALUE);
int[] iArr2 = this.h;
iArr[0] = i ^ iArr2[0];
iArr[1] = ((((bArr[4] << Ascii.CAN) | ((bArr[5] & UnsignedBytes.MAX_VALUE) << 16)) | ((bArr[6] & UnsignedBytes.MAX_VALUE) << 8)) | (bArr[7] & UnsignedBytes.MAX_VALUE)) ^ iArr2[1];
iArr[2] = ((((bArr[8] << Ascii.CAN) | ((bArr[9] & UnsignedBytes.MAX_VALUE) << 16)) | ((bArr[10] & UnsignedBytes.MAX_VALUE) << 8)) | (bArr[11] & UnsignedBytes.MAX_VALUE)) ^ iArr2[2];
iArr[3] = iArr2[3] ^ (((((bArr[13] & UnsignedBytes.MAX_VALUE) << 16) | (bArr[12] << Ascii.CAN)) | ((bArr[14] & UnsignedBytes.MAX_VALUE) << 8)) | (bArr[15] & UnsignedBytes.MAX_VALUE));
int i2 = 4;
int i3 = 1;
while (i3 < this.g) {
int[] iArr3 = e;
int[] iArr4 = this.f;
byte[][] bArr3 = this.i;
byte[] bArr4 = bArr3[0];
int i4 = iArr3[iArr4[bArr4[0]] >>> 24];
int[] iArr5 = c;
byte[] bArr5 = bArr3[c2];
int i5 = i4 ^ iArr5[(iArr4[bArr5[0]] >>> 16) & 255];
int[] iArr6 = b;
byte[] bArr6 = bArr3[2];
int i6 = iArr6[(iArr4[bArr6[0]] >>> 8) & 255] ^ i5;
int[] iArr7 = d;
byte[] bArr7 = bArr3[3];
int i7 = iArr7[iArr4[bArr7[0]] & 255] ^ i6;
int[] iArr8 = this.h;
int i8 = i7 ^ iArr8[i2];
int i9 = ((iArr6[(iArr4[bArr6[c2]] >>> 8) & 255] ^ (iArr3[iArr4[bArr4[c2]] >>> 24] ^ iArr5[(iArr4[bArr5[c2]] >>> 16) & 255])) ^ iArr7[iArr4[bArr7[c2]] & 255]) ^ iArr8[i2 + 1];
int i10 = (((iArr5[(iArr4[bArr5[2]] >>> 16) & 255] ^ iArr3[iArr4[bArr4[2]] >>> 24]) ^ iArr6[(iArr4[bArr6[2]] >>> 8) & 255]) ^ iArr7[iArr4[bArr7[2]] & 255]) ^ iArr8[i2 + 2];
int i11 = (((iArr3[iArr4[bArr4[3]] >>> 24] ^ iArr5[(iArr4[bArr5[3]] >>> 16) & 255]) ^ iArr6[(iArr4[bArr6[3]] >>> 8) & 255]) ^ iArr7[iArr4[bArr7[3]] & 255]) ^ iArr8[i2 + 3];
iArr4[0] = i8;
iArr4[1] = i9;
iArr4[2] = i10;
iArr4[3] = i11;
i3++;
i2 += 4;
c2 = 1;
}
int[] iArr9 = this.h;
int i12 = iArr9[i2];
byte[] bArr8 = a;
int[] iArr10 = this.f;
byte[][] bArr9 = this.i;
byte[] bArr10 = bArr9[0];
bArr2[0] = (byte) (bArr8[iArr10[bArr10[0]] >>> 24] ^ (i12 >>> 24));
byte[] bArr11 = bArr9[1];
bArr2[1] = (byte) (bArr8[(iArr10[bArr11[0]] >>> 16) & 255] ^ (i12 >>> 16));
byte[] bArr12 = bArr9[2];
bArr2[2] = (byte) (bArr8[(iArr10[bArr12[0]] >>> 8) & 255] ^ (i12 >>> 8));
byte[] bArr13 = bArr9[3];
bArr2[3] = (byte) (bArr8[iArr10[bArr13[0]] & 255] ^ i12);
int i13 = iArr9[i2 + 1];
bArr2[4] = (byte) (bArr8[iArr10[bArr10[1]] >>> 24] ^ (i13 >>> 24));
bArr2[5] = (byte) (bArr8[(iArr10[bArr11[1]] >>> 16) & 255] ^ (i13 >>> 16));
bArr2[6] = (byte) (bArr8[(iArr10[bArr12[1]] >>> 8) & 255] ^ (i13 >>> 8));
bArr2[7] = (byte) (i13 ^ bArr8[iArr10[bArr13[1]] & 255]);
int i14 = iArr9[i2 + 2];
bArr2[8] = (byte) (bArr8[iArr10[bArr10[2]] >>> 24] ^ (i14 >>> 24));
bArr2[9] = (byte) (bArr8[(iArr10[bArr11[2]] >>> 16) & 255] ^ (i14 >>> 16));
bArr2[10] = (byte) (bArr8[(iArr10[bArr12[2]] >>> 8) & 255] ^ (i14 >>> 8));
bArr2[11] = (byte) (i14 ^ bArr8[iArr10[bArr13[2]] & 255]);
int i15 = iArr9[i2 + 3];
bArr2[12] = (byte) (bArr8[iArr10[bArr10[3]] >>> 24] ^ (i15 >>> 24));
bArr2[13] = (byte) (bArr8[(iArr10[bArr11[3]] >>> 16) & 255] ^ (i15 >>> 16));
bArr2[14] = (byte) (bArr8[(iArr10[bArr12[3]] >>> 8) & 255] ^ (i15 >>> 8));
bArr2[15] = (byte) (i15 ^ bArr8[iArr10[bArr13[3]] & 255]);
}
}