Shrek Forever After PC *.APK

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Shrek Forever After PC *.APK

Post by lorenzo »

someone could make a script for me thanks
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

Mah, I see only references about the first 0x1edc8 bytes but all the rest doesn't seem covered.
Maybe someone else will take a look at it, in the meantime this script dumps the first 0x1edc8 bytes correctly:

Code: Select all

idstring "APKF"
get DUMMY long
get ZERO long
get DUMMY long
get DUMMY long
savepos TMP
get OFFSET long
math OFFSET + TMP
get ZERO long
math MAX_TYPES = 4
for TYPE = 0 < MAX_TYPES
    getdstring PATH 4
    get DUMMY long
    get STRUCT_TYPE long
    savepos TMP
    get INFO_OFF long
    math INFO_OFF + TMP
    get FILES long
    get DUMMY5 long
    get FLAGS long

    savepos BACKUP_OFF
    goto INFO_OFF
    for i = 0 < FILES
        savepos TMP
        get NAME_OFF long
        math NAME_OFF + TMP
        get CRC long
        get SIZE long
        if STRUCT_TYPE == 1
        elif STRUCT_TYPE == 2
            get DUMMY long
        else
            print "Error: unknown structure %STRUCT_TYPE%, contact me"
            cleanexit
        endif
        savepos TMP
        goto NAME_OFF
        get NAME string
        goto TMP
        string NAME p "%s/%s" PATH NAME
        log NAME OFFSET SIZE
        math OFFSET + SIZE
    next i
    goto BACKUP_OFF
next TYPE
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

The script does not work. It extracts a file with 111 KB and two others with 272 bytes and 488 KB
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

Here it extracts 177 files.
Are you using the latest quickbms? Try with 0.7.4a
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

yes I am using the latest version 0.7.4a of quickbms but I get 177 files with coverage of 0 % and 121135
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

That's correct. It's exactly what I said in my post regarding the correct extraction of the first part only (I think that APKF is one of the archived files and not an index).
Probably there is an index file somewhere that contains references to the other files in the archive.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

I am so confused :? I do not know what you're talking about
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

:x
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

What I mean is that without offset and size there is nothing to extract.
The only thing with these information is the first small part of the archive so it's possible that they are not files but some sort of information about resources archived in the rest of the archive or similar.
In short, no extraction.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

is there any way you update this script? because this file apk could contain 3D models and textures or not?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

My previous post already says everything.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

What is an APKF? I'm not happy with your script I really want to get the 3d models of this game understood?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

Upload globalobjects.lxb
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Shrek Forever After PC *.APK

Post by aluigi »

Good.
It's a complete mess and not a classical index file with clear information.
At least now if there is someone willing to waste his time on this stuff (I doubt) there are both the lxb and apk available.
Good luck.
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

*SPAM* file :evil:
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: Shrek Forever After PC *.APK

Post by Acewell »

your samples aren't compressed or anything special so you could pick out the data
by hand or maybe even use a generic splitter to separate the files from the apk.

here is a random submesh plucked from globalobjects.apk_18233384_20330536 :D
Image
globalobjects.apk_18233384_20330536.png
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

how did you do it?
lorenzo
Posts: 73
Joined: Sat Apr 23, 2016 10:59 pm

Re: Shrek Forever After PC *.APK

Post by lorenzo »

I do not understand how you did it. Could you give me a more detailed tutorial? thanks
Acewell
Posts: 706
Joined: Fri Aug 08, 2014 1:06 am

Re: Shrek Forever After PC *.APK

Post by Acewell »

its all right there in the image, all the information you need, the offsets, counts and settings.
you can press the "tut" button to open a tutorial on basic usage of Hex2obj. :D