ラブライブ!スクールアイドルフェスティバル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: Select all
# 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