Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:ABC

From ReverseEngineering.wiki
Format
On this wiki Facts · Code · Notes · Topics

ActionScript 3 bytecode file (ABC) run by the AVM2: carried in DoAbc/DoAbc2 tags of a SWF, it starts with minor and major version u16 (46.16 is what the Flash compilers write), then a constant pool, methods, metadata, instances, classes, scripts and method bodies; integers are variable-length u30.

Layout

After u16 minor_version, u16 major_version (normally 16 and 46):

  1. constant pool: int, uint, double, string, namespace, namespace-set and multiname arrays, each with a u30 count where the count includes an implicit entry 0, so n-1 entries follow;
  2. methods (method_info): u30 param count, return type, param types, name, u8 flags (0x01 NEED_ARGUMENTS, 0x02 NEED_ACTIVATION, 0x04 NEED_REST, 0x08 HAS_OPTIONAL, 0x10 IGNORE_REST, 0x20 NATIVE, 0x40 SET_DXNS, 0x80 HAS_PARAM_NAMES), then optional defaults and param names;
  3. metadata entries;
  4. instances (instance_info): name, super name, u8 flags (0x01 sealed, 0x02 final, 0x04 interface, 0x08 has protected namespace), interfaces, instance initializer, traits;
  5. classes (one per instance): static initializer and traits;
  6. scripts: initializer method and traits;
  7. method bodies: method index, max stack, local count, init and max scope depth, code (u30 length then bytes), exception table, traits.

Traits

Name, a flag byte whose low 4 bits give the kind (0 Slot, 1 Method, 2 Getter, 3 Setter, 4 Class, 5 Function, 6 Const), 0x10 final, 0x20 override, 0x40 metadata present, then kind-specific fields.

u30 and i24

u30 is a little-endian base-128 integer of up to 5 bytes (high bit = continue); jump offsets in code are 3-byte signed i24.

Related

Format:SWF

Detail facts: Fact:ABC/enum/Multiname kinds, Fact:ABC/enum/Namespace kinds, Fact:ABC/enum/Default value kinds, Fact:ABC/behavior/Constant pool reading (counts include implicit entry 0), Fact:ABC/behavior/Metadata and instance layout (metadata keys all precede values; protected namespace only when instance flag 0x08), Fact:ABC/struct/method body info and exception, Fact:ABC/enum/AVM2 opcode numbers and Fact:ABC/behavior/Opcode operand encodings. For the older Director/Shockwave plugin format see Format:Adobe Director (RIFX). Unverified: Silverlight XAP (a ZIP with AppManifest.xaml), Java applet JNLP and Unity Web Player .unity3d files have no page yet; for legacy UnityWeb/UnityRaw see Format:Unity asset bundle (UnityFS)#Legacy UnityWeb and UnityRaw.

Code & repositories

  • https://github.com/ruffle-rs/ruffle @ 74323048b31da253175faf7ad1f3b4c8ef13fd66 · license: MIT OR Apache-2.0 (declared by the contributor for the files used; GitHub reports MIT (read from LICENSE.md; GitHub's API was busy) for the repository)
    Ruffle: Flash Player emulator; its swf crate is a complete SWF/AVM1/ABC reader and writer (tag codes, header decompression, ABC structures).
    Tested on: source read, not run: source read only · checked 2026-10-18
  • https://github.com/jindrapetrik/jpexs-decompiler @ de7efbf4754865f46c1c5bd36c9db9cc4ef2fa0b · license: GPL-3.0-or-later (declared by the contributor; GitHub's detector did not recognize a license file)
    JPEXS Free Flash Decompiler (ffdec): SWF/ABC decompiler and editor in Java; ffdec_lib parses every tag and the AVM2 bytecode.
    Tested on: source read, not run: source read only · checked 2026-10-18