// original version from GoogleLoginService.apk .method private static readInt([BI)I .locals 2 .parameter "src" .parameter "offset" .prologue .line 228 const/4 v0, 0x0 .line 232 .local v0, i:I #v0=(Null); aget-byte v1, p0, p1 #v1=(Byte); and-int/lit16 v1, v1, 0xff #v1=(Integer); shl-int/lit8 v1, v1, 0x18 or-int/2addr v0, v1 .line 233 #v0=(Integer); add-int/lit8 v1, p1, 0x1 aget-byte v1, p0, v1 #v1=(Byte); and-int/lit16 v1, v1, 0xff #v1=(Integer); shl-int/lit8 v1, v1, 0x10 or-int/2addr v0, v1 .line 234 add-int/lit8 v1, p1, 0x2 aget-byte v1, p0, v1 #v1=(Byte); and-int/lit16 v1, v1, 0xff #v1=(Integer); shl-int/lit8 v1, v1, 0x8 or-int/2addr v0, v1 .line 235 add-int/lit8 v1, p1, 0x3 aget-byte v1, p0, v1 #v1=(Byte); and-int/lit16 v1, v1, 0xff #v1=(Integer); or-int/2addr v0, v1 .line 236 return v0 .end method // my clean version public static int readInt(byte[] src, int offset) { byte v0 = 0; byte v1 = (src[offset] & 0xFF) << 0x18; v0 = v1 | v0; v1 = (src[offset + 1] & 0xFF) << 0x10; v0 = v1 | v0; v1 = (src[offest + 2] & 0xFF) << 0x8; v0 = v1 | v0; v1 = src[offset + 3] & 0xFF v0 = v1 | v0; return v0; }