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.

string convert

Featured Replies

  • Author
  • Localization

chrrox, posted Mon Oct 14, 2019 1:44 pm (51520)


I am trying to convert the string "e8fc9029" to an int
when I do
set KEY0 string "e8fc9029"
set TMP string "$"
string TMP = KEY0
set KEY0 long TMP
I get 0xFFFFFFFFE8FC9029
how do I make it get the unsigned version of the number so its
0xE8FC9029
  • Author
  • Localization

chrrox, posted Mon Oct 14, 2019 2:46 pm (51522)


I am getting an different results when I don't hard code the key.

Code:
quickbmsver "0.8.0"
set MEMORY_FILE10 string "
typedef unsigned char uchar;
typedef unsigned int uint;

int ll_decrypt(unsigned char *data, int size, int keys_0, int keys_1, int keys_2) {
    int     i;
    for(i = 0; i < size; i ) {
        uchar c = data[i];
        data[i] = data[i] ^ (((keys_1 ^ keys_0 ^ keys_2) >> 24) & 0xff);
        keys_0 = (0x343fd * keys_0 0x269ec3) & 0xFFFFFFFF;
        keys_1 = (0x343fd * keys_1 0x269ec3) & 0xFFFFFFFF;
        keys_2 = (0x343fd * keys_2 0x269ec3) & 0xFFFFFFFF;
    }
}
"

set URLBASE string "https://jp-real-prod-v4tadlicuqeeumke.api.game25.klabgames.net/ep1002/static/f141c313a139e1e6/"
open "." "https://jp-real-prod-v4tadlicuqeeumke.api.game25.klabgames.net/ep1002/static/f141c313a139e1e6/masterdata_a_ja"
get SIZE asize
log MEMORY_FILE 0 SIZE
goto 0x14 MEMORY_FILE
get NSIZE byte MEMORY_FILE
getdstring VERSION NSIZE MEMORY_FILE
get NSIZE byte MEMORY_FILE
getdstring LANG NSIZE MEMORY_FILE
get FILES byte MEMORY_FILE
print "%VERSION% %LANG% %FILES%"
for i = 0 < files
math constKeys_0 =   0x3039  // 12345
math constKeys_1 =   0x10932 // 67890
math constKeys_2 =   0x7AB7  // 31415
set MEMORY_FILE2 ""
get NSIZE byte MEMORY_FILE
getdstring FNAME NSIZE MEMORY_FILE
get NSIZE byte MEMORY_FILE
getdstring KEY0 8 MEMORY_FILE
getdstring KEY1 8 MEMORY_FILE
getdstring KEY2 8 MEMORY_FILE
getdstring CRC 16 MEMORY_FILE
print "%FNAME% %KEY0% %KEY1% %KEY2% %CRC%"
set TMP string "$"
string TMP = KEY0
set KEY0 long TMP

set TMP string "$"
string TMP = KEY1
set KEY1 long TMP

set TMP string "$"
string TMP = KEY2
set KEY2 long TMP

set URL URLBASE
string URL FNAME
print "Downloading %URL%"
xmath keys_0 "constKeys_0 ^ KEY0"
xmath keys_1 "constKeys_1 ^ KEY1"
xmath keys_2 "constKeys_2 ^ KEY2"
open "." URL
get SIZE asize
log MEMORY_FILE2 0 SIZE
calldll MEMORY_FILE10 "ll_decrypt" "tcc" RET MEMORY_FILE2 SIZE keys_0 keys_1 keys_2
string FNAME ".decrypt"
log FNAME 0 SIZE MEMORY_FILE2
next i


  • Author
  • Localization

chrrox, posted Mon Oct 14, 2019 4:35 pm (51524)


The strings that convert the keys to all positive integers decrypt fine.


seems to work fine with 64 bit quickbms any way to make it work in 32 also?
  • Author
  • Localization

aluigi, posted Tue Oct 15, 2019 8:57 am (51536)


The output is the same for both quickbms and quickbms_4gb_files.

I tried your script in the first post and I correctly get 0x00000000e8fc9029 with quickbms_4gb_files.
  • Author
  • Localization

chrrox, posted Tue Oct 15, 2019 11:02 am (51539)


The xor output is wrong unless I use the 4gb file version
  • Author
  • Localization

aluigi, posted Tue Oct 15, 2019 4:45 pm (51547)


I used the second script with both quickbms.exe and quickbms_4gb_files.exe and the output was identical.
  • Author
  • Localization

chrrox, posted Tue Oct 15, 2019 7:30 pm (51555)


I can't get this script to work with original quickbms.exe
viewtopic.php?f=9&t=12657
Might be due to the multiplication done in the xor function?
  • Author
  • Localization

aluigi, posted Thu Oct 17, 2019 1:20 pm (51582)


It's the same script posted above, the same I already tried and gave the same output with quickbms and quickbms_4gb_files.

Anyway that URL is now returning 404
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.