Fandom

HD2 Wiki

DTA

37pages on
this wiki
Add New Page
Comments0 Share

Introduction Edit

Research based on Accessing Mafias DTA files by MassaSnygga.

Archives Edit

Hidden & Dangerous 2 (inc. Add-on)
Archive Decryption key Version
LangEnglish.dta 0xa0a0a0a0a0a0a0a0 ISD1
Maps.dta 0xf26527fab438d0a5 ISD0
Maps_C.dta 0xe26520fab038d0a0 ISD0
Maps_U.dta 0xf26520fab038d1a1 ISD0
Missions.dta 0x22bcda987654a3f0 ISD0
Models.dta 0x10acb2525d805259 ISD0
Others.dta 0x65f7ab23ea85902a ISD0
Patch.dta 0x10acb2525d805270 ISD0
PatchX01.dta 0xa0a0a0a0a0a0a0a2 ISD1
PatchX02.dta 0xa0a0a0a0a0a0a0a3 ISD1
PatchX03.dta 0xa0a0a0a0a0a0a0a4 ISD1
SabreSquadron.dta 0xa0a0a0a0a0a0a0a1 ISD1
Scripts.dta 0xcf7612980ab4e72d ISD0
Sounds.dta 0x8d2965ca4fe85106 ISD1
Mafia: City of Lost Heaven
Archive Decryption key Version
A0.dta 0xd8d0a975467acde0 ISD0
A1.dta 0x3d98766cde7009cd ISD0
A2.dta 0x82a1c97b2d5085d4 ISD0
A3.dta 0x43876fea900cdba8 ISD0
A4.dta 0x43876fea900cdba8 ISD0
A5.dta 0xdeac5342760ce652 ISD0
A6.dta 0x64cd8d0a4bc97b2d ISD0
A7.dta 0xd6fea900cdb76ce6 ISD0
A8.dta 0xd8dd8fac5324ace5 ISD0
A9.dta 0x6fee6324acda4783 ISD0
AA.dta 0x5342760cedeac652 ISD0
AB.dta 0xd8d0a975467acde0 ISD0
AC.dta 0x43876fea900cdba8 ISD0
Chameleon
Archive Decryption key Version
ISData.dta 0xdedc644Bde75ddf2 ISD1
Anims.dta 0xdedc644Bde75ddf2 ISD1
Bin.dta 0xdedc644Bde75ddf2 ISD1
Maps.dta 0xdedc644Bde75ddf2 ISD1
Maps1.dta 0xdedc644Bde75ddf2 ISD1
Missions.dta 0xdedc644Bde75ddf2 ISD1
Models.dta 0xdedc644Bde75ddf2 ISD1
Music.dta 0xdedc644Bde75ddf2 ISD1
Shadows.dta 0xdedc644Bde75ddf2 ISD1
Sounds.dta 0xdedc644Bde75ddf2 ISD1
Tables.dta 0xdedc644Bde75ddf2 ISD1

Decryption Edit

Algorithm (C++)

// Simple
void Decrypt(void* pData, int length, unsigned long long key)
{
    unsigned char* pByte = reinterpret_cast<unsigned char*>(pData);
    unsigned char* pKey = reinterpret_cast<unsigned char*>(key);
 
    for (int i = 0; i < length; ++i)
        pByte[i] = ~((~pByte[i]) ^ pKey[i % 8]);
}
 
 
// Optimized
void Decrypt(void* pData, int length, unsigned long long key)
{
    int nLongLong = length / 8;
    int nBytes = length % 8;
 
    unsigned long long* pLongLong = reinterpret_cast<unsigned long long*>(pData);
    for (int i = 0; i < nLongLong; ++i)
    pLongLong[i] = ~((~pLongLong[i]) ^ key);
 
    if (nBytes > 0) {
        unsigned char* pByte = reinterpret_cast<unsigned char*>(&pLongLong[nLongLong]);
        unsigned char* pKey = reinterpret_cast<unsigned char*>(&key);
        for (int i = 0; i < nBytes; ++i)
            pByte[i] = ~((~pByte[i]) ^ pKey[i]);
    }
}

Structure Edit

Archive header
Offset Type Description
0 32-bit INT number of files
4 32-bit INT file table offset
8 32-bit INT file table size
12 32-bit INT unknown
File table record
Offset Type Description
0 16-bit INT 8-bit checksum of upper filename
2 16-bit INT filename length
4 32-bit INT offset to file header
8 32-bit INT offset to file data
12 16x 8-bit CHAR filename hint
File header
Offset Type Description
0 32-bit INT unknown
4 32-bit INT unknown
8 64-bit INT timestamp (FILETIME)
16 32-bit INT filesize
20 32-bit INT number of compressed blocks
24 16-bit INT flags and filename length
28 4x 8-bit INT unknown
Riff wave header
Offset Type Description
0 4x 8-bit CHAR riff chunk id
4 32-bit INT riff chunk size
8 4x 8-bit CHAR riff type
12 4x 8-bit CHAR format chunk id
16 32-bit INT format chunk size
20 16-bit INT format tag
22 16-bit INT number of channels
24 32-bit INT samples per second
28 32-bit INT average bytes per second
32 16-bit INT block align
34 16-bit INT bits per sample
36 4x 8-bit CHAR data chunk id
40 32-bit INT data chunk size

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.