ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax
It is currently Fri Aug 12, 2022 9:04 pm

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Oct 14, 2019 4:48 pm 

Joined: Thu Aug 07, 2014 10:28 pm
Posts: 388
Love Live School Idol Festival All Stars
ラブライブ!スクールアイドルフェスティバルALL STARS
decryption script
Must use quickbms_4gb_files.exe
also must use command line -n -C
example
c:\quickbms\quickbms_4gb_files.exe -n -C C:\LL.bms . C:\output_folder
Code:
# Love Live School Idol Festival All Stars (script 0.0.1)
# by chrrox
# script for QuickBMS http://quickbms.aluigi.org
# original code from https://gist.github.com/esterTion/ff57aafd8dc950216041ac004fc25536

quickbmsver "0.8.0"
set MEMORY_FILE10 string "
typedef unsigned char uchar;
typedef unsigned int uint;

int ll_decrypt(unsigned char *data, int size, int keys_0, int keys_1, int keys_2) {
    int     i;
    for(i = 0; i < size; i++) {
        uchar c = data[i];
        data[i] = data[i] ^ (((keys_1 ^ keys_0 ^ keys_2) >> 24) & 0xff);
        keys_0 = (0x343fd * keys_0 + 0x269ec3) & 0xFFFFFFFF;
        keys_1 = (0x343fd * keys_1 + 0x269ec3) & 0xFFFFFFFF;
        keys_2 = (0x343fd * keys_2 + 0x269ec3) & 0xFFFFFFFF;
    }
}
"
comtype zlib_dynamic

set URLBASE string "https://jp-real-prod-v4tadlicuqeeumke.api.game25.klabgames.net/ep1002/static/f141c313a139e1e6/"
open "." "https://jp-real-prod-v4tadlicuqeeumke.api.game25.klabgames.net/ep1002/static/f141c313a139e1e6/masterdata_a_ja"
get SIZE asize
log MEMORY_FILE 0 SIZE
goto 0x14 MEMORY_FILE
get NSIZE byte MEMORY_FILE
getdstring VERSION NSIZE MEMORY_FILE
get NSIZE byte MEMORY_FILE
getdstring LANG NSIZE MEMORY_FILE
get FILES byte MEMORY_FILE
print "%VERSION% %LANG% %FILES%"
for i = 0 < files
math constKeys_0 =   0x3039  // 12345
math constKeys_1 =   0x10932 // 67890
math constKeys_2 =   0x7AB7  // 31415
set MEMORY_FILE2 ""
get NSIZE byte MEMORY_FILE
getdstring FNAME NSIZE MEMORY_FILE
get NSIZE byte MEMORY_FILE
getdstring KEY0 8 MEMORY_FILE
getdstring KEY1 8 MEMORY_FILE
getdstring KEY2 8 MEMORY_FILE
getdstring CRC 16 MEMORY_FILE
#print "%FNAME% %KEY0% %KEY1% %KEY2% %CRC%"
set TMP string "$"
string TMP += KEY0
set KEY0 long TMP

set TMP string "$"
string TMP += KEY1
set KEY1 long TMP

set TMP string "$"
string TMP += KEY2
set KEY2 long TMP
#print "%FNAME% %KEY0% %KEY1% %KEY2% %CRC%"
set URL URLBASE
string URL + FNAME
print "Downloading %URL%"
xmath keys_0 "constKeys_0 ^ KEY0"
xmath keys_1 "constKeys_1 ^ KEY1"
xmath keys_2 "constKeys_2 ^ KEY2"
open "." URL
get SIZE asize
log MEMORY_FILE2 0 SIZE
calldll MEMORY_FILE10 "ll_decrypt" "tcc" RET MEMORY_FILE2 SIZE keys_0 keys_1 keys_2
string FNAME + ".sqlite"
clog FNAME 0 SIZE SIZE MEMORY_FILE2
next i



Top
   
PostPosted: Sun Oct 20, 2019 9:58 am 

Joined: Sun Oct 20, 2019 9:43 am
Posts: 1
Thanks for your work on this scripts.

I've gone through the .php file https://gist.github.com/esterTion/ff57aafd8dc950216041ac004fc25536 this script based on. If I didn't make it wrong, the .php file and this script ONLY decrypt the .db files of the game. it doesn't have the ability to extract the game assets.

The URL in script seemed not working, so I used the file I dumped from my phone instead. And pity thing is, seems that both the .php file and this script FAILED to decrypt the .db file. When opened them in HxD, the contents still didn't make sense. Is that they changed the encryption key? Or that the script still working but I made something wrong?


Last edited by 1160817830 on Fri Oct 25, 2019 11:10 am, edited 1 time in total.

Top
   
PostPosted: Wed Oct 23, 2019 9:54 am 

Joined: Mon Oct 29, 2018 3:04 pm
Posts: 18
1160817830 wrote:
Thanks for your work on this scripts.

I've gone through the .php file https://gist.github.com/esterTion/ff57aafd8dc950216041ac004fc25536 this script based on. If I didn't make it wrong, the .php file and this script ONLY decrypt the .db files of the game, right? it doesn't have the ability to extract the game assets.

The URL in script seemed not working, so I used the file I dumped from my phone instead. And pity thing is, seems that both the .php file and this script FAILED to decrypt the .db file. When opened them in HxD, the contents still didn't make sense. Is that they changed the encryption key(I noticed constKey in script)? Or that the script still working but I made something wrong?

https://estertion.win/2019/09/sifas/ It seems that the author gave up the plan because of the key change. You are right. This is only applicable to *. DB files. But the author also said that "resource processing and DB are one method, only three manifestkeys ^ constkeys are here, and 12345, key1 and key2 are there, which is equivalent to fixing a key to 12345". I am just a useless person, still expecting to have Finally, please forgive my English, it is not my native language, which is also the credit of translation software. :?


Top
   
PostPosted: Mon Feb 24, 2020 1:44 pm 
User avatar

Joined: Sat Mar 02, 2019 3:24 pm
Posts: 180
Does this script also works for the English version of this game?
If not, when it's going to be updated?


Top
   
PostPosted: Sat Aug 06, 2022 9:16 am 

Joined: Sat Aug 06, 2022 9:15 am
Posts: 1
For instance; if end clients of Microsoft 365 wishes to make work on a record they actually must have a rendition of MSWord on their PC outside the cloud and forward that report to any colleagues who need to survey it and have it defender for endpoint passed back once more, so the report is continuously passing all through the cloud.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

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