XDF and partial disassembly contributed by newellshk.