# Deus Ex: Human Revolution Director's Cut (script 0.4) # thanks a lot to Ekey! # script for QuickBMS http://quickbms.aluigi.org # use 1 for a possible alternative file format (maybe Tomb Raider Legend?) math FILE_FORMAT = 0 math TMP = 0x10000000 math TMP * 16 if TMP == 0 print "you must use quickbms_4gb_files.exe with big archives" cleanexit endif get EXT extension if EXT != "000" print "Error: you must select the file with 000 extension, all the others will be extracted automatically" cleanexit endif get MAX_ARCHIVE_CHUNK long # 0x1f400000 get TMP asize if MAX_ARCHIVE_CHUNK u< TMP reverselong MAX_ARCHIVE_CHUNK endian big endif math LAST_ARCHIVE_NUM = -1 math MAX_ARCHIVE_CHUNK_1 = MAX_ARCHIVE_CHUNK math MAX_ARCHIVE_CHUNK_1 - 1 idstring "wiiu-w" goto 0x44 get FILES long if FILE_FORMAT == 0 for i = 0 < FILES get NAMECRC long next i endif for i = 0 < FILES if FILE_FORMAT != 0 get HASH long endif get SIZE long get OFFSET long get LANG_ID long get ZSIZE long xmath ARCHIVE_NUM "((((OFFSET >> 21) << 32) | (OFFSET << 11)) + MAX_ARCHIVE_CHUNK_1) / MAX_ARCHIVE_CHUNK" math ARCHIVE_NUM - 1 if ARCHIVE_NUM != LAST_ARCHIVE_NUM math LAST_ARCHIVE_NUM = ARCHIVE_NUM string TMP p "%03d" ARCHIVE_NUM open FDDE TMP 1 endif math OFFSET u<< 11 math OFFSET % MAX_ARCHIVE_CHUNK if ZSIZE == 0 log "" OFFSET SIZE 1 else clog "" OFFSET ZSIZE SIZE 1 endif next i