ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Mon Dec 10, 2018 7:46 pm

All times are UTC




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri Nov 30, 2018 4:52 am 
User avatar

Joined: Fri Apr 20, 2018 12:41 am
Posts: 58
If anyone can decrypt these save files and find the key for them, it will be very appreciative, these should decrypt to plain XML if I'm correct, these are from the PC version but these will likely work as well on the mobile version as the saves are encrypted similarly...

http://www.filedropper.com/progress_2

http://www.filedropper.com/badpiggiescontraptions


Top
   
PostPosted: Thu Dec 06, 2018 4:50 pm 

Joined: Sun Aug 17, 2014 5:50 pm
Posts: 16
Attachment:
Bad_Piggies_Save.bms [2.11 KiB]
Downloaded 1 time

Code:
# Bad Piggies Save Decryptor/Encryptor (Progress.dat and .contraption)

get SIZE asize
if SIZE < 21
  print "File size is too small (%SIZE% bytes), can't be lower than 36 bytes"
  cleanexit
endif

get HDR long
get NAME basename
get EXT extension
strlen NAMESZ NAME
strlen EXTSZ EXT

if NAMESZ > 8 && EXTSZ < 5
  xmath TMP "NAMESZ - 8"
  string NAME > TMP
endif

if HDR == 0x3CBFBBEF
  string NAME += 1
  string EXT += 1
endif

if NAME == "Progress" || EXT == "contraption"
  set i byte 0
  if EXTSZ > 4
    set OFFSET byte 0
   callfunction AES_KEY2
  else
    set OFFSET byte 20
   callfunction AES_KEY1
  endif
  math SIZE - OFFSET
  log MEMORY_FILE OFFSET SIZE
  encryption "" ""
  goto -1 MEMORY_FILE
  get PADDING byte MEMORY_FILE
  if PADDING < 16
    math SIZE - PADDING
  endif
 
elif NAME == "Progress1" || EXT == "contraption1"
  set i byte 1
  xmath PADDING "(SIZE && 16) - SIZE"
  log MEMORY_FILE2 0 SIZE
  for j = 0 < PADDING
    goto SEEK_END MEMORY_FILE2
    savepos POS MEMORY_FILE2
    putvarchr MEMORY_FILE2 POS PADDING byte
  next j
  math SIZE x 16
  if EXTSZ > 4
    callfunction AES_KEY2
    log MEMORY_FILE 0 SIZE MEMORY_FILE2
    encryption "" ""
  else
    callfunction AES_KEY1
    log MEMORY_FILE 0 SIZE MEMORY_FILE2
    encryption sha1 MEMORY_FILE
    encryption "" ""
    math SIZE + 20
    append -1
    set MEMORY_FILE binary QUICKBMS_HASH
    append
  endif
else
  print "Error: Unknown data structure."
  cleanexit
endif

get NAME basename
get EXT extension
string NAME += _OUT.
string NAME += EXT
log NAME 0 SIZE MEMORY_FILE

startfunction AES_KEY1
encryption aes_256_cbc "\x47\xA0\x67\x45\xB0\x73\xB2\x27\xD1\xF5\x3A\x90\x2D\x73\x18\x94\x5E\xD5\xE5\x0D\x55\x36\xE8\x05\x62\x9D\x2E\x28\x1F\x40\x6C\x71" "\xA9\xD2\xA6\xF4\x98\xDE\x0C\xB2\xB1\x3F\x4A\xA0\xFB\x28\x4E\x24" i
endfunction

startfunction AES_KEY2
encryption aes_256_cbc "\xB9\x66\x6B\x35\x9C\x6B\xD0\xBC\x7C\x1D\xFA\x98\x50\xAD\x8B\xD9\x2F\x6F\xB7\x55\x06\xBA\x5F\xE7\x0C\x6B\xBA\xBA\x4D\x1E\x2D\xB3" "\x46\x24\xB5\xB8\x09\x86\xF9\x28\xFB\x5C\xC6\x41\x37\x3F\xCC\x25" i
endfunction


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 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