Need for Speed World (*.HSH;*.BIN)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Need for Speed World (*.HSH;*.BIN)

Post by Ekey »

Simple script for decrypt HSH files :)

Code: Select all

# Need for Speed World (HSH format) Decryptor
#
# Written by Ekey (h4x0r)
#
# script for QuickBMS http://quickbms.aluigi.org

encryption des "12345678" "12345678"
get SIZE asize
log "decrypted_file.dat" 0 SIZE


And simple code for decrypt BIN files from LANGUAGES folder :)

Code: Select all

    for (int i = dwSize - 1; (unsigned int)i >= 1; --i )
        *(BYTE *)(i + pBuffer) ^= *(BYTE *)(i + pBuffer - 1);
    *(BYTE *)pBuffer ^= 0x8Eu;
AMG
Posts: 71
Joined: Sun Aug 10, 2014 1:13 pm

Re: Need for Speed World (*.HSH;*.BIN)

Post by AMG »

Nice, what about a script for .BIN packages of cars?
Ekey
Posts: 1383
Joined: Sat Aug 09, 2014 2:34 pm

Re: Need for Speed World (*.HSH;*.BIN)

Post by Ekey »

About other bin's > they compressed. Try > http://nfs-tools.blogspot.com
AMG
Posts: 71
Joined: Sun Aug 10, 2014 1:13 pm

Re: Need for Speed World (*.HSH;*.BIN)

Post by AMG »

Apparently, seems there's no Tool which works with NFS World .BIN format of cars. Also, the author of the tools is inactive from more than an year ago.
NFSModDev
Posts: 2
Joined: Sat Apr 04, 2015 1:49 pm

Re: Need for Speed World (*.HSH;*.BIN)

Post by NFSModDev »

Ekey wrote:Simple script for decrypt HSH files :)
And simple code for decrypt BIN files from LANGUAGES folder :)

Code: Select all

    for (int i = dwSize - 1; (unsigned int)i >= 1; --i )
        *(BYTE *)(i + pBuffer) ^= *(BYTE *)(i + pBuffer - 1);
    *(BYTE *)pBuffer ^= 0x8Eu;

How to use this code? I try copy it to empty file, saving with the bms extension and use with QuickBMS 0.61d, but have error.
Also I have paste this code after code for decrypt hsh files, but have error too.
QuickBMS reported a error:

Code: Select all

Error: invalid operator 'i'
Last script line before the error or that produced the error:
  1   for (int i = dwSize - 1; (unsigned int)i >= 1; --i

Can anyone help me?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Need for Speed World (*.HSH;*.BIN)

Post by aluigi »

Try the following:

Code: Select all

get SIZE asize
encryption xor_prev "" # "0x8e" from quickbms 0.6.3
log MEMORY_FILE 0 SIZE
getvarchr TMP MEMORY_FILE 0
math TMP ^ 0x8e
putvarchr MEMORY_FILE 0 TMP
get NAME basename
get EXT extension
string NAME p "%s_decrypted.%s" NAME EXT
log NAME 0 SIZE MEMORY_FILE
NFSModDev
Posts: 2
Joined: Sat Apr 04, 2015 1:49 pm

Re: Need for Speed World (*.HSH;*.BIN)

Post by NFSModDev »

aluigi, big thanks! Script works perfrectly with NFS World, NFS Carbon and NFS ProStreet.