Dungeon of Erotic Master Plus

Me_Lisa

Newbie
Oct 6, 2019
44
73
This game won't be fan-translated until someone successfully decrypts 'data.pac'.

But it seems nobody cares about doing any actual hard work, or showing any interest or appreciation to someone who tries.
Thanks for stressing the point that what I am trying to do here - wasting the time of my fleeting youth so that some ungrateful zoomers on the internet can amuse themselves - is dumb and I should stop.
Okay then. Wait for the official English release of the game.
Why would you think that nobody cares? It is quite the opposite to be honest. A lot of people read threads with delay (personally I read your post just now) and many read it in lurker mode but they still care.
My attitude to this kind of work is that I do it, because I want to do it for myself in the first place and then share with others. Otherwise if I do it only for someone' recognition and don't have personal interest in it, it can turn in a big disappointment real fast.

If you track original Danero thread you may remember that I've asked for someone who can crack this game for further redrawing/translation a long time ago, when Danero Plus demo version just came out. I don't have coding skills (I assume you need it for that reverse engineering magic that you are doing) but If you choose to continue and will need a hand with some routine monotone work I would gladly help, so feel free to PM or quote me.
 

RottenCitizen

Member
Aug 27, 2020
220
848
My attitude to this kind of work is that I do it, because I want to do it for myself in the first place and then share with others. Otherwise if I do it only for someone' recognition and don't have personal interest in it, it can turn in a big disappointment real fast.
Yep. I think that's the only mature way to approach it.

I already took a long break, and still have too much IRL stuff on my hands. When (and if) I make a significant progress, I'll publish the results here, and you're more than welcome to use them to make a translation.

and was yelled at instead
I'm sorry that you felt that I was yelling at you. I have nothing personal for you.
I'm just frustrated that I seem to be so different from the average visitor to this forum that you folks don't even understand what I write about.

It's not a case of just MTL it, as RottenCitizen said it's getting inside the game to be able to start doing anything at all that's the problem. None of Rusimarudou's games have been fan translated, Goblin Walker and Erotic Master were official. Hentai Eater from 2013 has never gotten anything.
That is because '.pac' format along with the entire game engine seems to be custom made.
Filename "encryption" scheme is very simple, though, which gives hope that the encryption scheme for actual data is not much harder.

But even after successfully extracting the contents of the archive to the outside there is a second problem: we have to make the game use the extracted files directly, or pack them into a new archive (which is much harder than unpacking it).
 

Me_Lisa

Newbie
Oct 6, 2019
44
73
Yep. I think that's the only mature way to approach it.

I already took a long break, and still have too much IRL stuff on my hands. When (and if) I make a significant progress, I'll publish the results here, and you're more than welcome to use them to make a translation.
Yes, IRL stuff is always a top priority, most devs wouldn't be able to create amazing things if they have problems all over them. And now are hard times, so take a good care.

That is because '.pac' format along with the entire game engine seems to be custom made.
Filename "encryption" scheme is very simple, though, which gives hope that the encryption scheme for actual data is not much harder.

But even after successfully extracting the contents of the archive to the outside there is a second problem: we have to make the game use the extracted files directly, or pack them into a new archive (which is much harder than unpacking it).
Despite new engine, there's a good chance unpacked stuff can just work from a folder in main directory with the name of an archive, like it was with first Danero. I looked through your file_paths.txt and it seems that you already have directory and file structure. Well done. (Seriously, how did you manage to pull it out? Do you need some specific deep skills with years of education or is it a matter of dedication and publicly available information/guides? Very curious where this rabbit hole begins, so to speak.)

Well well, having directory/file structure we can check if it will work from a folder. We can create needed folders from your file and then for example put some other png file with one of original png' name and see if it'll change somewhere in the game. I haven't touch Danero Plus yet but eh, I'll try to poke it when I have free time and see what will happen, all for the cause.


P.S. Due to our conversation I remembered that I saw rusimarudou' tweet a while ago about the engine his developer was using for Dunero Plus:

"I got an answer from a programmer.
I am using my own engine. It combines DirectX9, Win32API, TinyXML, zlib, stb library, and Dear ImGUI for cheat menus."
You don't have permission to view the spoiler content. Log in or register now.

Maybe it will help you in your journey somehow.
 
Last edited:

RottenCitizen

Member
Aug 27, 2020
220
848
Yes, IRL stuff is always a top priority, most devs wouldn't be able to create amazing things if they have problems all over them. And now are hard times, so take a good care.
Thanks, I will.

Despite new engine, there's a good chance unpacked stuff can just work from a folder in main directory with the name of an archive, like it was with first Danero.
Yep, that would be convenient. I too hope that the game will just read its files from local file system if it won't see the archive in place.

Seriously, how did you manage to pull it out? Do you need some specific deep skills with years of education or is it a matter of dedication and publicly available information/guides? Very curious where this rabbit hole begins, so to speak.)
I think you can learn anything with information from publicly available sources. I think the best way to learn something is fiddling with it for fun. Formal education can be useful for structuring information in your head and broadening your horizons, but it's not strictly necessary. The main thing is to actually desire to learn something.

I'm a programmer, been doing in for more than a decade. Usually I fiddle with relatively high level stuff, completely unrelated to program reverse engineering, malware analysis, cybersecurity, programming in assembly or anything like that. But still I have some general idea of how computers actually run our programs.

Instructions on how to read 'data.pac' is obviously stored somewhere inside the game's .exe file, as it reads the file during launch.
Here's what I did: I used a program from SysInternals called Process Monitor (procmon) to record system call "ReadFile" from the game to 'data.pac'. It recorded 364,688 such events with quite a bit of information associated with each event, some of which was very useful. Namely, byte offset into the file, length (amount of bytes read) and a stack trace at the moment of read. I've exported all this information as one huge 2.2 Gb XML file and wrote a bunch of throwaway Ruby scripts to process and analyze it.
I've merged all 364k stacktraces into a single graph, and generated a picture below using GraphViz.
You don't have permission to view the spoiler content. Log in or register now.

I've used x64dbg and later a pirated copy of IDA Pro to disassemble the game's executable file and poke around inside it, focusing on addresses shown in the graph. That's when I found that after some of the reads reads an internal file path is decoded and stored into some structure in memory.
Path encoding works like this: first, all path are UTF-8 strings of 128 bytes or less. Every byte of the string is XORed with a counter that count from zero to 127 inclusively. Decoding process is exactly the same, because (a XOR b) XOR b = a.
I'm pretty sure that rusimarudou's friend wrote something like this:
C:
char buf[128] = "some/path.txt";
for (char i = 0; i < 128; ++i) {
    buf[i] ^= i;
}
Example: let's assume the archive contains file "info.xml". This string encoded in UTF-8 looks like this byte sequence: [0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x78, 0x6d, 0x6c, 0x00]. Then we XOR it byte-by-byte with sequence [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08] and get [0x69, 0x6f, 0x64, 0x6c, 0x2a, 0x7d, 0x6b, 0x6b, 0x08, ...] (garbage up to 128 byte boundary). This is directly written to 'data.pac' at some offset.

So I quickly sketched out a script that goes through all the read events and tries to decrypt part of 'data.pac' specified by the event's offset as a file path. That's how I got that list of files.
Sorry for my sloppy language and overabundance of technicalities.

Well well, having directory/file structure we can check if it will work from a folder. We can create needed folders from your file and then for example put some other png file with one of original png' name and see if it'll change somewhere in the game. I haven't touch Danero Plus yet but eh, I'll try to poke it when I have free time and see what will happen, all for the cause.
Good idea. I've already tried something like this on a much smaller scale, but this deserves more research.

I am using my own engine. It combines DirectX9, Win32API, TinyXML, zlib, stb library, and Dear ImGUI for cheat menus."
...
Maybe it will help you in your journey somehow.
Sadly, it does not help much. I've already figured out that they used C++, and most probably compiled the game with MSVC. It is probably possible to exploit that fact to make understanding assembly code easier, but I don't know how.
 
Jul 22, 2017
443
191
New update today:
Added 2 subquests added after clearing the game In
addition, you can add Helmetia's H animation as a support privilege.

Did the last game have support privilege content? Is it possible to play those somehow?
 
  • Like
Reactions: DeynanDescafeinado

Werrino

Member
Jun 26, 2018
286
75
Anyone please with a working link? anon and zippy not working for me since a long time unfortunately
 

shap

Newbie
May 4, 2020
73
17
can someone help my please?
i got a red-head girl, I got a red bracelet by defeating an evil red-haired bitch, found a book, watched a cutscene and now I'm not allowed to go further by a block in another corridor. what should i do?
 

Me_Lisa

Newbie
Oct 6, 2019
44
73
Arr, been absent for too long, lot of stuff going on lately.

So rusimarudou is working on Danero Plus dlc and Danero 2, interesting. But future of official translation is rather hazy, not waiting for it anymore personally. And playing without understanding story is a no go for me, thus Danero Plus on a big hold, sadly.

New update today:
Added 2 subquests added after clearing the game In
addition, you can add Helmetia's H animation as a support privilege.

Did the last game have support privilege content? Is it possible to play those somehow?

Maybe you've figured it out already but still, won't hurt:

"I apologize for the many questions, but if I purchase the 500 premium plan, how do I download the extra content of the blacksmith's daughter? thanks in thanks in advance for all the answers you will give me ^^ final question, the gallery unloched if you complete the game?

Rushimarudo
If you subscribe to the 500 premium plan, the contents of the current page will be opened and you can download the Blacksmith Girl contents from there.
If you put the blacksmith-girls content [Helmetia additional animation.pac] in the game folder, the gallery will be opened even if you don't complete the game.
You don't have to clear the game to open the gallery."

I think you can learn anything with information from publicly available sources. I think the best way to learn something is fiddling with it for fun. Formal education can be useful for structuring information in your head and broadening your horizons, but it's not strictly necessary. The main thing is to actually desire to learn something.

I'm a programmer, been doing in for more than a decade. Usually I fiddle with relatively high level stuff, completely unrelated to program reverse engineering, malware analysis, cybersecurity, programming in assembly or anything like that. But still I have some general idea of how computers actually run our programs.

Instructions on how to read 'data.pac' is obviously stored somewhere inside the game's .exe file, as it reads the file during launch.
Here's what I did: I used a program from SysInternals called Process Monitor (procmon) to record system call "ReadFile" from the game to 'data.pac'. It recorded 364,688 such events with quite a bit of information associated with each event, some of which was very useful. Namely, byte offset into the file, length (amount of bytes read) and a stack trace at the moment of read. I've exported all this information as one huge 2.2 Gb XML file and wrote a bunch of throwaway Ruby scripts to process and analyze it.
I've merged all 364k stacktraces into a single graph, and generated a picture below using GraphViz.
You don't have permission to view the spoiler content. Log in or register now.

I've used x64dbg and later a pirated copy of IDA Pro to disassemble the game's executable file and poke around inside it, focusing on addresses shown in the graph. That's when I found that after some of the reads reads an internal file path is decoded and stored into some structure in memory.
Path encoding works like this: first, all path are UTF-8 strings of 128 bytes or less. Every byte of the string is XORed with a counter that count from zero to 127 inclusively. Decoding process is exactly the same, because (a XOR b) XOR b = a.
I'm pretty sure that rusimarudou's friend wrote something like this:
C:
char buf[128] = "some/path.txt";
for (char i = 0; i < 128; ++i) {
    buf[i] ^= i;
}
Example: let's assume the archive contains file "info.xml". This string encoded in UTF-8 looks like this byte sequence: [0x69, 0x6e, 0x66, 0x6f, 0x2e, 0x78, 0x6d, 0x6c, 0x00]. Then we XOR it byte-by-byte with sequence [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08] and get [0x69, 0x6f, 0x64, 0x6c, 0x2a, 0x7d, 0x6b, 0x6b, 0x08, ...] (garbage up to 128 byte boundary). This is directly written to 'data.pac' at some offset.

So I quickly sketched out a script that goes through all the read events and tries to decrypt part of 'data.pac' specified by the event's offset as a file path. That's how I got that list of files.
Sorry for my sloppy language and overabundance of technicalities.

Wow, RottenCitizen, that's a lot of work for just a list of filenames, some top level enthusiasm and dedication here. I assumed that rabbit hole was deep but now it seems freakin endless!
I had thoughts some time ago about RAM or VRAM monitoring and access to pull game content out of it. But I quickly realized that kind of software mainly used by governments or big companies and is quite niche and expensive.

Yep, that would be convenient. I too hope that the game will just read its files from local file system if it won't see the archive in place.
Good idea. I've already tried something like this on a much smaller scale, but this deserves more research.

So it seemed. I created directory structure, then took one image, multiplied and renamed it according to your file list, so in case it'd work we'd see only this one picture during whole game.
Out of my naivety I hoped that game would prioritize content from folder and take absent parts from archive. (I must say I thought that way for a reason, there were some games in past acting exactly like this while modding)
But those hopes were cruelly shattered while running Danero, no changes were made at all. And obviously you can't delete archive as you don't have the rest of files from it, game'll just error on you. So it's a dead end. This is where my poor competence and knowledge ends.
Help us, RottenCitizen. You're our only hope)
 

AnubiSs2167

Member
Mar 1, 2018
169
594
i recently bought this and helmetia animations from his cien plan, its a pain but if u have new phone u can download translate program that captures whats on camera and auto translates, makes u atlest know what ppl are saying with google translate.
Tho im still stuck,
Anyone know where to go after defeating furry ice mage?

(helmetia patch)
 
Last edited:

Boogerman2020

New Member
Mar 16, 2022
9
35
i recently bought this and helmetia animations from his cien plan, its a pain but if u have new phone u can download translate program that captures whats on camera and auto translates, makes u atlest know what ppl are saying with google translate.
Tho im still stuck,
Anyone know where to go after defeating furry ice mage?

(helmetia patch)
I think the base game got an update to be able to use the patch files, can you post your own updated game?
 
  • Like
Reactions: DeynanDescafeinado

Artix0

Member
Modder
Jun 26, 2017
310
319
Anyone know if there's any H content with the redhead from the cover image? Does she appear in the game at all?

This is what the gallery looks like in my patched version of 1.05, I'm not sure if there's some way to swap Helmetia out for the redhead or something?

EDIT: Used emy121's complete save file and Helmetia had been swapped out for the redhead, yay :D

1663106458455.png
 
Last edited: