#!/usr/bin/env python3 import sys import os from struct import unpack def main(): if not os.path.exists("out"): os.makedirs("out") with open(sys.argv[1], "rb") as rf: count = unpack(" 0: size = min(length, 0x200000) data = rf.read(size) wf.write(data) length -= size if __name__ == "__main__": main()