#910 Missing "add" instruction in obfuscated code (obfuscated u30, u32, s32 reading fix)

This commit is contained in:
honfika@gmail.com
2015-06-03 21:00:24 +02:00
parent 6b5fc8fc2d
commit 75ce6c72fa
5 changed files with 7 additions and 5 deletions

View File

@@ -1779,6 +1779,7 @@ public final class SWF implements SWFContainerItem, Timelined {
ABC abc = abcTag.getABC();
for (MethodBody body : abc.bodies) {
AVM2Code code = body.getCode();
body.setCodeBytes(code.getBytes());
}
((Tag) abcTag).setModified(true);

View File

@@ -182,7 +182,7 @@ public class ABCInputStream implements AutoCloseable {
ret += (((long) i) << bytePos);
byteCount++;
bytePos += 7;
} while (nextByte);
} while (nextByte && byteCount < 5);
return ret;
}
@@ -243,7 +243,7 @@ public class ABCInputStream implements AutoCloseable {
}
break;
}
} while (nextByte);
} while (nextByte && byteCount < 5);
endDumpLevel(ret);
return ret;
}

View File

@@ -100,7 +100,7 @@ public final class MethodBody implements Cloneable {
}
public synchronized byte[] getCodeBytes() {
if (code == null) {
if (codeBytes != null) {
return codeBytes;
} else {
return code.getBytes();
@@ -125,6 +125,7 @@ public final class MethodBody implements Cloneable {
public void setCode(AVM2Code code) {
this.code = code;
this.codeBytes = null;
}
public List<Integer> getExceptionEntries() {

View File

@@ -892,7 +892,7 @@ public class Helper {
}
public static GraphTextWriter byteArrayToHexWithHeader(GraphTextWriter writer, byte[] data) {
writer.appendNoHilight("#hexdata").newLine().newLine();
writer.appendNoHilight(hexData).newLine().newLine();
return byteArrayToHex(writer, data, 8, 8, false, false);
}