Hello all, we have been targeted by a certain type of spambot that will send messages to our users in their private messages. If you get a message from such a loser/bot, report it to us here, and delete the message !

[REQ][PC]Sleeping Dogs .big files

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
Lennox775
ultra-n00b
Posts: 5
Joined: Wed Aug 15, 2012 4:37 am

[REQ][PC]Sleeping Dogs .big files

Post by Lennox775 » Wed Aug 15, 2012 4:50 am

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.

onixer
ultra-n00b
Posts: 6
Joined: Wed Aug 15, 2012 11:54 am

Re: [REQ][PC]Sleeping Dogs .big files

Post by onixer » Wed Aug 15, 2012 11:58 am

I have try extractor for DeadRising2, FinalBIG, Dragon UnPACKer -nothing does not help.
Maybe someone knows, how to open these files, please!

User avatar
Hairless Wookiee
beginner
Posts: 23
Joined: Wed Oct 26, 2011 12:05 pm
Been thanked: 1 time

Re: [REQ][PC]Sleeping Dogs .big files

Post by Hairless Wookiee » Wed Aug 15, 2012 1:30 pm

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.

onixer
ultra-n00b
Posts: 6
Joined: Wed Aug 15, 2012 11:54 am

Re: [REQ][PC]Sleeping Dogs .big files

Post by onixer » Wed Aug 15, 2012 1:57 pm

it's sad ((if we do not get access to files. we can not make mods for this game.
Is there any way out?

User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [REQ][PC]Sleeping Dogs .big files

Post by Falo » Wed Aug 15, 2012 8:34 pm

*.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: Select all

//--------------------------------------
//--- 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);
};

twisted
veteran
Posts: 100
Joined: Mon Apr 23, 2007 11:25 pm
Has thanked: 2 times
Been thanked: 7 times

Re: [REQ][PC]Sleeping Dogs .big files

Post by twisted » Thu Aug 16, 2012 1:43 pm

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.

User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [REQ][PC]Sleeping Dogs .big files

Post by Falo » Thu Aug 16, 2012 3:09 pm

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: Select all

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

User avatar
aluigi
VVIP member
VVIP member
Posts: 1925
Joined: Thu Dec 08, 2005 12:26 pm
Location: www.ZENHAX.com
Has thanked: 4 times
Been thanked: 644 times
Contact:

Re: [REQ][PC]Sleeping Dogs .big files

Post by aluigi » Thu Aug 16, 2012 3:22 pm

do you have a sample archive?
I want to test the following script:
*edit* updated script

Code: Select all

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.

twisted
veteran
Posts: 100
Joined: Mon Apr 23, 2007 11:25 pm
Has thanked: 2 times
Been thanked: 7 times

Re: [REQ][PC]Sleeping Dogs .big files

Post by twisted » Thu Aug 16, 2012 3:42 pm


User avatar
Hairless Wookiee
beginner
Posts: 23
Joined: Wed Oct 26, 2011 12:05 pm
Been thanked: 1 time

Re: [REQ][PC]Sleeping Dogs .big files

Post by Hairless Wookiee » Thu Aug 16, 2012 6:32 pm

- 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)

User avatar
Falo
advanced
Posts: 78
Joined: Fri Oct 23, 2009 1:29 pm
Been thanked: 33 times

Re: [REQ][PC]Sleeping Dogs .big files

Post by Falo » Thu Aug 16, 2012 8:25 pm

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: Select all

// 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: Select all

.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 ?

Rick
Moderator
Posts: 388
Joined: Tue Aug 09, 2005 10:10 pm
Location: California
Been thanked: 84 times
Contact:

Re: [REQ][PC]Sleeping Dogs .big files

Post by Rick » Thu Aug 16, 2012 10:05 pm

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.

onixer
ultra-n00b
Posts: 6
Joined: Wed Aug 15, 2012 11:54 am

Re: [REQ][PC]Sleeping Dogs .big files

Post by onixer » Thu Aug 16, 2012 10:23 pm

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?

Lennox775
ultra-n00b
Posts: 5
Joined: Wed Aug 15, 2012 4:37 am

Re: [REQ][PC]Sleeping Dogs .big files

Post by Lennox775 » Fri Aug 17, 2012 10:02 am

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.

Gishank
ultra-n00b
Posts: 3
Joined: Mon Jul 11, 2011 10:58 am

Re: [REQ][PC]Sleeping Dogs .big files

Post by Gishank » Sun Aug 19, 2012 10:18 am

Well, least there is the advantage that the devs won't be blocking modding with patches, etc, unlike some other companies. lol

Post Reply