READ THE RULES: Click here

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

Idolmaster 2 (360) and Idolmaster PS3 / G4U decryption

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
User avatar
chrrox
Moderator
Posts: 2541
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1269 times

Idolmaster 2 (360) and Idolmaster PS3 / G4U decryption

Post by chrrox » Sat Nov 24, 2018 12:47 am

Here is a quickbms script conversion of imas2dec.

Code: Select all

#script by chrrox
#quickbms https://aluigi.altervista.org/quickbms.htm
endian big
set memory_file binary "\xDE\x02\xC9\xFE\x46\x49\xC3\xE9\xAB\xAE\xF1\xDB\x0F\xEC\x2D\x31\x82\x43\xB0\x88\x73\xD6\xDA\x5D\x82\x35\x5D\x36\xDB\xE7\x95\x25\x99\x25\x3C\x4C\x00\x49\xCA\x1A\x59\x77\x1E\x65\x68\x7A\x04\xEB\x02\xFB\xC4\x2A\x75\xB9\x0F\x16\x18\xFC\x97\xED\x70\x32\x56\x98\xC5\x12\x36\x70\x5D\x66\x31\xE1\x81\x95\x31\xA4\xA7\xCF\x90\xE9\x9B\x92\xF9\x9C\xC4\x6F\xE2\x36\x35\x12\x8B\x98\x59\x79\xD1\xFD\x33\x7C\xEA\x70\xEC\xE7\xBC\x26\x66\x7B\x7A\xE2\x18\xE2\xC2\xBD\x4E\x71\x19\x85\x6E\xBD\xF8\x33\xC0\x26\xEB\x92\x68\x66\x4D\x83\x89\x6C\xD2\x59\xDB\x28\xEB\x9E\xA3\x17\x5F\xEB\xC3\x88\x8C\x5B\x80\xBC\xE6\xA8\xDB\x6C\xE2\xCA\xEF\xF6\xA8\xF0\x7A\x8C\xA5\xBF\x39\x78\xCD\x22\x7A\x74\xEA\x92\x5E\x68\x37\x2C\xE2\x2D\xAB\x33\x59\x8E\x24\x75\xB4\x18\x51\x9D\x69\x85\x4F\x25\x0D\x5C\x1E\x40\x6E\x0D\xED\x06\x53\xF7\x71\x1A\x4C\xD4\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E\x2E\xD9\xE5\x96\xFD\x82\x73\x39\xBD\xC7\x80\x62\x7B\x9A\x37\x35\x01\xF7\xCA\x6C\x93\xD9\x6B\x8D\xBA\x7E\xB6\x23\x75\x87\x19\x1F\x9D\x9C\xF2\x35\xB1\xDB\x44\x03\x78\x41\x2F\x31\x0D\x1A\x4B\x9A\x4C\x39\x22\xE7\x73\x1A\xFE\xF2\x9D\x19\x51\x6D\x97\x06\xFD\x23\x49\x2D\xD1\x1F\x01\x4E\x84\xB7\x32\x50\xB3\xFF\x18\x19\xF1\x20\x12\x74\x3A\xE8\x2B\x7A\xA4\x3D\x38\x05\x4D\x4F\x08\x1C\x88\xED\xE2\x80\x79\x26\x39\xD3\xE7\xE1\x7C\x7E\xF8\x95\xFA\x80\xC4\x53\x07\x2B\x86\xA1\xFE\x3F\xED\xB9\x1F\xB8\xED\x31\x1D\x66\x44\x21\xF7\x81\xF5\xCA\x0C\xAF\xBB\xEC\x1E\x76\xF2\x43\xB3\x83\x31\x15\x50\x9F\xF4\x25\xEF\x67\x9F\x56\x9E\x88\x4B\x3C\x18\xB7\xED\x39\xDF\xD2\x41\x34\x26\xCB\x4F\xDF\xBF\xCE\x77\xFA\xAB\xF8\x24\x73\xA3\xBD\x3C\x5C\xF3\xD2\x6C\x77\xD8\xDD\x4B\x41\xC3\x9D\xF6\xB9\xE1\x14\x3F\xB8\x26\xBB\x44\xFC\x77\x28\x15\x03\x00\x14\x81\x13\xF9\x14\x57\x09\xAA\x07\xDC\x7B\x2A\x56\x32\xC6\x17\xAD\xEE\x88\x18\xF0\x43\x94\xC0\x32\xE3\xC1\xBB\x4D\xBA\x15\x26\x2D\xD6\x1D\x98\x45\x65\xD9\xC5\xE8\xF1\xA7\x0D\xE0\x29\x20\x3F\x94\x04\x63\x65\xD0\xE7\x2C\x26\xA0\x25\x85\x0A\xA2\xC0\xC3\xF6\xFE\xA9\x22\xD8\xC9\x53\x78\xB4\x71\x2D\x69\x6F\x89\xA6\x51\xB1\x4D\x14\xAA\xDB\x18\x7F\x81\x37\x2D\xF7\xE8\x13\xE9\xCE\x68\x36\x36\xA5\x37\xA6\x33\x47\x3B\xBE\x2D\x36\x04\xD0\x29\x29\x3E\x92\x19\x5B\xFA\x2D\x01\xEC\x50\x77\x31\x61\x1D\xBF\x19\x01\xF8\xD1\x8C\x9B\x10\x35\x87\x40\x6A\x54\x3A\x53\x7E\x97\x8C\xAD\xA8\x71\xE7\x26\x32\xCF\x92\x0A\x32\xB7\x2A\x9F\x34\x47\xB4\x67\x4C\x67\x57\x86\x35\x61\xD5\xC1\x1C\x9A\x84\xF5\x5E\x55\xCB\x91\x88\xDE\x08\xD9\x7D\x7B\x47\x96\x88\x15\x93\x50\x16\x2C\xA9\x88\x1F\xD6\x43\x30\x0B\x5A\x24\x1E\xE8\x30\x1F\x35\x19\xAF\xD7\x7A\xE1\x74\x17\xBD\x47\x66\x04\x9F\x8A\x66\x33\x64\x0F\x3C\xD9\xC6\x74\xC8\x53\xCA\x56\xC1\xD2\x7B\x52\xBC\x27\x73\x81\x1A\xEF\xC3\x24\x07\xDA\x99\xEA\x4C\x93\x1A\x1A\x9F\x15\x54\x1A\xF6\x0B\xCB\x27\x23\xAF\x9C\xFC\x4D\xB8\xC8\x2D\x6C\xE3\xCE\x25\x8F\xB8\xBC\xBA\xA0\x6B\xE7\xDF\x7B\x71\xCB\xC8\xC6\x5E\x29\x03\x03\x96\x23\xF3\xF7\x9B\xAC\x75\x52\x2F\x8C\x35\x81\x73\xF7\xBE\x29\x43\x20\x33\x70\xA2\xFB\x85\x12\x8A\x7F\x9C\x04\x3F\xC5\x97\xE9\xE0\x73\x82\x7F\xE2\x17\x4F\x31\x7B\xFB\xFD\x90\xCC\x9E\x8B\x31\x52\x6E\xA5\xFE\xF4\x78\x79\x52\x68\xE7\xC0\xD9\xE7\x16\x42\xDD\x58\x32\xE9\xD7\xE0\x22\x03\xCF\xF2\xB7\x35\xD3\x62\x50\xB7\xC7\xA6\xF8\xEA\xD4\x15\x76\x54\xDC\x1C\x91\xC9\x1F\x20\x36\x01\xCB\x7A\x10\x54\x92\xAA\xF5\xA1\xBE\x2B\xA3\x6B\x95\xCD\x11\xE5\x1F\x4C\x8A\xD6\x11\x3B\x7E\x28\xFF\xD2\xD7\x42\x41\x56\xF0\x47\x80\xF0\x42\x62\x64\x10\xE3\x68\xEF\x48\x41\xA4\xD6\x14\x78\x85\x87\x3C\x05\x17\x40\x65\x53\x08\x49\x0D\x6D\x4D\xA8\x90\x8B\xF9\x32\x48\x28\xBF\x67\x7A\xD9\xAB\x54\x56\x56\xAE\x01\x11\xF2\x64\xC3\xD5\x75\xC8"

set memory_file2 binary "\x0F\x3B\x04\x84\x78\x34\x99\xB9\x3D\x56\xC8\x72\x4A\x65\x84\x90\x48\x40\xB2\xC2\x45\xB5\xFB\x2A\xED\x92\x42\x02\xF3\x76\x39\x72\x28\x10\x08\xDE\xD4\x03\x18\x8D\x31\xC5\xDA\x98\xA3\xD2\x25\xCE\xF5\x9E\xAA\x44\xAE\x42\xAC\x74\xD7\x3C\xC2\x88\x90\x36\x4B\x59\x77\xA6\xB8\x27\xAA\x8B\x02\xDC\x4C\x29\x59\x1B\x7A\x92\x62\xA6\x74\xF1\x7A\x6D\x55\xE1\x6A\x87\x22\x87\xF5\xA5\xEF\x7C\x11\xBE\xF8\x93\x18\x08\xAF\x7F\x88\xEA\x87\xF3\xA8\x41\x44\xCC\x9A\xB5\x4E\xF4\xE2\x68\x42\xBB\xBC\x69\x0B\x20\xDF\x80\x49\xAD\x74\xB0\x49\x63\x43\xA0\x2C\x62\x01\x07\xD5\x26\x43\x30\x7B\xC9\x22\x02\xCF\xAE\x43\x4E\xA6\xD6\x1E\x6A\xA8\x77\x92\x9F\x58\xEA\x32\x26\x77\xCC\x80\x04\x80\xFC\x34\xBA\xEE\x5A\xE4\x61\xA1\x7A\xC2\x98\x58\x25\x93\x32\x72\x58\xB6\xC1\xB9\xAE\x7C\xE0\xC7\xAB\x7F\xC5\x77\x88\xC6\x1C\xFD\xD2\x36\x74\x94\x48\xFD\xBE\xB0\x83\xB7\x80\x65\x09\xF4\x2F\xAE\x4A\x63\x16\x7D\xDD\xB9\xB1\xBD\x93\xC8\x30\xC5\x8C\x3B\x10\xE6\x0D\x61\x0E\x21\x56\x48\xCA\x82\x49\xA3\x69\x0F\x7A\x71\xAB\x3F\x43\x13\xA2\x2D\x8E\xCD\x07\xDF\xB6\xDF\xAC\x95\x5A\xB0\x87\xCF\xD5\x81\x38\x72\x98\xFD\x5D\x04\x05\x30\xA8\x76\x56\x23\x91\xFB\xF9\x4B\x03\xE1\xE5\x3C\x3A\xF5\x08\x36\x39\xBF\x17\xB3\xDD\x55\xA3\xF8\x94\x50\xCA\xE6\x54\x94\x26\x2E\x5E\xED\xA1\xD2\x83\xB9\x2F\xF9\x78\xEC\x79\xC1\xFE\x92\xC4\x18\x58\x94\x0F\xB2\xF8\xE1\xF2\xAA\x6B\x9F\x06\x50\x25\x4B\xA7\x21\xFA\x0F\x29\x11\x0A\x43\x22\xFB\xA2\xBF\xDC\x4D\xCE\x7C\x0B\x13\xE9\xDB\x67\x27\x65\x6D\xA8\xC9\x54\x08\x0F\x1F\x18\xB3\xC4\x82\xBB\x08\x33\x9F\x1D\xE2\x05\x13\x93\xFC\x29\x1B\xC4\x79\x33\xCF\x81"

set memory_file3 binary "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

get NAME basename
get EXT extension
string NAME + "_dec."
string NAME + EXT
get SIZE asize
math SIZE - 32
goto SIZE
get NUM0 byte
get NUM1 byte
get NUM2 byte
get NUM3 byte
get NUM4 long
get NUM5 long
get NUM6 long
get NUM7 long
set NUM9 long 715827883
set TYPE 99
if NUM4 == 0xDE820281
print "Version: PS3"
set TYPE 2
endif
if NUM4 == 0x6DED5EF2
print "Version: PS3 DLC"
set TYPE 3
endif
if NUM4 == 0xB1BED1B7
print "Version: G4U"
set TYPE 4
endif
if NUM4 == 0xC9BF182C
print "Version: Xbox 360"
set TYPE 0
endif
if TYPE == 99
print "Unknown File"
cleanexit
endif
xmath int32_1 "((NUM2 * NUM9) & 0xFFFFFFFF00000000) >> 32 >> 2"
xmath int32_2 "(int32_1 << 5) - (int32_1 << 3)"
xmath int32_3 "((NUM3 * NUM9) & 0xFFFFFFFF00000000) >> 32 >> 2"
xmath int32_4 "(int32_3 << 5) - (int32_3 << 3)"

xmath numArray1_0 "NUM1 >> 4"
xmath numArray1_1 "NUM1 & 15"
set   numArray1_2  NUM2
set   numArray1_3  NUM3
xmath numArray1_4 "NUM2 - int32_2"
xmath numArray1_5 "NUM3 - int32_4"
putarray 0 0 numArray1_0
putarray 0 1 numArray1_1
putarray 0 2 numArray1_2
putarray 0 3 numArray1_3
putarray 0 4 numArray1_4
putarray 0 5 numArray1_5

set NUM10 0
if TYPE == 3
set NUM10 384
endif
if TYPE == 4
set NUM10 768
endif

xmath NUM11 "(numArray1_0 << 5) - (numArray1_0 << 3)"
xmath NUM12 "(numArray1_1 << 5) - (numArray1_1 << 3)"

for i = 0 < 24
xmath NUM13 "NUM11 + numArray1_4"
xmath NUM14 "NUM12 + numArray1_5"
xmath TMP1 "NUM13 + NUM10"
xmath TMP2 "NUM14 + NUM10"
if TYPE == 0
goto TMP1 memory_file2
get TMP3 byte memory_file2
goto TMP2 memory_file2
get TMP4 byte memory_file2
else
goto TMP1 memory_file
get TMP3 byte memory_file
goto TMP2 memory_file
get TMP4 byte memory_file
endif
xmath NUM15 "TMP3 ^ TMP4"
math numArray1_4 + 1
math numArray1_5 + 1

if numArray1_4 > 23
set numArray1_4 0
endif
if numArray1_5 > 23
set numArray1_5 0
endif
PUTvarchr memory_file3 i NUM15 byte
next i

if TYPE != 0
math SIZE - 32
endif

encryption "aes_192_cbc" memory_file3
log memory_file4 0 SIZE
math SIZE - 16
encryption "" "" 
log NAME 16 SIZE memory_file4

Post Reply