ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Jul 19, 2019 4:02 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Jun 23, 2019 2:13 pm 

Joined: Sun Jun 23, 2019 2:06 pm
Posts: 4
I have a file encrypted when I use this code works without probleam,

Code:
goto 4
get size asize
savepos offset
encryption rc4 KEY

get NAME basename
string NAME += ".png"
log NAME offset size


but some of files compressed and ecrypted when I try decompress and decrypt with this code I am getting error.

Error:
Code:
Error: impossible to write 0xefdffd20 bytes (total 0xefdffd20)
       Check your disk space or the script is wrong

Last script line before the error or that produced the error:
  129 log NAME offset size


Decompression code
Code:
    comtype zlib_compress
   get SIZE asize
   clog test 0 SIZE SIZE


Attachments:
export.bms [2.57 KiB]
Downloaded 10 times
encryption_scan.bms [283 Bytes]
Downloaded 10 times
Top
   
PostPosted: Sun Jun 23, 2019 3:13 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 10553
For sure a mistake is using SIZE equal to the whole file and an OFFSET which is not zero.
Solution
math SIZE - OFFSET


Top
   
PostPosted: Sun Jun 23, 2019 8:44 pm 

Joined: Sun Jun 23, 2019 2:06 pm
Posts: 4
Thank you but i changed script because with asize not work correctly. I cant share sample file for decompression I guess.

For decryption works with this
Code:
goto 4
get size long
savepos offset
encryption rc4 KEY
get NAME basename
string NAME += ".png"
log NAME offset size


with other file must decompress and decrypt and I am getting error " Can't read byte"
Code:
  goto 4
   get size long
   savepos offset
   #math SIZE - OFFSET
   comtype zlib_compress
   clog test OFFSET SIZE SIZE   


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

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