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.

Saboteur Luap for xbox360

Featured Replies

  • Author
  • Localization

mte90, posted Thu Dec 24, 2020 8:58 pm (61270)


Based on viewtopic.php?f=9&t=213&hilit=luap I tried to export the file from the LuaScripts.luap file but the package released for xbox360 is different.
If I use the script for pc works but on luap cannot find anything also if I think that the file package is similar as I can see that some things are very similar.

Experimenting showed that the FILES variable with the luap file from xbox360 it is a long number negative -1358954496 instead on the pc for the same file is 321 (the size is different).

https://filetransfer.io/data-package/Dfy0Gtrs#link

At that link there is a zip package with the pc version and the xbox360 to do a comparison and in the meantime I will keep investigating, but I am not sure about what are the difference, if files is negative the loop doesn't work, if I force the loop with a fixed number there is another error Can't read 12 bytes from offset 5f0e0000.

I tested comtype-scan.bms with no results, wondering if the file is signed so cannot scan like the pc version.
  • Author
  • Localization

mte90, posted Thu Dec 24, 2020 10:15 pm (61274)


So on my investigation also about how quickbms works, get FILES long takes the first 4 bytes that is
Code:
4101 = 321
in this way does the loop but on the xbox version those 4 bytes are
Code:
0000
, so probably the file number is in another byte.
  • Author
  • Localization

mte90, posted Thu Dec 24, 2020 11:11 pm (61275)


Other investigation showed that the end of the files it's the same so I am testing in a different way, with ignoring the first bytes of the file:
Code:
get TEMP threebyte
get FILES byte
print "%FILES%"

for i = 0 < FILES
    getdstring HASH 8
    get DUMMY threebyte
    get OFFSET long # is 3679 should be around 6740
    math OFFSET s 2
    get SIZE threebyte # 00 00 D8 04 instead of 00 00 04 D8
    math SIZE s 2
    get DUMMY2 byte
    get XSIZE threebyte
    math XSIZE s 2
    print "%OFFSET% %OFFSET|h%"
    print "%SIZE% %SIZE|h%"
    print "%XSIZE% %XSIZE|h%"

    savepos TMP
    goto OFFSET
    getdstring DUMMY 12
    get NAMESZ long
    getdstring NAME NAMESZ
    string NAME | ":"
    goto TMP

    log NAME OFFSET SIZE
next i


Searching for .lua in the pc version there are 332 reference and in the xbox360 instead 186, as we know that the pc version is 321 probably the xbox version is around 186 and as this snippet the files are 175. I think that I am near also because seems that the first file is the same by name in both so size should be similar is just to define the dummy bytes to me.

I just need a bit of help on understanding how to swap the bytes, as I can see the values are mirrored compared to the pc version.
  • Author
  • Localization

mte90, posted Sat Dec 26, 2020 4:00 pm (61291)


I am almost, break with the last file but I am right to the end.
Code:
get FILES long
reverselong FILES
print "%FILES%"

for i = 0 < FILES
    getdstring HASH 8
    get OFFSET long
    reverselong OFFSET
    get SIZE long
    reverselong SIZE
    get XSIZE long
    reverselong XSIZE
    get DUMMY byte
    print "%OFFSET% %OFFSET|h%"

    savepos TMP
    goto OFFSET
    get NAMESZ short
    getdstring DUMMY 12
    print "%NAMESZ% %NAMESZ|h%"
    getdstring NAME NAMESZ
    print "%NAME% %NAME|h%"
    string NAME | ":"
    goto TMP

    log NAME OFFSET SIZE
next i
  • Author
  • Localization

mte90, posted Sat Dec 26, 2020 4:45 pm (61292)


To avoid any troubles I put a fixed value to look for the filename to avoid issues.

Code:
get FILES long
reverselong FILES

for i = 0     getdstring HASH 8
    get OFFSET long
    reverselong OFFSET
    get SIZE long
    reverselong SIZE
    get XSIZE long
    reverselong XSIZE
    get DUMMY byte

    savepos TMP
    goto OFFSET
    set NAMESZ 120 # fixed value because the data is not consistent
    getdstring DUMMY 17
    getdstring NAME NAMESZ
    string NAME | ":"
    goto TMP

    log NAME OFFSET SIZE
next i


This extractor works :-D
  • Author
  • Localization

aluigi, posted Thu May 13, 2021 4:18 pm (64014)


If the problem is just the endianess you can use the following command in the original script:
Code:
endian big

Or even better, after "get FILES long" using "endian guess FILES" which will do it automatically ;)
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.