Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #This script will produce a bin and hex file of your game save data located in: .../Balrum/game/files/saves/
- #NOTE: I only use this script to identify native addresses that are located in the actual decompiled game save.
- # Check arguments
- if [[ $# -lt 1 ]]; then
- echo "Usage: $0 <path to .sav or pd.big>"
- exit 1
- fi
- INPUT="$1"
- BASENAME=$(basename "$INPUT")
- OUTPUT="${BASENAME%.*}_raw.bin"
- OUTPUT_HEX="${BASENAME%.*}_raw.hex"
- # Check file existence
- if [[ ! -f "$INPUT" ]]; then
- echo "[!] File does not exist: $INPUT"
- exit 1
- fi
- # Decompress and write binary
- echo "[] Decompressing $INPUT to $OUTPUT..."
- gzip -cd "$INPUT" > "$OUTPUT"
- # Optional: write hexdump
- echo "[] Creating hex dump: $OUTPUT_HEX"
- hexdump -C "$OUTPUT" > "$OUTPUT_HEX"
- echo "[!] Process Complete"
- echo " - Raw binary: $OUTPUT"
- echo " - Hex view: $OUTPUT_HEX"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement