Cave - RPG bankedit

Ruvelia

Member
Hey folks,

Lurker of original D3scene. Looking for a way to read encryption on this map. I've downloaded Visual Studio code with galaxy addon but unable to find the map due to being locked, and tried finding it under hidden files on my PC to see how the encryption works. Also I have 0 experience with this so I was trying to figure it out on my own.

Looking to find a way to max out gold. It *looks* simple as gold is listed under statistics and then statistics is protected by encryption in other lines in the same file, as well as one of the last backup files, just haven't figured out how to connect them.

Any help is appreciated.

Thanks.
 

Ruvelia

Member
I did some diving and here's where I'm stuck in the bank files:

I merely changed gold by buying something and destroying it and left everything else, so the only number that changed was gold, and then I compared the files in excel to find the differences.

<Key name="Encrypt2"><Key name="Encrypt2">
<Value string="-2081075704"/><Value string="2106260952"/>

<Key name="Statistics"><Key name="Statistics">
<Value string=" 700602 667732 5438 12121 23 19 191 5727812 2622413 20439 859836 221 10961 210 149 23 4 0 133 18 3 0 0 0 38 0 0 33 0 1 16465 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"/><Value string=" 666933 667732 5438 12127 24 20 191 5727812 2622413 20439 859836 221 10961 210 149 23 4 0 133 18 3 0 0 0 38 0 0 33 0 1 16475 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0"/>

<Key name="Statistics0"><Key name="Statistics0">
<Value string="150697"/><Value string="151039"/>

<Key name="Encrypt"><Key name="Encrypt">
<Value string="316680"/><Value string="686040"/>


Every other layer of encryption was unchanged. These ones were just a few lines apart. Bolded text is the gold change. The other bolds might be the amount of games played as that's tracked as well.
 

Ruvelia

Member
So I tried that, and searched where to find the map. Forum posts from 2015-16 said that you have to search hidden files, Program Data, and maps are stored there.

I have been unable to find it in that location and none of those map files open in staredit besides maps that aren't locked and Blizzard maps.

Any guidance would be helpful.
 

500faults

Member
The dev of this map went to a lot of effort to make it hard to crack, at one point he in fact said he would give his map to someone who cracks the bank file.
 

Ruvelia

Member
Must be a certain condition, because I have seen on the discord I think it was someone admitting to changing the stats on gear to better suit them, but not anything other than that.
 

Ruvelia

Member
Thank you, much appreciated.

While I'm super new to this, I'll do what has been working and doing things in reverse, basically comparing my current bankfile to this and seeing where the values come from, such as the "Encrypt2" number generating from lines 800-915. But I just need to read what flags each number.
 

Sterillium

Moderator
Thank you, much appreciated.

While I'm super new to this, I'll do what has been working and doing things in reverse, basically comparing my current bankfile to this and seeing where the values come from, such as the "Encrypt2" number generating from lines 800-915. But I just need to read what flags each number.
i looked at it now for a bit.
im sorry to for a newbie, this is almost impossible, but i give you 3 options u got to hack this:

1) you make the map playable in offline mode and debug the numbers.
2) you make a own programm, take the mapcode where it loads the bank data, rewrite it, then just reproduce it
3) you make a own program, take some partsof the code, rewrite it, take the mainstring, and bruteforce it against the "checking" values.

also helpful: (Convert Galaxy Code to C#)
C#:
        string StringWord(string s, int i) { return s.Split(' ')[i]; }
C#:
        int ModI(int a, int b) { return a % b; }
C#:
        string StringSub(string val, int start, int end) {
            string result = string.Empty;
            try { return val.Substring(start - 1, end - start + 1); } catch { result = string.Empty; }
            return result;
        }
C#:
        int StringToInt(string val) { try { return int.Parse(val); } catch { return 0; } }
C#:
        string IntToString(int val) { return val.ToString(); }
C#:
        int StringLength(string val) { return val.Length; }
Edit: Here the full code to work with (tested and working). Good Luck!
 

Attachments

Last edited:

Ruvelia

Member
I'm a brute force/reverse engineer type. I managed to get gold to work but once I hit the first achievement or go over a certain limit it breaks, and that only works on a brand new file and not my current one.

I appreciate the help so far though, you're the MVP around here but I also don't like wasting peoples time, haha, so I'll figure it out from here hopefully.

Thanks again.
 

Sterillium

Moderator
that code up there includes everything you need, i cut the unseless stuff off too.
bruteforce the codes against the maincode it generates :) good luck.
 
Top