#!/bin/sh # regen.sh -- regenerate the disassembly & pseudocode from the stock binary. # Requires radare2 (>=6.x): brew install radare2 set -e BIN=QuNexus_Firmware_v2.2.1.bin command -v r2 >/dev/null || { echo "radare2 (r2) not found; brew install radare2"; exit 1; } r2 -a 8051 -b 8 -m 0x2400 -q -i r2script.r2 "$BIN" 2>&1 | grep -vE "^WARN|^INFO" echo "regenerated: functions.txt qunexus_v2.2.1.asm pseudocode_all.c"