#!/bin/bash
echo -e "== Extracting binary from packer..."
gdb --nh --batch-silent -x gdbscript ./RoveConnectCTL.antianalysis
echo -e "\n== Fixing up binary..."
gcc -Os -fPIC -fpic -c -o fixup.o fixup.s
objcopy fixup.o -j .text -O binary fixup.bin
python3 fixer.py
chmod a+x inner.patched
echo -e "== Running..."
./inner.patched <input
