monogame visual novel .vna?

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
ManGuy12
Posts: 6
Joined: Wed Jan 26, 2022 5:03 pm

monogame visual novel .vna?

Post by ManGuy12 »

Game: CYOA Cat up a tree (NSFW Warning)
Trying to access this game's files but it's encrypted in an "archive.vna" file?
This game runs on .NET Core 3.1 so it was easy to decompile but the encryption algorithm went over my head.
I looked everywhere to figure this out but I'm not sure if I can do it.
Thanks in advance!
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: monogame visual novel .vna?

Post by spiritovod »

Here are two scripts for decrypting vna container: quickbms adaptation (very ineffective and works correctly only with 32-bit quickbms, but easy to understand) and with native code through calldll function (recommended).
P.S. It's actually a good example for RE beginners, kinda recommended to dig into it for learning basic stuff.

Update: Extracting functionality added to calldll version of the script. Note that output folder must be the same as input folder, otherwise you'll get error.
Last edited by spiritovod on Sun Mar 20, 2022 12:22 pm, edited 2 times in total.
ManGuy12
Posts: 6
Joined: Wed Jan 26, 2022 5:03 pm

Re: monogame visual novel .vna?

Post by ManGuy12 »

spiritovod wrote:Here are two scripts for decrypting vna container: quickbms adaptation (very ineffective and works correctly only with 32-bit quickbms, but easy to understand) and with native code through calldll function (recommended).
P.S. It's actually a good example for RE beginners, kinda recommended to dig into it for learning basic stuff.


Yeah the first script runs slow for me, the second one I'm not sure if it's working. I'm getting these warnings.

Code: Select all

<string>:36: warning: implicit declaration of function 'malloc'
<string>:37: warning: implicit declaration of function 'memcpy'
<string>:44: warning: implicit declaration of function 'free'


It does spits out a decrypted file but doesn't extract the files?
Or is that something I'm supposed to figure out?
spiritovod
Posts: 719
Joined: Sat Sep 28, 2019 7:00 pm

Re: monogame visual novel .vna?

Post by spiritovod »

Those warnings are normal thing for this case. I've updated calldll version of the script with extraction functionality in my post above. All images in the archive are named as png, but some of them are actually bmp/gif - most editors can handle wrong headers though.
ManGuy12
Posts: 6
Joined: Wed Jan 26, 2022 5:03 pm

Re: monogame visual novel .vna?

Post by ManGuy12 »

spiritovod wrote:Those warnings are normal thing for this case. I've updated calldll version of the script with extraction functionality in my post above. All images in the archive are named as png, but some of them are actually bmp/gif - most editors can handle wrong headers though.


Worked like a charm. Thank you very much! :D