public ActionWaitForFrame2(int actionLength, SWFInputStream sis) throws IOException {
   super(0x8D, actionLength);
   skipCount = sis.readUI8("skipCount");
   skipped = new ArrayList<>();
   /*for (int i = 0; i < skipCount; i++) {
   Action a = sis.readAction(cpool);
   if (a instanceof ActionEnd) {
   skipCount = i;
   break;
   }
   if (a == null) {
   skipCount = i;
   break;
   }
   skipped.add(a);
   }
   boolean deobfuscate = Configuration.getConfig("autoDeobfuscate", true);
   if (deobfuscate) {
   ByteArrayOutputStream baos = new ByteArrayOutputStream();
   for (int i = 0; i < skipCount; i++) {
   baos.write(skipped.get(i).getBytes(sis.getVersion()));
   }
   baos.write(new ActionEnd().getBytes(sis.getVersion()));
   SWFInputStream sis2 = new SWFInputStream(new ByteArrayInputStream(baos.toByteArray()), sis.getVersion());
   skipped = sis2.readActionList(new ArrayList<DisassemblyListener>(), 0, "");
   if (!skipped.isEmpty()) {
   if (skipped.get(skipped.size() - 1) instanceof ActionEnd) {
   skipped.remove(skipped.size() - 1);
   }
   }
   skipCount = skipped.size();
   }*/
 }
 @Override
 public final void readData(
     SWFInputStream sis,
     ByteArrayRange data,
     int level,
     boolean parallel,
     boolean skipUnusualTags,
     boolean lazy)
     throws IOException {
   fontId = sis.readUI16("fontId");
   if (swf.version >= 6) {
     fontName = sis.readNetString("fontName", Utf8Helper.charset);
   } else {
     fontName = sis.readNetString("fontName");
   }
   reserved = (int) sis.readUB(2, "reserved");
   fontFlagsSmallText = sis.readUB(1, "fontFlagsSmallText") == 1;
   fontFlagsShiftJIS = sis.readUB(1, "fontFlagsShiftJIS") == 1;
   fontFlagsANSI = sis.readUB(1, "fontFlagsANSI") == 1;
   fontFlagsItalic = sis.readUB(1, "fontFlagsItalic") == 1;
   fontFlagsBold = sis.readUB(1, "fontFlagsBold") == 1;
   fontFlagsWideCodes = sis.readUB(1, "fontFlagsWideCodes") == 1;
   codeTable = new ArrayList<>();
   while (sis.available() > 0) {
     if (fontFlagsWideCodes) {
       codeTable.add(sis.readUI16("code"));
     } else {
       codeTable.add(sis.readUI8("code"));
     }
   }
 }
Exemplo n.º 3
0
 /**
  * Constructor
  *
  * @param sis
  * @param data
  * @throws IOException
  */
 public ExporterInfoTag(SWFInputStream sis, ByteArrayRange data) throws IOException {
   super(sis.getSwf(), ID, "ExporterInfo", data);
   this.version = sis.readUI16("version");
   if (this.version >= 0x10a) {
     flags = sis.readUI32("flags");
   }
   bitmapFormat = sis.readUI16("bitmapFormat");
   int prefixLen = sis.readUI8("prefixLen");
   prefix = sis.readBytesEx(prefixLen, "prefix");
   int swfNameLen = sis.readUI8("swfNameLen");
   swfName = new String(sis.readBytesEx(swfNameLen, "swfName"));
   if (sis.available() > 0) // (version >= 0x401) //?
   {
     codeOffsets = new ArrayList<>();
     int numCodeOffsets = sis.readUI16("numCodeOffsets");
     for (int i = 0; i < numCodeOffsets; i++) {
       codeOffsets.add(sis.readUI32("codeOffset"));
     }
   }
 }
 public ActionDefineFunction2(int actionLength, SWFInputStream sis, int version)
     throws IOException {
   super(0x8E, actionLength);
   this.version = version;
   functionName = sis.readString("functionName");
   int numParams = sis.readUI16("numParams");
   registerCount = sis.readUI8("registerCount");
   preloadParentFlag = sis.readUB(1, "preloadParentFlag") == 1;
   preloadRootFlag = sis.readUB(1, "preloadRootFlag") == 1;
   suppressSuperFlag = sis.readUB(1, "suppressSuperFlag") == 1;
   preloadSuperFlag = sis.readUB(1, "preloadSuperFlag") == 1;
   suppressArgumentsFlag = sis.readUB(1, "suppressArgumentsFlag") == 1;
   preloadArgumentsFlag = sis.readUB(1, "preloadArgumentsFlag") == 1;
   suppressThisFlag = sis.readUB(1, "suppressThisFlag") == 1;
   preloadThisFlag = sis.readUB(1, "preloadThisFlag") == 1;
   reserved = (int) sis.readUB(7, "reserved");
   preloadGlobalFlag = sis.readUB(1, "preloadGlobalFlag") == 1;
   for (int i = 0; i < numParams; i++) {
     paramRegisters.add(sis.readUI8("paramRegister"));
     paramNames.add(sis.readString("paramName"));
   }
   codeSize = sis.readUI16("codeSize");
 }
 public ActionWaitForFrame(int actionLength, SWFInputStream sis) throws IOException {
   super(0x8A, actionLength);
   frame = sis.readUI16("frame");
   skipCount = sis.readUI8("skipCount");
   skipped = new ArrayList<>();
 }
 public ActionStoreRegister(int actionLength, SWFInputStream sis) throws IOException {
   super(0x87, actionLength);
   registerNumber = sis.readUI8("registerNumber");
 }