Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Kingdom Under Fire 2 (MMO)

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

Kingdom Under Fire 2 (MMO)

Post by chrrox »

Here is a quickbms script to extract and decrypt these game pkg files.

Code: Select all

get null short
get tablesize long
for
FileXor ""
get xor byte
get nsize byte
getdstring name nsize
get offset long
get size long
FileXor xor
log name offset size
savepos tmp
if tmp == tablesize
cleanexit
endif
next
Client download can be got from here
Image
noazett
advanced
Posts: 55
Joined: Mon Dec 14, 2009 1:09 am
Has thanked: 19 times
Been thanked: 1 time

Re: Kingdom Under Fire 2 (MMO)

Post by noazett »

Awesome! Thank you chrrox! i've been waiting for this for ages. i hope you'll release a script for importing models very soon.
noazett
advanced
Posts: 55
Joined: Mon Dec 14, 2009 1:09 am
Has thanked: 19 times
Been thanked: 1 time

Re: Kingdom Under Fire 2 (MMO)

Post by noazett »

Hello,
the bms above doesn't work anymore with pkg files from the latest beta client.
You can find more détails and links in my post here

viewtopic.php?p=91623#p91623

Thank you
zhade
ultra-n00b
Posts: 6
Joined: Sun May 15, 2011 10:51 pm
Been thanked: 1 time

Re: Kingdom Under Fire 2 (MMO)

Post by zhade »

Tested on a few files with patch 10006 and rev.255444

Code: Select all

comtype zlib
idstring "BEAR"
get BNAME basename
string BNAME += "/"
get DUMMY long
get FILES long
get DUMMY long
set EMPTY 65536
for i = 0 < FILES
    get DUMMY long
    get DUMMY long
    get ZSIZE long
    get SIZE long
    get START long
    get DUMMY long
    xmath START "16+(FILES*24)+(START*8)"
    savepos NEXTFILE
    goto START
    log TEMPORARY_FILE 0 0
    append
    do
        get OFFSET long
        get CZSIZE short
        get CSIZE short
        if CSIZE == 0
             if CZSIZE == 0
                 log TEMPORARY_FILE OFFSET EMPTY
             else
                 clog TEMPORARY_FILE OFFSET CZSIZE EMPTY
             endif
        else
            if CZSIZE == 0
                log TEMPORARY_FILE OFFSET CSIZE
            else
                clog TEMPORARY_FILE OFFSET CZSIZE CSIZE
            endif
        endif
    while CSIZE == 0
    append
    open "." TEMPORARY_FILE 1
    get FILESIZE asize 1
    log BNAME 0 FILESIZE 1
    goto NEXTFILE
next i
Last edited by zhade on Fri Jan 24, 2014 4:44 pm, edited 1 time in total.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Kingdom Under Fire 2 (MMO)

Post by chrrox »

The game uses hashes so the file names have to be dumped from the exe to much of a pain to do.
Thats why i have not posted anything the compression is just zlib.
zhade
ultra-n00b
Posts: 6
Joined: Sun May 15, 2011 10:51 pm
Been thanked: 1 time

Re: Kingdom Under Fire 2 (MMO)

Post by zhade »

I see.
I edited my post above and included a bms script that is able to extract the files. I haven't done any bms scripts before, so if it can be optimized feel free to edit.
Post Reply