Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Final Fantasy Dimensions (.obb file decompression)

Featured Replies

  • Author
  • Localization

ExDuelist, posted Mon Feb 03, 2020 4:58 pm (53711)


Hi there, since i'd like to translate this jrpg in italian, i'm looking for a method to do these things:

1. decompress this .obb file
2. extract all game texts and graphics from the resulting .dat files
3. reimport modified text and graphics into original .dat files
4. reimport modified .dat files into original .obb file

Does anybody know how to do this?
  • Author
  • Localization

Ekey, posted Mon Feb 03, 2020 8:51 pm (53717)


Where samples?
  • Author
  • Localization

Ekey, posted Mon Feb 03, 2020 11:16 pm (53721)


Code:
# FINAL FANTASY DIMENSIONS II (Android / iOS version) OBB format
# script for QuickBMS http://quickbms.aluigi.org

set MEMORY_FILE10 string "
void iDecryptByOffset(unsigned char* lpBuffer, int dwOffset, int dwSize)
{
    int dwSeed = dwOffset 567890;
    for (int i = 0; i < dwSize; i )
    {
        dwSeed = 1103515245 * dwSeed 12345;
        lpBuffer[i] ^= (dwSeed >> 24);
    }
}
"
savepos HEADER_OFFSET
math HEADER_SIZE = 20
log MEMORY_FILE HEADER_OFFSET HEADER_SIZE
calldll MEMORY_FILE10 "iDecryptByOffset" "tcc" RET MEMORY_FILE HEADER_OFFSET HEADER_SIZE

idstring MEMORY_FILE "ARC1"
get ARCHIVE_SIZE long MEMORY_FILE
get TABLE_OFFSET long MEMORY_FILE
get TABLE_ZSIZE long MEMORY_FILE
get CRC32_HASH long MEMORY_FILE

log MEMORY_FILE TABLE_OFFSET TABLE_ZSIZE
calldll MEMORY_FILE10 "iDecryptByOffset" "tcc" RET MEMORY_FILE TABLE_OFFSET TABLE_ZSIZE

get TABLE_SIZE long MEMORY_FILE
reverselong TABLE_SIZE
math TABLE_ZSIZE -= 4
clog MEMORY_FILE2 4 TABLE_ZSIZE TABLE_SIZE MEMORY_FILE

get FILES long MEMORY_FILE2
for i = 0 < FILES
  get NAME_OFF long MEMORY_FILE2
  get OFFSET long MEMORY_FILE2
  get ZSIZE long MEMORY_FILE2
  savepos TMP MEMORY_FILE2
  goto NAME_OFF MEMORY_FILE2
  get NAME string MEMORY_FILE2
  goto TMP MEMORY_FILE2
  callfunction EXTRACT_FILE 1
next i

startfunction EXTRACT_FILE
  log MEMORY_FILE3 OFFSET ZSIZE
  calldll MEMORY_FILE10 "iDecryptByOffset" "tcc" RET MEMORY_FILE3 OFFSET ZSIZE
 
  get SIZE long MEMORY_FILE3
  reverselong SIZE
 
  if ZSIZE == SIZE
     log NAME 0 SIZE MEMORY_FILE3
  else
     math ZSIZE -= 4
     clog NAME 4 ZSIZE SIZE MEMORY_FILE3
  endif
endfunction


This script for unpack obb from FINAL FANTASY DIMENSIONS II for Android / iOS. The formats are different and all that is known - data in your file is xored by 0x14
  • Author
  • Localization

ExDuelist, posted Tue Feb 04, 2020 1:31 pm (53743)


It doesn't work, FFD and FFD II got different structures.
  • Author
  • Localization

Ekey, posted Tue Feb 04, 2020 6:04 pm (53750)


ExDuelist wrote:
It doesn't work, FFD and FFD II got different structures.

Ekey wrote:
This script for unpack obb from FINAL FANTASY DIMENSIONS II for Android / iOS. The formats are different and all that is known - data in your file is xored by 0x14
  • Author
  • Localization

ExDuelist, posted Tue Feb 04, 2020 7:23 pm (53753)


Ekey wrote:
ExDuelist wrote:
It doesn't work, FFD and FFD II got different structures.

Ekey wrote:
This script for unpack obb from FINAL FANTASY DIMENSIONS II for Android / iOS. The formats are different and all that is known - data in your file is xored by 0x14


So what was the purpose in posting the FFD II script?
  • Author
  • Localization

Ekey, posted Tue Feb 04, 2020 8:45 pm (53754)


Since you did not provide the file you want to unpack, I downloaded FINAL FANTASY DIMENSIONS II instead of FINAL FANTASY DIMENSIONS I by mistake.
  • Author
  • Localization

ExDuelist, posted Wed Feb 05, 2020 12:17 am (53759)


Ekey wrote:
Since you did not provide the file you want to unpack, I downloaded FINAL FANTASY DIMENSIONS II instead of FINAL FANTASY DIMENSIONS I by mistake.


But i did. Anyway, if you manage to decompress it, let me know.
  • Author
  • Localization

Ekey, posted Wed Feb 05, 2020 3:54 am (53763)


I meant that you did not do this at the time of creating the topic. Anyway, If you asking about unpack / decrypt files and etc. then you must provide an example file at once.
  • Author
  • Localization

ExDuelist, posted Wed Feb 05, 2020 2:14 pm (53779)


Ekey wrote:
you must provide an example file at once.


??
  • Author
  • Localization

Ekey, posted Wed Feb 05, 2020 3:32 pm (53783)


What? You must provide an example file at during topic creation!
Image
  • Author
  • Localization

ExDuelist, posted Wed Feb 05, 2020 3:55 pm (53784)


I already posted the file in exam, what else i have to post?
  • Author
  • Localization

Ekey, posted Wed Feb 05, 2020 4:35 pm (53785)


This must be done when creating a topic!
  • Author
  • Localization

ExDuelist, posted Wed Feb 05, 2020 6:38 pm (53793)


Ekey wrote:
This must be done when creating a topic!


Oh, ok.
  • Author
  • Localization

ExDuelist, posted Tue Feb 11, 2020 12:15 pm (53924)


up.
  • Author
  • Localization

ExDuelist, posted Sun Feb 23, 2020 1:51 pm (54187)


Up up up!
  • Author
  • Localization

ExDuelist, posted Fri Mar 13, 2020 10:06 pm (54616)


Up.

I won't give up.
  • Author
  • Localization

ExDuelist, posted Fri Apr 03, 2020 9:41 pm (55504)


Help!
  • Author
  • Localization

ExDuelist, posted Tue Apr 07, 2020 2:10 pm (55602)


ok then, with this script i got like 2500 files, i think the text is specifically stored into these

Image

How to do it?

Luigi, grazie, mi hai riacceso la speranza. Se vuoi possiamo anche sentirci su discord.
  • Author
  • Localization

aluigi, posted Wed Apr 08, 2020 9:41 am (55633)


As far as I can see there are no references to the string since they are just a sequence of one-byte size field followed by the string plus some rare random strings placed in the middle.
I have updated the script for having all the extensions, so now only few files are .dat.
You can also use the script on the msg*.dat files (NOT message.dat) but you can't reimport the strings so no translation via quickbms.
  • Author
  • Localization

ExDuelist, posted Wed Apr 08, 2020 1:54 pm (55636)


aluigi wrote:
you can't reimport the strings so no translation via quickbms.


:( no hope then?
  • Author
  • Localization

aluigi, posted Wed Apr 08, 2020 3:44 pm (55640)


In theory reimport.bat can do the job but you need to maintain the same or shorter length for the strings... not practical.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.