User authentication is temporarily unavailable. If this situation persists, please inform your Wiki Admin.
 

Download swfdump.jar, along with my patched swfutils.jar: swfdump-8083-patched.zip

This is the patch, taken against http://opensource.adobe.com/svn/opensource/flex/sdk/tags/3.3.0.4852 revision 8083:

  Index: modules/swfutils/src/java/flash/swf/tools/AbcPrinter.java
  ===================================================================
  --- modules/swfutils/src/java/flash/swf/tools/AbcPrinter.java	(revision 8083)
  +++ modules/swfutils/src/java/flash/swf/tools/AbcPrinter.java	(working copy)
  @@ -508,6 +508,28 @@
          {
                  return new StringBuffer().append(hexChars[(b >> 4) & 0xF]).append(hexChars[b & 0xF]).toString();
          }
  +
  +	String printU32(int val)
  +	{
  +		byte cur = (byte)(val & 0xFF);
  +		int rest = val >> 8;
  +
  +		if (rest != 0 || (cur & 0x80) != 0) {
  +			// If we there are bits set in 'rest' or cur's
  +			// high-order bit is set, push cur's high-order
  +			// bit onto the beginning of 'rest'.
  +			rest <<= 1;
  +			rest |= (cur >> 7) & 0x1;
  +		}
  +
  +		if (rest != 0) {
  +			// If more bits are set in 'rest', set cur's
  +			// high-order bit.
  +			cur |= 0x80;
  +		}
  +
  +		return hex(cur) + " " + (rest != 0 ? printU32(rest) : "");
  +	}
          
          void printOffset()
          {
  @@ -1303,10 +1325,12 @@
                  public int kind;
                  public int long1;
                  public int long2;
  -		
  +
                  public String toString()
                  {
                          String s = "";
  +
  +			s += hex((byte)kind) + " ";
                          
                          String[] nsSet;
                          int len;
  @@ -1316,23 +1340,28 @@
                          {
                          case 0x07:	// QName
                          case 0x0D:
  -				s = namespaceConstants[(int)long1] + ":";
  +				s += printU32(long1);
  +				s += printU32(long2);
  +				s += namespaceConstants[(int)long1] + ":";
                                  s += stringConstants[(int)long2];
                                  break;
                          case 0x0F:	// RTQName
                          case 0x10:
  -				s = stringConstants[(int)long1];
  +				s += printU32(long1);
  +				s += stringConstants[(int)long1];
                                  break;
                          case 0x11:	// RTQNameL
                          case 0x12:
  -				s = "RTQNameL";
  +				s += "RTQNameL";
                                  break;
                          case 0x13:	// NameL
                          case 0x14:
  -				s = "NameL";
  +				s += "NameL";
                                  break;
                          case 0x09:
                          case 0x0E:
  +				s += printU32(long1);
  +				s += printU32(long2);
                                  nsSet = namespaceSetConstants[(int)long2];
                                  len = nsSet.length;
                                  for (j = 0; j < len - 1; j++)
  @@ -1345,6 +1374,7 @@
                                  break;
                          case 0x1B:
                          case 0x1C:
  +				s += printU32(long1);
                                  nsSet = namespaceSetConstants[(int)long1];
                                  len = nsSet.length;
                                  for (j = 0; j < len - 1; j++)

This code, including my modifications, are licensed under the MPL.

 
swfutil.txt · Last modified: 2009/12/17 22:32 by wolever
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki