ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon May 10, 2021 5:50 am

All times are UTC




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Apr 28, 2021 5:22 pm 

Joined: Thu Aug 07, 2014 10:28 pm
Posts: 377
Quickbms Script for Valkyrie Crusade decryption.
ID com.nubee.valkyriecrusade
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)
{
   u32* buffer = (u32*)(data);
   u32 xored_size = data_size / 4;
 
   if (xored_size > 0)
   {
      for (int i = 0; i < xored_size; i++)
      {
         buffer[i] = (buffer[i] ^ secretKey) - seed;
      }
   }
}
"
 
idstring "\x43\x4F\x44\x45\x00\x01\x55\x77"
get CRC32 long
get SEED long
get SIZE asize
math SIZE - 16
 
get NAME basename
string NAME + .png
log MEMORY_FILE 16 SIZE
calldll MEMORY_FILE10 "Decrypt" "tcc" RET MEMORY_FILE SIZE SEED
log NAME 0 SIZE MEMORY_FILE


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited