I did it like that because i copied it from what i'm supposed to do. I log the save to MEMORY_FILE, then i have to append a 14-character string as salt to the end of the save / memory file, which is specific to the region the save file is from.
I guess i could log them completed mem file into another mem file.
Nevertheless, i just tried this short script on my little tohash.bin test file, which i attached.
Encryption sha1 ""
log MEMORY_FILE3 0 0x40
Encryption "" ""
print "SHA-1 hash: %QUICKBMS_HEXHASH%"
The QuickBMS result was a hash of F6934BB884F1748550AA93CFF917F0500AACA45F.
This is what other programs say about the file:
Am i still missing something?
#edit: As an aside, say i need to cancel a for loop on some condition. Would this work?
for i = 0 < FILES
goto 0x6800 # file name position
getdstring NAME 0x10
if NAME = ""
[ code to execute if name is valid ]