ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Jun 22, 2017 10:17 pm

All times are UTC




Post new topic  Reply to topic  [ 196 posts ]  Go to page 1 2 3 4 510 Next
Author Message
PostPosted: Wed Apr 27, 2016 9:26 am 

Joined: Wed Apr 27, 2016 9:14 am
Posts: 3
Hi, i'm new in this site and my english is very bad eheh...
I've a question: can you decrypt .sc files from clash royale game?
Example: chr_giant.sc
Download: https://mega.nz/#!b4VFgASb
Thanks a lot!


Top
   
PostPosted: Wed Apr 27, 2016 10:27 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
Have you already checked this thread?
viewtopic.php?t=2186

There is a script but the compressed files are extracted "as-is" without decompression (unknown algorithm).


Top
   
PostPosted: Sun May 01, 2016 12:42 pm 

Joined: Wed Apr 27, 2016 9:14 am
Posts: 3
aluigi wrote:
Have you already checked this thread?
viewtopic.php?t=2186

There is a script but the compressed files are extracted "as-is" without decompression (unknown algorithm).

Hi Aluigi, i read this thread, but i don't understand how to use the script. I'm really ignorant in this


Top
   
PostPosted: Sun May 01, 2016 1:51 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
It's a script for quickbms, you can find the tool here:
http://quickbms.aluigi.org

launch quickbms.exe, select the script, select the sc archive and then the output folder where extracting the files.


Top
   
PostPosted: Sun May 01, 2016 2:31 pm 

Joined: Wed Apr 27, 2016 9:14 am
Posts: 3
I did it! Thanks. Now i have to find a way to open the file


Top
   
PostPosted: Thu May 05, 2016 12:50 am 

Joined: Wed May 04, 2016 11:34 pm
Posts: 5
How to decrypt clash of clans _tex.sc?it not as clash royale _tex
.sc!


Top
   
PostPosted: Thu May 05, 2016 7:32 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
Have you tried the script in that other thread?
If it doesn't work then upload that file.


Top
   
PostPosted: Mon May 09, 2016 3:55 am 

Joined: Wed May 04, 2016 11:34 pm
Posts: 5
how to decrypt _tex.sc file clash of clans?
http://www.mediafire.com/download/m3j2e ... ngs_tex.sc
Help me!!!! thank!!!!


Top
   
PostPosted: Mon May 09, 2016 6:15 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
There is no solution for the SCLZ files.
I think they are compressed but I guess I already tried to scan them (which is not easy since they don't contain textual strings to guess what compression is correct).


Top
   
PostPosted: Mon May 09, 2016 9:52 am 

Joined: Mon May 09, 2016 9:35 am
Posts: 1
Hello, folks!
I want to "import" village to ultrapowa from original Clash Of Clans game. I have discovered that when I enter someone's base, android creates 4 files in data - chache:
name size
background_player.info 1kb
background_player.sc 1kb
background_player_tex.info 1kb
background_player_tex.sc 10 582 kb

background_player_tex.sc is 10 mb. I think it's texture files and I don't need it. background_player.sc seems to be objects location of village (I think) that I need. Maybe I am wrong and village information is in .info file.

Here are my files -
https://mega.nz/#!5YYnEARJ!BropWWdmQi4A ... ovWE6XnJVU

Any information will be helpful
Thanks.


Top
   
PostPosted: Tue Oct 18, 2016 5:51 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
Script 0.2 :D


Top
   
PostPosted: Thu Oct 20, 2016 1:59 pm 

Joined: Thu Oct 20, 2016 11:18 am
Posts: 11
Hi there!
I'm a sucker for pattern searching (and for Clash Royale too), so I got instantly hooked on decoding these files.

First: as for the images, this script can extract them all: https://github.com/123456abcdef/cr-sc-dump/

Second: even with the new script version, some sc files can't be extracted, namely the attached list. They exit with the error below:
Code:
- open script clash_royale.bms
- set output folder 1.5.0\error\sc

  offset   filesize   filename
--------------------------------------
  00000023 36034      building_mega_bomb

Error: the compressed LZMA input is wrong or incomplete (0)
Info:  algorithm   445
       offset      00000023
       input size  0x000017c5 6085
       output size 0x00008cc2 36034
       result      0xffffff9c -100

Error: the uncompressed data (-100) is bigger than the allocated buffer (36034)

Last script line before the error or that produced the error:
  28  clog NAME OFFSET SIZE XSIZE


Third: now this is what you guys were waiting for. With the .sc files that quickBMS could extract, I googled for their headers and found nothing useful. So I dug Notepad++ and an hex editor plugin and started researching the binaries for patterns and such. I focused on ui_spells.sc (the card's pictures on your card collection), because it's a neat grid and patterns would emerge quickly. Among the text strings inside I found "atlasgenerator_texture_rgba5656", which could be a clue, but Google doesn't know much about it. This is what I found so far (addresses are in hex):
  1. numbers are INT16 Little Endian: first byte is the least significative part, second byte is the most significative. So a pair e6 03 is 998, not 58883.
  2. 00-01 - total number of effective sprites mapped in the file
  3. 02-10 - ??
  4. 11-12 - number of IDs/strings (these are mentioned in the CSV files)
  5. 13-xx - a list of IDs for each string, 2 bytes each
  6. a list of strings. Each is preceded by a byte with the string's legth.
  7. 17 00 00 00 00 1A 00 00 00 00 (constant?)
  8. block(s) of 10 bytes, starting with 01 05, one for each image mapped in this file. The image extracting script appends an "_" on the filename for each image on the same _tex.sc file. The last 4 bytes are the image's width and height
  9. blocks starting with byte 12, one for each sprite: these map the sprites on the image, and vary in size. These have 5 '00' bytes between blocks.
    1. 12
    2. 2 bytes: length of the block
    3. 00 00
    4. 2 bytes: sprite ID (not the same as string ID, but they're associated later)
    5. (lots of bytes to decode)
    6. for static, rectangular images: final 16 bytes are the coordinates (xy) of the 4 corners, normalized between 0000 and FFFF. Just multiply by (image_dimension/65535)
  10. blocks starting with byte 08, not sure how many, not sure what they are, same size rule as 12-blocks. These have 5 '00' bytes between blocks.
  11. blocks starting with byte 09, not sure how many, not sure what they are, same size rule as 12-blocks. These have 5 '00' bytes between blocks.
  12. blocks starting with byte 0C, one for each string, same size rule as 12-blocks. Bytes 5-6 are the same IDs from address 13 onwards, bytes 22-23 are the IDs on the sprite blocks. These have 5 '00' bytes between blocks.

Again, this is based on a study of ui_spells.sc, which are static and mostly rectangular images (legendary cards are hexagonal and their 12-blocks are structured differently). In time I'll try to get some sense off of the animated ones. Any constructive feedback is appreciated.


Attachments:
errors.txt [489 Bytes]
Downloaded 53 times
Top
   
PostPosted: Thu Oct 20, 2016 2:31 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
Can you upload building_mega_bomb.sc?


Top
   
PostPosted: Thu Oct 20, 2016 3:07 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
The following are the LZHAM parameters adopted by the SCLZ archives, in case someone is interested:
Code:
m_dict_size_log2 18
m_decompress_flags 0
m_table_update_rate 8
m_table_max_update_interval 0
m_table_update_interval_slow_rate 0


Top
   
PostPosted: Thu Oct 20, 2016 3:24 pm 

Joined: Thu Oct 20, 2016 11:18 am
Posts: 11
There, all .sc files that couldn't be extracted.


Attachments:
errors.7z [650.97 KiB]
Downloaded 103 times
Top
   
PostPosted: Thu Oct 20, 2016 3:29 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
Script 0.2.1 :D


Top
   
PostPosted: Thu Oct 20, 2016 4:43 pm 

Joined: Thu Oct 20, 2016 11:18 am
Posts: 11
Thanks a lot!
Going back to research now... I wonder if I can make some cool animated GIFs out of those sprites :lol:


Top
   
PostPosted: Tue Oct 25, 2016 2:20 pm 

Joined: Tue Oct 25, 2016 2:05 pm
Posts: 1
aluigi wrote:
Script 0.2.1 :D


hi aluigi
I have tried your script and get one file.

How I can use this tool to get *.png files?

Thank you.


Top
   
PostPosted: Fri Oct 28, 2016 10:03 am 

Joined: Fri Oct 28, 2016 9:54 am
Posts: 8
barbossa42 wrote:
Hi there!
I'm a sucker for pattern searching (and for Clash Royale too), so I got instantly hooked on decoding these files.

First: as for the images, this script can extract them all: https://github.com/123456abcdef/cr-sc-dump/


Hey barbossa42, I was wondering if you could explain to me this step of the github link:

2. Install pyliblzma with:
python -m pip install pyliblzma

3. Install Pillow with:
python -m pip install Pillow

I don't understand how you can install pylibzma just by using this code. Bc when i type it on python it says: SyntaxError invalid syntax

Thx so much !(I'm sorry if this is obvious, im just a noob. I just want some good clash royale high rez pics)


Top
   
PostPosted: Fri Oct 28, 2016 2:48 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 6163
@milanmaldini
Unfortunately I worked only on the script, I can't help with the content of the extracted data

@Johnny
The syntax of the commands reported on that link is correct but pyliblzma is an obsolete package of 6 years ago that can't be installed on Windows by default ("close_fds is not supported on Windows ").
Just my 2 cents in case you get no answer from the other user.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 196 posts ]  Go to page 1 2 3 4 510 Next

All times are UTC


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:
Powered by phpBB® Forum Software © phpBB Limited