You can use a Python script. You can ask ChatGPT to help write it if you don't know how. Here's what it gave me (which looks fine to me)
After installing Python, you can call it from the shell like python path/to/script.py path/to/input/file. You should be able to iterate over your files in powershell and call it for each one. Note that it will modify the input file in place, but you can change that if you want of course.
Code:
import sys
# Put what you want to xor with here
magic_string = b'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-'
# Open the file in read and write mode (binary)
with open(sys.argv[1], 'r+b') as file:
# Read the first 32 bytes
header = bytearray(file.read(32))
# XOR the file data with the magic string byte by byte
for i in range(32):
header[i] ^= magic_string[i]
# Move the file pointer back to the beginning
file.seek(0)
# Write the modified data back to the file
file.write(header)
After installing Python, you can call it from the shell like python path/to/script.py path/to/input/file. You should be able to iterate over your files in powershell and call it for each one. Note that it will modify the input file in place, but you can change that if you want of course.