r/node • • 3d ago

jscdec: Pure-JS V8 Ignition bytecode decompiler for Node.js 20-22 x64 & Electron 22-39 (.jsc)

I built an open-source, pure-JavaScript decompiler for V8 SerializedCodeData (.jsc / Bytenode) snapshots that runs on Node.js >= 18 and in the browser without custom C++ V8 builds:

How it works under the hood:

  • Parses 8-byte uncompressed x64 V8 heaps (Node.js 20.20.2 / 22) and 4-byte pointer-compressed heaps (Electron 22–39 / V8 10.8–14.2) using pre-indexed RO_SPACE and Root tables
  • Extracts ScopeInfo and NameToIndexHashTable entries to recover original closure/local variable names
  • Reconstructs control flow, classes, async/await, try/catch/finally, and includes an opt-in --deobfuscate pass for rotated _0x / RC4 string arrays
  • Never executes untrusted binaries implicitly (runtime oracle requires explicit --allow-runtime-exec)

Feedback and edge-case .jsc samples via Issues/PRs are welcome.

2 Upvotes

2 comments sorted by