XeNTaX Forum Index
Forum MultiEx Commander Tools Tools Home
It is currently Fri Jun 22, 2018 2:31 pm

All times are UTC + 1 hour


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 206 posts ]  Go to page 1, 2, 3, 4, 5 ... 14  Next
Author Message
 Post subject: [REQ][PC]Sleeping Dogs .big files
PostPosted: Wed Aug 15, 2012 4:50 am 
Offline
ultra-n00b

Joined: Wed Aug 15, 2012 4:37 am
Posts: 5
Has thanked: 0 time
Have thanks: 0 time

I've never seen any PC games created by this developer.
Perhaps it takes a long time to release unpack-repack tool.
I think .big is archive and .bix is its index.

You can make the ads go away by registering



Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Wed Aug 15, 2012 11:58 am 
Offline
ultra-n00b

Joined: Wed Aug 15, 2012 11:54 am
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
I have try extractor for DeadRising2, FinalBIG, Dragon UnPACKer -nothing does not help.
Maybe someone knows, how to open these files, please!


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Wed Aug 15, 2012 1:30 pm 
Offline
beginner
User avatar

Joined: Wed Oct 26, 2011 12:05 pm
Posts: 22
Has thanked: 0 time
Have thanks: 1 time
This isn't my sort of thing at all, but it would appear that all BIG files have an empty header of 256 bytes, followed by the first 4 bytes of data being 50 4D 43 51 "PMCQ", which I guess signifies the file type. BIX files seem to all share the same first 4 bytes, A8 40 5C 2C. As Lennox775 suggested, they would appear to be some sort of index file.

My understanding is that the developers United Front Games made their own custom engine, so presumably the file format is custom as well.


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Wed Aug 15, 2012 1:57 pm 
Offline
ultra-n00b

Joined: Wed Aug 15, 2012 11:54 am
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
it's sad ((if we do not get access to files. we can not make mods for this game.
Is there any way out?


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Wed Aug 15, 2012 8:34 pm 
Offline
advanced
User avatar

Joined: Fri Oct 23, 2009 1:29 pm
Posts: 78
Has thanked: 0 time
Have thanks: 33 times
*.bix is a simple format, but as always with Square Enix Games most of it uses hash's instead of real filenames,
i haven't found the function to calculate hashs yet, could take a while.

here the *.bix structure:
Code:
//--------------------------------------
//--- 010 Editor v4.0.2 Binary Template
//
// File: Sleeping Dogs *.bix
// Author: Falo
// Revision: 1.0
//--------------------------------------
struct{
    ubyte magic1[4];        // A8 40 5C 2C
    int filesize1;
    int filesize2;
    int reserved1[4];
    uint checksum<format=hex>;
    int reserved2[2];
    ubyte magic2[4];        // F9 84 E7 2A
    char archive_name[36];
    int unk1[2];            // 2x -1
    int numFiles;
    int magic3;             // always 0x34
    byte junk[magic3-4];    // this is magic3 - 4 Byte junk data, contains archive name and sometimes "D:\UFG"

    struct ENTRY entry[numFiles]<optimize=false>;
}Header;

struct ENTRY{
    uint hash<format=hex>;
    int Offset;             // Offset *= 4
    int SizeEmpty:12;       // Offset += SizeEmpty
    int unk1:20;            // ???
    int CSize;              // Compressed Size, if 0 use USize
    int unk2;               // ???
    int USize;              // Uncompressed Size, if 0 it's a dummy file

    Printf("%08X;%08X;%08X;%08X\n",hash,(Offset*4)+SizeEmpty,CSize,USize);
};


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 1:43 pm 
Offline
veteran

Joined: Mon Apr 23, 2007 11:25 pm
Posts: 100
Has thanked: 2 times
Have thanks: 7 times
I don't think the hashes are calculated from the actual file names.
Here's a list of a few of the hashes from the Game.bix, they're far too incremental to be calculated from a filename (unless they're all very similar file names but even then the algorithm must be pretty bad to produce hashes that similar)

Image


Last edited by twisted on Thu Aug 16, 2012 3:11 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 3:09 pm 
Offline
advanced
User avatar

Joined: Fri Oct 23, 2009 1:29 pm
Posts: 78
Has thanked: 0 time
Have thanks: 33 times
twisted wrote:
I don't think the hashes are calculated from the actual file names.
Here's a list of a few of the hashes from the Game.bix, they're far too incremental to be calculated from a filename (unless they're all very similar file names but even then the algorithm must be pretty bad to produce hashes that similar)


No this is always the case for Square Enix Games, the hashes are sorted to be incremental, it's not sorted after the offsets.
I have seen this in KH1, KH2, KHBBS, Just Cause 2, it is correct.

i found some filenames in HKShip.exe, but not the function
Code:
Data\UI\loading_generic3_tp.perm.bin
Data\UI\loading_generic4_tp.perm.bin
Data\UI\loading_generic7.tp.perm.bin

Data\UI\Icons_Weapon_QSZ92_TP.perm.bin
Data\UI\Icons_Weapon_45CAL_TP.perm.bin
Data\UI\Icons_Weapon_45CAL02_TP.perm.bin
Data\UI\Icons_Weapon_ACT02_TP.perm.bin
Data\UI\Icons_Weapon_ACT_TP.perm.bin
Data\UI\Icons_Weapon_ARGL_TP.perm.bin
Data\UI\Icons_Weapon_PUMPS_TP.perm.bin
Data\UI\Icons_Weapon_SMG_TP.perm.bin
Data\UI\Icons_Weapon_GOLD50_TP.perm.bin
Data\UI\Icons_Weapon_BATON_TP.perm.bin
Data\UI\Icons_Weapon_BROOM_TP.perm.bin
Data\UI\Icons_Weapon_CLEAVER_TP.perm.bin
Data\UI\Icons_Weapon_KNIFE_TP.perm.bin
Data\UI\Icons_Weapon_CROWBAR_TP.perm.bin
Data\UI\Icons_Weapon_STICK_TP.perm.bin
Data\UI\Icons_Weapon_SHOVEL_TP.perm.bin
Data\UI\Icons_Weapon_BRIEFCASE_TP.perm.bin
Data\UI\Icons_Weapon_HAMMER_TP.perm.bin
Data\UI\Icons_Weapon_CANEWALKING_TP.perm.bin
Data\UI\Icons_Weapon_HANDGRINDER_TP.perm.bin
Data\UI\Icons_Weapon_FISHWRAPPED_TP.perm.bin
Data\UI\Icons_Weapon_WOK.perm.bin
Data\UI\Icons_Weapon_FIREEXTINGUISHER.perm.bin
Data\UI\Icons_Weapon_COOKINGPAN.perm.bin
Data\UI\Icons_Weapon_SHOPPINGBAG.perm.bin
Data\UI\Icons_Weapon_DUFFLEBAG.perm.bin
Data\UI\Icons_Weapon_GROCERYBAG.perm.bin

Data\UI\SpyPC_texturepack.perm.bin
Data\UI\casecomplete_texturepack.perm.bin
Data\UI\unlockables_texturepack.perm.bin
Data\UI\garage_texturepack.perm.bin
Data\UI\gametracker_texturepack.perm.bin
Data\UI\camera_texturepack.perm.bin
Data\UI\camera_cctv_texturepack.perm.bin
Data\UI\options_common_texturepack.perm.bin
Data\UI\options_controllers_TexturePack.perm.bin
Data\UI\options_common_texturepack.perm.bin

data\world\game\dlc\%s\dlc%d.perm.bin
%s\Row_%d\TexturePack_%d_%d%s.perm.bin


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 3:22 pm 
Offline
VVIP member
VVIP member
User avatar

Joined: Thu Dec 08, 2005 12:26 pm
Posts: 1925
Location: www.ZENHAX.com
Has thanked: 4 times
Have thanks: 639 times
do you have a sample archive?
I want to test the following script:
*edit* updated script
Code:
open FDDE "BIG" 1

    ubyte magic1[4]        // A8 40 5C 2C
    int filesize1
    int filesize2
    int reserved1[4]
    uint checksum           // <format=hex>
    int reserved2[2]
    ubyte magic2[4]        // F9 84 E7 2A
    char archive_name[36]
    int unk1[2]            // 2x -1
    int numFiles
    int magic3              // always 0x34
    math magic3 -= 4
    byte junk[magic3]

for i = 0 < numFiles
    uint hash               // <format=hex>
    int Offset             // Offset *= 4
    int SizeEmpty:12       // Offset += SizeEmpty
    int unk1:20            // ???
    int CSize              // Compressed Size, if 0 use USize
    int unk2               // ???
    int USize              // Uncompressed Size, if 0 it's a dummy file

    math Offset *= 4
    math Offset += SizeEmpty
    if CSize == 0
        log "" Offset USize 1
    else
        #clog "" Offset CSize USize 1
        log "" Offset CSize 1
    endif
next i
yeah quickbms accepts C structures and bits too :)


Last edited by aluigi on Thu Aug 16, 2012 9:22 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 3:42 pm 
Offline
veteran

Joined: Mon Apr 23, 2007 11:25 pm
Posts: 100
Has thanked: 2 times
Have thanks: 7 times
global .big and .bix

https://dl.dropbox.com/u/9950356/global.rar


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 6:32 pm 
Offline
beginner
User avatar

Joined: Wed Oct 26, 2011 12:05 pm
Posts: 22
Has thanked: 0 time
Have thanks: 1 time
- open input file I:\-=TEMP=-\QuickBMS\Global.bix
- open script SD_BIX.txt
- c_structs: "ubyte" "magic1[4];"
- c_structs: "int" "filesize1"
- c_structs: "int" "filesize2"
- c_structs: "int" "reserved1[4]"
- c_structs: "uint" "checksum"
- c_structs: "int" "reserved2[2]"
- c_structs: "ubyte" "magic2[4];"
- c_structs: "char" "archive_name[36]"
- c_structs: "int" "unk1[2];"
- c_structs: "int" "numFiles"
- c_structs: "int" "magic3;"
- c_structs: "byte" "junk[magic3]"
- c_structs: "uint" "hash"
- c_structs: "int" "Offset;"
- c_structs: "int" "SizeEmpty:12;"
- c_structs: "int" "unk1:20;"
- c_structs: "int" "CSize;"
- c_structs: "int" "unk2;"
- c_structs: "int" "USize;"
- set output folder OUTPUT

offset filesize filename
------------------------------

Error: the requested amount of bytes to allocate is negative (-3)


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 8:25 pm 
Offline
advanced
User avatar

Joined: Fri Oct 23, 2009 1:29 pm
Posts: 78
Has thanked: 0 time
Have thanks: 33 times
yes because the script is wrong ^^
the bigfile is *.big, the fileindex is *.bix, the script reads files only from *.bix which is wrong, here the correct script:

Code:
// use script on *.big file
open FDDE bix 1
goto 0x58 1
get numFiles long 1
goto 0x90 1

for i = 0 < numFiles
    get hash long 1
    get Offset long 1
    get unk1 long 1
    get CSize long 1
    get unk2 long 1
    get USize long 1
   
    set SizeEmpty unk1
    math SizeEmpty &= 0xFFF
    math Offset *= 4
    math Offset += SizeEmpty
   
    if CSize == 0
        log hash Offset USize
    else
        //clog hash Offset CSize USize
      log hash Offset CSize
    endif
next i


Compressed files have a PMCQ Header, in that header is the uncompressed size at 0x18, there are 3 functions in HKShip.exe that uses PMCQ, one of this should be the decompression:

Code:
.text:0087CD93                 cmp     dword ptr [esi], 'QCMP'

.text:0095E679                 mov     dword ptr [edi], 'QCMP'

.text:00ABFFA7                 cmp     eax, 'QCMP'
.text:00ABFFAC                 jz      short loc_ABFFB5
.text:00ABFFAE                 cmp     eax, 'PMCQ'
.text:00ABFFB3                 jnz     short loc_AC0023

is it legal to post the steam protected exe ?


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 10:05 pm 
Offline
Moderator

Joined: Tue Aug 09, 2005 10:10 pm
Posts: 387
Location: California
Has thanked: 0 time
Have thanks: 83 times
File name hash is modified CRC32, will have code up in repository later.

_________________
http://blog.gib.me/

Don't ask me about localization tools; if you don't have the resources to develop them yourself you don't need them.


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Thu Aug 16, 2012 10:23 pm 
Offline
ultra-n00b

Joined: Wed Aug 15, 2012 11:54 am
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
sorry guys I'm in this business just a kid, but I see you're a pro.
please tell me, is it possible to open these .big files?


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Fri Aug 17, 2012 10:02 am 
Offline
ultra-n00b

Joined: Wed Aug 15, 2012 4:37 am
Posts: 5
Has thanked: 0 time
Have thanks: 0 time
onixer wrote:
sorry guys I'm in this business just a kid, but I see you're a pro.
please tell me, is it possible to open these .big files?

Researching and creating tools cannot be done in just a few days. (especially from scratch)
In case of JustCause2 it took two or three weeks to release extract/repack tools.
Be patient please.


Top
 Profile  
 
 Post subject: Re: [REQ][PC]Sleeping Dogs .big files
PostPosted: Sun Aug 19, 2012 10:18 am 
Offline
ultra-n00b

Joined: Mon Jul 11, 2011 10:58 am
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
Well, least there is the advantage that the devs won't be blocking modding with patches, etc, unlike some other companies. lol



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 206 posts ]  Go to page 1, 2, 3, 4, 5 ... 14  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: Google [Bot], Sir Kane and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group