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.

Optimize dll

Featured Replies

  • Author
  • Localization

chrrox, posted Wed Apr 28, 2021 2:51 pm (63619)


for some reason when I try to put the dividing number in the dll code it crashes on me.
This is working code but I was wondering how I could do the / 4 inside the dll.
also is there a way to combine these lines?
Quote:
buffer[i] ^= secretKey;
buffer[i] -= seed;

Code:
set MEMORY_FILE10 string "
typedef unsigned char   u8;
typedef unsigned int    u32;
 
static u32 secretKey = 0x45AF6E5D;
 
void Decrypt(u8* data, int data_size, int seed, int xored_size)
{
   u32* buffer = (u32*)(data);
   int remained = data_size % 4;
   u8* remained_data = (u8*)(buffer);
 
 
   if (xored_size > 0)
   {
      for (int i = 0; i < xored_size; i )
      {
         buffer[i] ^= secretKey;
         buffer[i] -= seed;
      }
   }
}
"
 
idstring "\x43\x4F\x44\x45\x00\x01\x55\x77"
get CRC32 long
get SEED long
get SIZE asize
math SIZE - 16
set LOOP SIZE
math LOOP / 4
 
get NAME basename
string NAME .png
log MEMORY_FILE 16 SIZE
calldll MEMORY_FILE10 "Decrypt" "tcc" RET MEMORY_FILE TABLE_SIZE SEED LOOP
log NAME 0 SIZE MEMORY_FILE
  • Author
  • Localization

aluigi, posted Wed Apr 28, 2021 5:00 pm (63620)


Do you mean quickbms.dll crashes when running that script?
Honestly I only compiled it so I can't offer much support about it but it's really weird if a crash happens on a simple instruction.

Luckily you can replace divisions with other solutions, for example "/ 4" -> ">> 2".

For the other question:
buffer[i] = (buffer[i] ^ secretKey) - seed;
  • Author
  • Localization

chrrox, posted Wed Apr 28, 2021 5:23 pm (63622)


that worked great thanks. :D
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.