READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

300Heroes - dat-file decrypt/decompress? We want to trans it

Read or post about compression. And decompression. Or ask questions how to decompress your files.
Post Reply
ChrisX930
veteran
Posts: 145
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

300Heroes - dat-file decrypt/decompress? We want to trans it

Post by ChrisX930 » Mon Feb 02, 2015 11:42 pm

Hey Guys,

me and five friends of mine want to translate the Game "300 Heroes" (fake League of Legends clone from China) to english Language.

Right now, we're able to extract all files from the data.jmp (519MB ~ ).
We're already changed all texts from the image-files from chinese to english.

We opened it in "Excel" (works with notepad++, too) to "read" it.
It looks like this:
Image


We opened the same file in hex-editor, but it looks like this (because of chinese letters)
Image

We know that we can't replace the chinese signs with letters in notepad++, it will destroy the file, that's the reason why we want to "decompress/decrypt" it to modify this file like we want (add stuff, replace stuff).

Would be cool if you can help us with this, this would be the first English translation for this game! :)

Here's the file to check it.
You do not have the required permissions to view the files attached to this post.

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 132 times

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by WRS » Tue Feb 03, 2015 1:40 am

fairly straightforward, except the string sizes - which are bit swizzled!


edit
decoded the length swizzling 8)

Code: Select all

//--------------------------------------
//--- 010 Editor v5.0 Binary Template
// v2 - completely parsed!
//--------------------------------------

#include "prelen.bt"

local uint p;

struct varbyte
{
    local uint len = 2;

    ubyte marker_begin;
    Assert(marker_begin == 0xa);
    ubyte size;
    ubyte unknown; // or marker_end
    if( unknown != 0xa )
    {
        //len = 3;
        ubyte marker_end;
    }
};

struct entry
{
    varbyte entry_size;

//    if( entry_size.unknown != 0xa )
//    {
//        Printf("%u and %u\n", entry_size.size, entry_size.len);
//    }

    str name(plen8);

    // this condition is wrong!!
    // todo: decode the size (same routine as below?)
    if( (entry_size.size - name.len - entry_size.len) > 0 )
    {
        ubyte hint;
        Assert(hint == 0x12);

        ubyte val_size;

        local uint real_len = ReadUByte(FTell());
    
        // general logic (10 picked because samples goes up to 9)
        if( real_len < 10 )
        {
            ubyte _lenhint;
            real_len = val_size;

            // bit swizzling logic:

            if( (_lenhint & 1) == 0 )
                real_len ^= 0x80;

            real_len |= (_lenhint >> 1) * 0x100;
        }
        else
        {
            real_len = val_size;
        }
        
        str val(real_len);
    }
};

while( !FEof() )
{
  entry e;
};
Useful tool links:

ChrisX930
veteran
Posts: 145
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by ChrisX930 » Tue Feb 03, 2015 9:10 am

Nice :D
One Question, how can I decrypt and re-encrypt the file with this? :P

EDIT:
I see that I can find all values now in Template Results.
But is ist possible to add new Entrys or edit entrys with more characters than the original one?
Image

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 132 times

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by WRS » Wed Feb 04, 2015 12:16 am

hey - i didn't think i'd have time to, but i'm writing a tool :keke:

source: https://github.com/x1nixmzeng/300HLoc

can you test the attached file please! i want to know if the game can handle slightly different flags

edit
removed file
Last edited by WRS on Thu Feb 05, 2015 12:36 am, edited 1 time in total.
Useful tool links:

ChrisX930
veteran
Posts: 145
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by ChrisX930 » Wed Feb 04, 2015 9:42 am

WRS wrote:hey - i didn't think i'd have time to, but i'm writing a tool :keke:

source: https://github.com/x1nixmzeng/300HLoc

can you test the attached file please! i want to know if the game can handle slightly different flags
It seems that the Game can't handle it.
It does not load anything from this file anymore.

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 132 times

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by WRS » Thu Feb 05, 2015 12:39 am

ChrisX930 wrote:It seems that the Game can't handle it.
It does not load anything from this file anymore.
nevermind. i've finished the tool :)
it requires the .net 4.5 runtime

very easy to use, here we go:

to get the strings into a text file:

Code: Select all

300HLoc.exe string_client_c.dat strings.txt
to convert back

Code: Select all

300HLoc.exe strings.txt string_client_c.dat
note: strings with extra lines have been replaced with <NEWLINE> - do not translate that (:

enjoy ! and post a link or pm me when you translate the game to english 8)
You do not have the required permissions to view the files attached to this post.
Useful tool links:

ChrisX930
veteran
Posts: 145
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by ChrisX930 » Thu Feb 05, 2015 5:29 pm

IT WOOOOORKS! O.O
THANK YOU! <3

One moe thing, that need to be decrypted, after this, We're able to edit all language-Parts in this game *-*
Could you help us to decrypt this file, too? (I've edited it already in Hex, so you should be able to see some names there :3
it would be AWESOME if you could help us to decrypt this file, too :3


EDIT: Btw. here are some screenshots to show that it works :)
IMAGE
You do not have the required permissions to view the files attached to this post.

WRS
ultra-veteran
ultra-veteran
Posts: 601
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 132 times

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by WRS » Sat Feb 07, 2015 7:35 pm

here you go
You do not have the required permissions to view the files attached to this post.
Useful tool links:

ChrisX930
veteran
Posts: 145
Joined: Sun Feb 23, 2014 4:10 pm
Has thanked: 2 times
Been thanked: 1 time

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by ChrisX930 » Sat Feb 07, 2015 9:28 pm

WRS wrote:here you go
It works *-*
Thank you very much <3

User avatar
Seyren
advanced
Posts: 58
Joined: Sat Oct 30, 2010 1:39 pm
Has thanked: 18 times
Been thanked: 9 times

Re: 300Heroes - dat-file decrypt/decompress? We want to tran

Post by Seyren » Wed Feb 18, 2015 2:00 am

You know i was about to post a project to do the same thing as you doo, i'm glad this is happening, i really like the game, too bad it has so much ping.

thanks a lot for this :)

Post Reply