CrackMe.apk
Download file
package kotlin.reflect.jvm.internal.impl.protobuf;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
public final class CodedOutputStream {
private final byte[] buffer;
private final int limit;
private final OutputStream output;
private int position;
private int totalBytesWritten = 0;
public static int computeBoolSizeNoTag(boolean z) {
return 1;
}
public static int computeDoubleSizeNoTag(double d) {
return 8;
}
public static int computeFixed32SizeNoTag(int i) {
return 4;
}
public static int computeFixed64SizeNoTag(long j) {
return 8;
}
public static int computeFloatSizeNoTag(float f) {
return 4;
}
static int computePreferredBufferSize(int i) {
if (i > 4096) {
return 4096;
}
return i;
}
public static int computeRawVarint32Size(int i) {
if ((i & -128) == 0) {
return 1;
}
if ((i & -16384) == 0) {
return 2;
}
if ((-2097152 & i) == 0) {
return 3;
}
return (i & -268435456) == 0 ? 4 : 5;
}
public static int computeRawVarint64Size(long j) {
if ((-128 & j) == 0) {
return 1;
}
if ((-16384 & j) == 0) {
return 2;
}
if ((-2097152 & j) == 0) {
return 3;
}
if ((-268435456 & j) == 0) {
return 4;
}
if ((-34359738368L & j) == 0) {
return 5;
}
if ((-4398046511104L & j) == 0) {
return 6;
}
if ((-562949953421312L & j) == 0) {
return 7;
}
if ((-72057594037927936L & j) == 0) {
return 8;
}
return (j & Long.MIN_VALUE) == 0 ? 9 : 10;
}
public static int computeSFixed32SizeNoTag(int i) {
return 4;
}
public static int computeSFixed64SizeNoTag(long j) {
return 8;
}
public static int encodeZigZag32(int i) {
return (i >> 31) ^ (i << 1);
}
public static long encodeZigZag64(long j) {
return (j >> 63) ^ (j << 1);
}
private CodedOutputStream(OutputStream outputStream, byte[] bArr) {
this.output = outputStream;
this.buffer = bArr;
this.position = 0;
this.limit = bArr.length;
}
public static CodedOutputStream newInstance(OutputStream outputStream, int i) {
return new CodedOutputStream(outputStream, new byte[i]);
}
public void writeDouble(int i, double d) throws IOException {
writeTag(i, 1);
writeDoubleNoTag(d);
}
public void writeFloat(int i, float f) throws IOException {
writeTag(i, 5);
writeFloatNoTag(f);
}
public void writeInt32(int i, int i2) throws IOException {
writeTag(i, 0);
writeInt32NoTag(i2);
}
public void writeBool(int i, boolean z) throws IOException {
writeTag(i, 0);
writeBoolNoTag(z);
}
public void writeGroup(int i, MessageLite messageLite) throws IOException {
writeTag(i, 3);
writeGroupNoTag(messageLite);
writeTag(i, 4);
}
public void writeMessage(int i, MessageLite messageLite) throws IOException {
writeTag(i, 2);
writeMessageNoTag(messageLite);
}
public void writeBytes(int i, ByteString byteString) throws IOException {
writeTag(i, 2);
writeBytesNoTag(byteString);
}
public void writeUInt32(int i, int i2) throws IOException {
writeTag(i, 0);
writeUInt32NoTag(i2);
}
public void writeEnum(int i, int i2) throws IOException {
writeTag(i, 0);
writeEnumNoTag(i2);
}
public void writeSInt64(int i, long j) throws IOException {
writeTag(i, 0);
writeSInt64NoTag(j);
}
public void writeMessageSetExtension(int i, MessageLite messageLite) throws IOException {
writeTag(1, 3);
writeUInt32(2, i);
writeMessage(3, messageLite);
writeTag(1, 4);
}
public void writeDoubleNoTag(double d) throws IOException {
writeRawLittleEndian64(Double.doubleToRawLongBits(d));
}
public void writeFloatNoTag(float f) throws IOException {
writeRawLittleEndian32(Float.floatToRawIntBits(f));
}
public void writeUInt64NoTag(long j) throws IOException {
writeRawVarint64(j);
}
public void writeInt64NoTag(long j) throws IOException {
writeRawVarint64(j);
}
public void writeInt32NoTag(int i) throws IOException {
if (i >= 0) {
writeRawVarint32(i);
} else {
writeRawVarint64((long) i);
}
}
public void writeFixed64NoTag(long j) throws IOException {
writeRawLittleEndian64(j);
}
public void writeFixed32NoTag(int i) throws IOException {
writeRawLittleEndian32(i);
}
public void writeBoolNoTag(boolean z) throws IOException {
writeRawByte(z ? 1 : 0);
}
public void writeStringNoTag(String str) throws IOException {
byte[] bytes = str.getBytes("UTF-8");
writeRawVarint32(bytes.length);
writeRawBytes(bytes);
}
public void writeGroupNoTag(MessageLite messageLite) throws IOException {
messageLite.writeTo(this);
}
public void writeMessageNoTag(MessageLite messageLite) throws IOException {
writeRawVarint32(messageLite.getSerializedSize());
messageLite.writeTo(this);
}
public void writeBytesNoTag(ByteString byteString) throws IOException {
writeRawVarint32(byteString.size());
writeRawBytes(byteString);
}
public void writeByteArrayNoTag(byte[] bArr) throws IOException {
writeRawVarint32(bArr.length);
writeRawBytes(bArr);
}
public void writeUInt32NoTag(int i) throws IOException {
writeRawVarint32(i);
}
public void writeEnumNoTag(int i) throws IOException {
writeInt32NoTag(i);
}
public void writeSFixed32NoTag(int i) throws IOException {
writeRawLittleEndian32(i);
}
public void writeSFixed64NoTag(long j) throws IOException {
writeRawLittleEndian64(j);
}
public void writeSInt32NoTag(int i) throws IOException {
writeRawVarint32(encodeZigZag32(i));
}
public void writeSInt64NoTag(long j) throws IOException {
writeRawVarint64(encodeZigZag64(j));
}
public static int computeDoubleSize(int i, double d) {
return computeTagSize(i) + computeDoubleSizeNoTag(d);
}
public static int computeFloatSize(int i, float f) {
return computeTagSize(i) + computeFloatSizeNoTag(f);
}
public static int computeInt32Size(int i, int i2) {
return computeTagSize(i) + computeInt32SizeNoTag(i2);
}
public static int computeBoolSize(int i, boolean z) {
return computeTagSize(i) + computeBoolSizeNoTag(z);
}
public static int computeMessageSize(int i, MessageLite messageLite) {
return computeTagSize(i) + computeMessageSizeNoTag(messageLite);
}
public static int computeBytesSize(int i, ByteString byteString) {
return computeTagSize(i) + computeBytesSizeNoTag(byteString);
}
public static int computeEnumSize(int i, int i2) {
return computeTagSize(i) + computeEnumSizeNoTag(i2);
}
public static int computeSInt64Size(int i, long j) {
return computeTagSize(i) + computeSInt64SizeNoTag(j);
}
public static int computeUInt64SizeNoTag(long j) {
return computeRawVarint64Size(j);
}
public static int computeInt64SizeNoTag(long j) {
return computeRawVarint64Size(j);
}
public static int computeInt32SizeNoTag(int i) {
if (i >= 0) {
return computeRawVarint32Size(i);
}
return 10;
}
public static int computeStringSizeNoTag(String str) {
try {
byte[] bytes = str.getBytes("UTF-8");
return computeRawVarint32Size(bytes.length) + bytes.length;
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("UTF-8 not supported.", e);
}
}
public static int computeGroupSizeNoTag(MessageLite messageLite) {
return messageLite.getSerializedSize();
}
public static int computeMessageSizeNoTag(MessageLite messageLite) {
int serializedSize = messageLite.getSerializedSize();
return computeRawVarint32Size(serializedSize) + serializedSize;
}
public static int computeLazyFieldSizeNoTag(LazyFieldLite lazyFieldLite) {
int serializedSize = lazyFieldLite.getSerializedSize();
return computeRawVarint32Size(serializedSize) + serializedSize;
}
public static int computeBytesSizeNoTag(ByteString byteString) {
return computeRawVarint32Size(byteString.size()) + byteString.size();
}
public static int computeByteArraySizeNoTag(byte[] bArr) {
return computeRawVarint32Size(bArr.length) + bArr.length;
}
public static int computeUInt32SizeNoTag(int i) {
return computeRawVarint32Size(i);
}
public static int computeEnumSizeNoTag(int i) {
return computeInt32SizeNoTag(i);
}
public static int computeSInt32SizeNoTag(int i) {
return computeRawVarint32Size(encodeZigZag32(i));
}
public static int computeSInt64SizeNoTag(long j) {
return computeRawVarint64Size(encodeZigZag64(j));
}
private void refreshBuffer() throws IOException {
OutputStream outputStream = this.output;
if (outputStream != null) {
outputStream.write(this.buffer, 0, this.position);
this.position = 0;
return;
}
throw new OutOfSpaceException();
}
public void flush() throws IOException {
if (this.output != null) {
refreshBuffer();
}
}
public static class OutOfSpaceException extends IOException {
OutOfSpaceException() {
super("CodedOutputStream was writing to a flat byte array and ran out of space.");
}
}
public void writeRawByte(byte b) throws IOException {
if (this.position == this.limit) {
refreshBuffer();
}
byte[] bArr = this.buffer;
int i = this.position;
this.position = i + 1;
bArr[i] = b;
this.totalBytesWritten++;
}
public void writeRawByte(int i) throws IOException {
writeRawByte((byte) i);
}
public void writeRawBytes(ByteString byteString) throws IOException {
writeRawBytes(byteString, 0, byteString.size());
}
public void writeRawBytes(byte[] bArr) throws IOException {
writeRawBytes(bArr, 0, bArr.length);
}
public void writeRawBytes(byte[] bArr, int i, int i2) throws IOException {
int i3 = this.limit;
int i4 = this.position;
if (i3 - i4 >= i2) {
System.arraycopy(bArr, i, this.buffer, i4, i2);
this.position += i2;
this.totalBytesWritten += i2;
return;
}
int i5 = i3 - i4;
System.arraycopy(bArr, i, this.buffer, i4, i5);
int i6 = i + i5;
int i7 = i2 - i5;
this.position = this.limit;
this.totalBytesWritten += i5;
refreshBuffer();
if (i7 <= this.limit) {
System.arraycopy(bArr, i6, this.buffer, 0, i7);
this.position = i7;
} else {
this.output.write(bArr, i6, i7);
}
this.totalBytesWritten += i7;
}
public void writeRawBytes(ByteString byteString, int i, int i2) throws IOException {
int i3 = this.limit;
int i4 = this.position;
if (i3 - i4 >= i2) {
byteString.copyTo(this.buffer, i, i4, i2);
this.position += i2;
this.totalBytesWritten += i2;
return;
}
int i5 = i3 - i4;
byteString.copyTo(this.buffer, i, i4, i5);
int i6 = i + i5;
int i7 = i2 - i5;
this.position = this.limit;
this.totalBytesWritten += i5;
refreshBuffer();
if (i7 <= this.limit) {
byteString.copyTo(this.buffer, i6, 0, i7);
this.position = i7;
} else {
byteString.writeTo(this.output, i6, i7);
}
this.totalBytesWritten += i7;
}
public void writeTag(int i, int i2) throws IOException {
writeRawVarint32(WireFormat.makeTag(i, i2));
}
public static int computeTagSize(int i) {
return computeRawVarint32Size(WireFormat.makeTag(i, 0));
}
public void writeRawVarint32(int i) throws IOException {
while ((i & -128) != 0) {
writeRawByte((i & 127) | 128);
i >>>= 7;
}
writeRawByte(i);
}
public void writeRawVarint64(long j) throws IOException {
while ((-128 & j) != 0) {
writeRawByte((((int) j) & 127) | 128);
j >>>= 7;
}
writeRawByte((int) j);
}
public void writeRawLittleEndian32(int i) throws IOException {
writeRawByte(i & 255);
writeRawByte((i >> 8) & 255);
writeRawByte((i >> 16) & 255);
writeRawByte((i >> 24) & 255);
}
public void writeRawLittleEndian64(long j) throws IOException {
writeRawByte(((int) j) & 255);
writeRawByte(((int) (j >> 8)) & 255);
writeRawByte(((int) (j >> 16)) & 255);
writeRawByte(((int) (j >> 24)) & 255);
writeRawByte(((int) (j >> 32)) & 255);
writeRawByte(((int) (j >> 40)) & 255);
writeRawByte(((int) (j >> 48)) & 255);
writeRawByte(((int) (j >> 56)) & 255);
}
}
Download file