Operation Flashpoint - Dragon Rising WIN_000

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
TemplarGFX
Posts: 1
Joined: Fri Jan 06, 2017 1:04 am

Operation Flashpoint - Dragon Rising WIN_000

Post by TemplarGFX »

Hello ZENHAX!

I am hoping that someone out there might be able to assist with a classic game!

Many years ago a QuickBMS script emerged for OFDR which allowed the WIN_000 files to be extracted, but the file structure and larger files were corrupt during the process.
Unfortunately the original author Aluigi never worked further on the issue and so modding came to a halt.


Here is the original XentaX thread : http://forum.xentax.com/viewtopic.php?f=16&t=3763

Here are the QuickBMS files : https://drive.google.com/file/d/0B38jzM ... 2ZGQW9IN2M

This file contains the complete folder structure and extracted XML files : https://drive.google.com/file/d/0B38jzM ... kRuMk9mWkE

Code: Select all

# Operation Flashpoint 2 Dragon Rising (script 0.1.1)
# note: you MUST run bigone.bms first!
# note: all this script is a complete horrible work-around... but it seems to work
# note: the folders are not handled correctly so there will be not sub-sub folders
# script for QuickBMS http://aluigi.org/papers.htm#quickbms

comtype lzss

get SIZE asize
encryption aes "\xAC\x22\x11\x23\x44\x95\xAC\xA2\x7E\x80\x59\x86\x10\x8B\xEE\xDD\x4D\x01\xD3\x97\x0B\x9D\x4C\xA9\x3D\x7B\xE1\xBB\xED\xDA\x84\x58"
log MEMORY_FILE 0 SIZE
encryption "" ""

findloc NAMEOFF string "system" MEMORY_FILE # lame solution
goto NAMEOFF MEMORY_FILE
for i = 0
    get NAME string MEMORY_FILE
    if NAME == ""
        break
    endif
    putarray 0 i NAME
next i

open FDSE "win_000.full"

set FOLDER string ""
set PREV_OFFSET long 0
set DATAOFF long 0x7e
set OFFSET_SEEK 0x2a0000

for i = 0
    goto DATAOFF MEMORY_FILE
    get NAMENUM long MEMORY_FILE
    get DUMMY3 long MEMORY_FILE
    get SIZE long MEMORY_FILE
    get FILENUM long MEMORY_FILE
    get DUMMY4 long MEMORY_FILE
    get TYPE long MEMORY_FILE
    get OFFSET long MEMORY_FILE
    get DUMMY1 long MEMORY_FILE
    savepos DATAOFF MEMORY_FILE

    if OFFSET == 0
    if SIZE == 0
    if FILENUM == 0
        cleanexit
    endif
    endif
    endif

    if i == 0
        set OFFSET_SEEK long OFFSET
    endif

    math OFFSET -= OFFSET_SEEK
    math ZSIZE = OFFSET
    math ZSIZE -= PREV_OFFSET

    math NAMENUM >>= 4
    if i == 0   # work-around
        set NAMENUM long 0
    endif
    getarray NAME 0 NAMENUM

    set FULLNAME string FOLDER
    string FULLNAME += \
    string FULLNAME += NAME

    if SIZE == 0    # should check TYPE but this one is better
        set FOLDER string NAME
    elif SIZE == ZSIZE
        log FULLNAME PREV_OFFSET SIZE
    else
        clog FULLNAME PREV_OFFSET ZSIZE SIZE
    endif

    math PREV_OFFSET = OFFSET
next i


File location is not too important (although would be handy of course), its that any larger file over about 500kb becomes corrupted and therefore useless. This means all the sounds, models, textures, shaders, particle effects, and UI elements are out of reach.

Any help, even just pointers as to what might be wrong would be very helpful, I am willing to try out anything!