The surge 2 bms edit

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

The surge 2 bms edit

Post by sinnerclown380 »

Can you help me import The surge 2. When I import the surge2 with bms, the game crashes.
h3x3r
Posts: 165
Joined: Wed Jun 01, 2016 5:53 pm

Re: The surge 2 bms edit

Post by h3x3r »

viewtopic.php?t=12544#p52034
You will also need...

Code: Select all

#------------------------------------------------
# The Surge 2 Compressed/Uncompressed file CRC print
# Script version: 1.0
# Author: merlinsvk
# Edited: h3x3r
#------------------------------------------------
encryption crc 0x01800063 "32 0 0 19 1 1"
get SIZE asize
log MEMORY_FILE 0x0 SIZE
encryption "" ""
bigendian
string CRC_VAL p= "CRC %08x" QUICKBMS_CRC
print "%CRC_VAL%"

Use on uncompressed/compressed files and write somewhere crc hex values printed by script. You will need them later in TOC.
Once you will have edited TOC use this script on it. It will generate new one with updated CRC.

Code: Select all

#------------------------------------------------
# Lords Of The Fallen language *.bin CRC fixer
# Script version: 0.2
# Author: merlinsvk
#------------------------------------------------
idstring "\xFC\x89\xC5\xA3"      # just a test if the input file is a supported .bin file

encryption crc 0x01800063 "32 0 0 19 1 1"
get SIZE asize
xmath TXTSIZE "SIZE - 0x18"      # 0x18 = size of header
log MEMORY_FILE 0x18 TXTSIZE   # 0x18 = start of the data block
encryption "" ""

get NAME basename
get EXT extension
string NAME p= "%s.%s_FIXED" NAME EXT
get SIZE asize
log MEMORY_FILE2 0 SIZE                     # create copy of file into RAM
putVarChr MEMORY_FILE2 0x04 QUICKBMS_CRC long   # write new CRC value on position 0x04
putVarChr MEMORY_FILE2 0x14 TXTSIZE long      # write text block size
log NAME 0 SIZE MEMORY_FILE2               # write new file on disk
sinnerclown380
Posts: 59
Joined: Tue Apr 07, 2020 10:34 am

Re: The surge 2 bms edit

Post by sinnerclown380 »

Thanks .