Skip to content

ZAPiT Bytecode

Piotr Halama edited this page Apr 29, 2024 · 6 revisions

The first 8-bytes of the header for compressed ZBC files is: 1b 5a 42 43 0a 1a 00 00 (ZCS)

After decompression via zlib, header remains:

  • this becomes [1B] [Z] [B] [C] [0A] [1A] so I'm going to just call this ZAPiT Bytecode for now.
  • further in the file is "=(zap compiler)"

I believe this is a variation of lua bytecode, possibly slightly modified. This assumption is based on the known fact that lua is used as a game language for the console.

If we assume that it's using a variation of lua bytecode we should be able to disassemble or decompile it (https://stackoverflow.com/questions/64943979/how-to-decompile-a-lua-file)

Upon further investigation, The ZBC header format seems to follow lua bytecode standards. There might be a way to modify luac's disassembler to ignore the differences?

Clone this wiki locally