mrmaller1905 Posted December 11, 2023 Posted December 11, 2023 What is .BSM/BLK/U and are there programs that can reverse engineer all BioShock 1/2 file formats? Samples: https://mega.nz/folder/1WZ0XBJK#gg8V3r9IhpOqKUQ25X3Wkw
Supporter Solution wq223 Posted April 21 Supporter Solution Posted April 21 The two file formats in the link I provided for you *.U *.bsm files create bms scripts, and the size of each file is basically the same. I suspect this is a chunked compressed overall file, so you can re-merge it into a whole after decompression to see if the content is obviously continuity. # BioShock 1/2 *.U(script0.1) # created by wuqu223 idstring "\xC1\x83\x2A\x9E\x8F\x00\x3B\x00" comtype zlib goto 68 get JUMP_VAL long goto JUMP_VAL for BLOCK = 0 savepos BLOCK_START get ZLEN long get ULEN long if ZLEN <= 0 cleanexit endif if ULEN <= 0 cleanexit endif math DATA_END = BLOCK_START math DATA_END += 8 math DATA_END += ZLEN if DATA_END > filesize cleanexit endif savepos DATA_START clog MEMORY_FILE DATA_START ZLEN ULEN string NAME p= "%08X.bin" BLOCK_START log NAME 0 ULEN MEMORY_FILE math NEXT_POS = DATA_START math NEXT_POS += ZLEN goto NEXT_POS if NEXT_POS >= filesize cleanexit endif next i # BioShock 1/2 *.bsm(script0.1) # created by wuqu223 idstring "\xC1\x83\x2A\x9E\x8D\x00\x38\x00" comtype zlib goto 68 get JUMP_VAL long goto JUMP_VAL for BLOCK = 0 savepos BLOCK_START get ZLEN long if ZLEN <= 0 cleanexit endif math DATA_END = BLOCK_START math DATA_END += 4 math DATA_END += ZLEN if DATA_END > filesize cleanexit endif savepos DATA_START clog MEMORY_FILE DATA_START ZLEN 10000000 get SIZE asize MEMORY_FILE string NAME p= "%08X.bin" BLOCK_START log NAME 0 SIZE MEMORY_FILE math NEXT_POS = DATA_START math NEXT_POS += ZLEN goto NEXT_POS if NEXT_POS >= filesize cleanexit endif next i BioShock.zip
mrmaller1905 Posted April 21 Author Posted April 21 59 minutes ago, wq223 said: The two file formats in the link I provided for you *.U *.bsm files create bms scripts, and the size of each file is basically the same. I suspect this is a chunked compressed overall file, so you can re-merge it into a whole after decompression to see if the content is obviously continuity. # BioShock 1/2 *.U(script0.1) # created by wuqu223 idstring "\xC1\x83\x2A\x9E\x8F\x00\x3B\x00" comtype zlib goto 68 get JUMP_VAL long goto JUMP_VAL for BLOCK = 0 savepos BLOCK_START get ZLEN long get ULEN long if ZLEN <= 0 cleanexit endif if ULEN <= 0 cleanexit endif math DATA_END = BLOCK_START math DATA_END += 8 math DATA_END += ZLEN if DATA_END > filesize cleanexit endif savepos DATA_START clog MEMORY_FILE DATA_START ZLEN ULEN string NAME p= "%08X.bin" BLOCK_START log NAME 0 ULEN MEMORY_FILE math NEXT_POS = DATA_START math NEXT_POS += ZLEN goto NEXT_POS if NEXT_POS >= filesize cleanexit endif next i # BioShock 1/2 *.bsm(script0.1) # created by wuqu223 idstring "\xC1\x83\x2A\x9E\x8D\x00\x38\x00" comtype zlib goto 68 get JUMP_VAL long goto JUMP_VAL for BLOCK = 0 savepos BLOCK_START get ZLEN long if ZLEN <= 0 cleanexit endif math DATA_END = BLOCK_START math DATA_END += 4 math DATA_END += ZLEN if DATA_END > filesize cleanexit endif savepos DATA_START clog MEMORY_FILE DATA_START ZLEN 10000000 get SIZE asize MEMORY_FILE string NAME p= "%08X.bin" BLOCK_START log NAME 0 SIZE MEMORY_FILE math NEXT_POS = DATA_START math NEXT_POS += ZLEN goto NEXT_POS if NEXT_POS >= filesize cleanexit endif next i BioShock.zip 964 B · 1 download Tried the QuickBMS scripts you wrote but I get the errors: BioShock_bsm.bms: Error: incomplete input file 0: C:\Users\PC\Desktop\reverse\0-lighthouse.bsm Can't read 4 bytes from offset 02a2785e. Anyway don't worry, it's possible that the BMS script has been written to exit in this way if it's reached the end of the archive so check it or contact its author or verify that all the files have been extracted. Please check the following coverage information to know if it's ok. coverage file 0 99% 44192062 44202078 . offset 02a2785e Last script line before the error or that produced the error: 13 get ZLEN long coverage file 0 99% 44192062 44202078 . offset 02a2785e coverage file -1 100% 31079 31079 . offset 00000000 BioShock_U.bms: offset filesize filename -------------------------------------- - signature of 8 bytes at offset 0x00000000 doesn't match the one expected by the script: this one: "��*" c1 83 2a 9e 8d 00 38 00 ..*...8. expected: "��*" c1 83 2a 9e 8f 00 3b 00 ..*...;. - 0 files found in 0 seconds coverage file 0 0% 8 13307114 . offset 00000008 Can you update the scripts, and do you care for BLKs?
Supporter wq223 Posted April 21 Supporter Posted April 21 2 hours ago, mrmaller1905 said: 尝试了您编写的 QuickBMS 脚本,但出现错误: BioShock_bsm.bms: BioShock_U.bms: 您可以更新脚本吗?您关心 BLK 吗? Have you tried other files, I'm running it normally I used the same file as you. If the file format has been updated, maybe a new version of the file can be provided, because this post has been a long time, I'm not sure if they have changed.
Supporter wq223 Posted April 21 Supporter Posted April 21 2 hours ago, mrmaller1905 said: Tried the QuickBMS scripts you wrote but I get the errors: BioShock_bsm.bms: Error: incomplete input file 0: C:\Users\PC\Desktop\reverse\0-lighthouse.bsm Can't read 4 bytes from offset 02a2785e. Anyway don't worry, it's possible that the BMS script has been written to exit in this way if it's reached the end of the archive so check it or contact its author or verify that all the files have been extracted. Please check the following coverage information to know if it's ok. coverage file 0 99% 44192062 44202078 . offset 02a2785e Last script line before the error or that produced the error: 13 get ZLEN long coverage file 0 99% 44192062 44202078 . offset 02a2785e coverage file -1 100% 31079 31079 . offset 00000000 BioShock_U.bms: offset filesize filename -------------------------------------- - signature of 8 bytes at offset 0x00000000 doesn't match the one expected by the script: this one: "��*" c1 83 2a 9e 8d 00 38 00 ..*...8. expected: "��*" c1 83 2a 9e 8f 00 3b 00 ..*...;. - 0 files found in 0 seconds coverage file 0 0% 8 13307114 . offset 00000008 Can you update the scripts, and do you care for BLKs? I've read the error message you provided again The script is running normally, this error is due to the ending problem Because the end of the file has been reached, this is because the ending problem has not been handled carefully, but the file has been completely extracted, so it can be ignored directly You can check if there are any files in the folder you entered
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now