Advertisement
xzlui

Balrum Game Save Reader

Jun 2nd, 2025 (edited)
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.87 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #This script will produce a bin and hex file of your game save data located in: .../Balrum/game/files/saves/
  4. #NOTE: I only use this script to identify native addresses that are located in the actual decompiled game save.
  5.  
  6. # Check arguments
  7. if [[ $# -lt 1 ]]; then
  8.     echo "Usage: $0 <path to .sav or pd.big>"
  9.     exit 1
  10. fi
  11.  
  12. INPUT="$1"
  13. BASENAME=$(basename "$INPUT")
  14. OUTPUT="${BASENAME%.*}_raw.bin"
  15. OUTPUT_HEX="${BASENAME%.*}_raw.hex"
  16.  
  17. # Check file existence
  18. if [[ ! -f "$INPUT" ]]; then
  19.     echo "[!] File does not exist: $INPUT"
  20.     exit 1
  21. fi
  22.  
  23. # Decompress and write binary
  24. echo "[] Decompressing $INPUT to $OUTPUT..."
  25. gzip -cd "$INPUT" > "$OUTPUT"
  26.  
  27. # Optional: write hexdump
  28. echo "[] Creating hex dump: $OUTPUT_HEX"
  29. hexdump -C "$OUTPUT" > "$OUTPUT_HEX"
  30.  
  31. echo "[!] Process Complete"
  32. echo " - Raw binary: $OUTPUT"
  33. echo " - Hex view:   $OUTPUT_HEX"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement