Of course I would never play something like Nekopara *cough*, so this is just a post describing a technical solution to a compatibility problem! Ok?! Good.
Yeah, it’s another one of those “something broke on XP / XP x64, so let’s fix it” articles. I’ve already been pla… eh.. investigating Nekopara Volumes 0, 1 and 2, and while the developer claims it needs Windows Vista or higher, those titles worked just fine on XP and XP x64. The final Volume 3 however broke.
I wondered why, given they’re all pretty similar, so I started unpacking the .exe files, looking for information. What I found in the meta data was that Vol.0-2 have been using the TVP(Kirikiri) or maybe the forked [Kirikiri Z] game scripting engine, whereas Vol.3 swapped that for the [Ares CatSystem2] engine, for whatever reason. My assumption would be, that the CatSystem2 thingy was actually built for Vista+ for real, thus breaking XP compatibility. Plus, some other minor components are broken as well (some installers, patches, etc., just like the older volumes).
Now, I’ve already been talking to a guy called UncleVasya / Oleg Ovcharenko, who built a [stub DLL solution] for games based on the Clausewitz Engine (Europa Universalis 4, Hearts of Iron 4, Crusader Kings 2 and finally Stellaris), making it work on XP. It’s pretty similar to the XCOM hacks. So I asked him about this one as well, and with quite some work and some additional (important) hints from him regarding the Steam version, I managed to make it run!
So, first things first: Thanks Oleg, you’re doing great work!
I will now show you how to make this visual novel / game work on XP x64 and XP, both for the slightly trickier Steam version (whether you choose to play the censored or the uncensored version doesn’t matter, the corresponding patch will be discussed as well), as well as the normal version.
Note: All screenshots in this post are 8-bit (256 color) PNG files. They may look a bit bad at times, but better than JPEG in the case of those specific images. Reason for not using truecolor PNG: 8-bit saves a ton of bandwidth.
2. How to make the non-Steam version work on XP / XP x64
- [Nekopara Vol.3]
- [7-zip] archiver
- NTCore [CFF Explorer] (optional; only needed for patches)
- Olegs’ [patcher]
2a. The main game
First, buy the game and download it. Do not pirate it! You suck if you do (I actually fooled around with a pirated version as well, but only after buying the game). When running the installer, you’ll notice that it already breaks early on after invoking the launcher:
Nekopara Vol.3s’ installer already fails to execute on XP
As you can see, it calls
InitializeCriticalSectionEx(), which is a newer, Vista+ version of
InitializeCriticalSection(), see the MSDN for details. Since the new version works differently, you can’t just hex edit your way out of this one.
First, unpack Olegs’ patcher to some subdirectory of your choice. Then, unpack the Nekopara Vol.3 installer (the .exe file) into a subfolder using 7-zip, and look for a file called INSTALL.exe. Copy that file into the directory where Olegs patcher resides, so where files like xp_EU4_1.21.cmd and xp_Stellaris_1.6.cmd can be found.
Since the scripts from Oleg aren’t made for hacking our files, we’ll write a new one for this, let’s call it xp_installer.cmd. Edit that with a text editor, and add the following lines:
rundll32.exe zernel32.dll,PatchFile INSTALL.exe
Make sure xp_installer.cmd, zernel32.dll and the INSTALL.exe from Nekopara are in the same directory, then execute
xp_installer.cmd. either by just double clicking it, or by opening a cmd terminal and by running it from there. Like this (you don’t need to run the extra commands, they’re just there to show you more information):
Olegs’ patch doing its magic on INSTALL.exe!
After that, rename your original INSTALL.exe in the directory where you unpacked the Nekopara Vol.3 installer, creating a backup file. Copy the following files from the patcher directory back to the installer directory: INSTALL.exe, zernel32.dll, z3d9.dll, zs2_32.dll and normaliz.dll. The “z” files are now implementing the missing functions, while redirecting all the others to the real Windows libraries like kernel32.dll, d3d9.dll, ws2_32.dll etc.
You don’t need to repack anything, just run
INSTALL.exe directly, and you’ll no longer be greeted with an error message, but with this:
The installer works now, great
Install the game to a directory of your choice. Now, if you click the
NEKOPARAvol3.exe in the directory where the game was installed, the same launcher comes up again, but now it allows you to configure and play the actual game instead of installing it…
Nekopara Vol.3s’ launcher after installation
…or does it? Well, the “System settings” part’ll work, yes, but when clicking that alluring “Start” button, you’ll run into yet another wall:
GetTickCount64(), that’s what.
Guess which function call doesn’t exist on XP? See the MSDN again.
GetTickCount64() really is an improvement over
GetTickCount(), but still, XP simply doesn’t have this either. As you can see from the title bar, the offending binary is cs2.exe, which is the actual game. We can get rid of the issue by using Olegs’ patcher again, so it’s the same process as with INSTALL.exe, just use this script instead, call it xp_cs2.cmd or something:
rundll32.exe zernel32.dll,PatchFile cs2.exe
Again, in case something goes wrong, rename your original cs2.exe before copying back the patched version with its .dll files. After copying back, you can run the game either by invoking
cs2.exe directly, or by launching it from the
Running the non-Steam version of Nekopara Vol.3 on XP x64 (click to enlarge)
2b. Making patches work as well
Patches are essentially also just self-extracting archives that execute a launcher after unpacking. We’ll discuss the patch 11 in this case. Running it will produce a different kind of error (people who know the content restoration patches for the Steam version may have seen this error as well):
Nekopara Vol.3 patch failure, due to it not being “a valid Win32 application”.
This error means that the header of the binary is asking for a more modern platform. This may make sense, if the program really calls modern functions, but you know, there are modern applications that don’t ask for it and then fail with calls to things like
GetTickCount64(), and there are programs which ask for a modern platform without ever having an actual need for it. The patchers are in the latter category of programs.
Unpack the patcher nekopara3_v11_update.exe using 7-zip, and look for a file called updater.exe. Create a backup copy of it, then open this file in NTCores’ CFF Explorer, and click on the “Optional Header” part. You’ll see something like this, I’ve marked the relevant lines with some red blocks for you:
updater.exe in CFF Explorer (click to enlarge)
The marked fields show values like
0000, as you can see. The significant number is the last or rightmost, so
0. This corresponds to the platform target Windows NT 6.0, or in other words: Windows Vista. Just rewrite that to show the following numbers, then save the file:
Patch the header to NT 5.1 (click to enlarge)
NT 5.1 (
0001) equals Windows XP. Note that the kernel versions 5.0 mean Windows 2000, 5.2 means Server 2003 or XP x64 (slightly more modern). Again, no need to repack anything, just save the file after the modifications have been made and execute
updater.exe afterwards, you should be getting this:
And here we have a working patcher (click to enlarge)
Yay! And now, for the Steam version of Nekopara Vol.3…
3. How to make the Steam version work on XP / XP x64
- [Nekopara Vol.3] on Steam (a censored version)
- [Content restoration patch] (optional; only required if you have to do perverted things to the cat girls)
- at0ms’ [Steamless]
- A Windows Vista or newer machine (needed to run Steamless, can be a virtual machine)
- [7-zip] archiver
- NTCore [CFF Explorer] (optional; only needed for the content restoration patch)
- Olegs’ [patcher]
3a. The main game
First, buy the game on Steam and download it. If you really need the uncensored version (you probably do, heh?), buy the content restoration patch at Denpasoft and download that as well. Of course, running the game as-is won’t work, otherwise we wouldn’t need this article in the first place:
The Steam version of Nekopara Vol.3 breaks on XP as well of course, due to
GetTickCount64() call, a newer and better version of
GetTickCount(), see MSDN.
Now, what I didn’t get at first was that patching the Steam versions’ NEKOPARAvol3.exe can never work out of the box. The reason is, that the offending function calls aren’t plainly there for us to see – the actual game binary cs2.exe is encrypted and packed into a SteamStub binary as its payload data. This is a part of the Steamworks DRM system wrapping our program up.
To be able to patch it, we (unfortunately) need to crack its cryptographic DRM protection system first. Now, let me say this again: I do not condone piracy. Don’t fucking crack and distribute this game. You’re an ass if you do. Removing the DRM part is only being done so we can fix the game on XP, keep that in mind!
Well, let’s start; First, boot up a Vista or newer Windows, and install Steamless on it. I actually tried to compile Steamless for XP, but this is .Net 4.5.2 stuff. To make it work on .Net 4.0 would require modifications of its build files / source code, which is a bit over my head right now. So we’re stuck with needing a modern Windows OS to do this. Copy the problematic NEKOPARAvol3.exe from your Steam game installation directory over to that machine, or just install Steam and the game on the modern Windows OS as well (which is what I actually did).
Launch Steamless, open that .exe and decrypt / unpack it, Steamless will leave your binary alone, and create a new, fixed one, so you don’t need to create a manual backup copy:
Steamless cracking NEKOPARAvol3.exe (click to enlarge)
Copy the fixed file back to XP, and rename it back to NEKOPARAvol3.exe. Create a backup of the original .exe in your Steam game installation directory, while you’re at it.
Unpack Olegs’ patcher in a directory of your choice, and move the NEKOPARAvol3.exe there as well, that’s where files akin to xp_EU4_1.21.cmd and xp_Stellaris_1.6.cmd can be found. Since those patcher scripts aren’t targeted at Nekopara Vol.3, we’ll write our own, call it xp_neko_3.cmd or something, open it in a text editor and enter the following lines:
rundll32.exe zernel32.dll,PatchFile NEKOPARAvol3.exe
Make sure that NEKOPARAvol3.exe, zernel32.dll and xp_neko_3.cmd are together in the same folder, then execute
xp_neko_3.cmd either by double-clicking it, or by opening a cmd terminal and executing it from there. Like this:
Olegs’ patcher handling the now-decrypted Steam version of NEKOPARAvol3.exe
Copy the fully fixed .exe back into the Steam game installation directory, together with the patchers’ stub libraries zernel32.dll, z3d9.dll, zs2_32.dll and normaliz.dll, which will handle the functions usually missing on XP.
Now, run the game either by executing
NEKOPARAvol3.exe, or by launching it from within Steam, and you should be greeted with something like this:
Nekopara Vol.3 running on XP x64 in its Steam version (click to enlarge)
Great (or something)!
Please be aware that if the binary is ever overwritten by Steam because of some update or whatever, you have to re-do the procedure, meaning the Steamless unpacking plus applying Olegs’ patch. If the game terminates without any error when launched from within Steam, try to run
NEKOPARAvol3.exe directly instead, and you’ll see the error messages – Steam tends to suppress them.
3b. The content restoration patch (this also applies to the patches for Nekopara Vol.1 and Vol.2)
So you want to lewd the cat girls? Perverted! Plus, Windows XP / XP x64 won’t let you, because the patch is asking for a newer platform (despite not actually requiring it though):
Nekopara Vol.3 content restoration patch failure on XP, due to the patch not being “a valid Win32 application”.
But if you absolutely have to, here’s how. Unpack the nekopara_vol3_Steam_R18DLC.exe you bought and downloaded from Denpasoft using 7-zip. Look for the file SteamPatch.exe, and open it in CFF Explorer:
The Nekopara Vol.3 Content restoration patchs’ SteamPatch.exe in CFF Explorer
Now, this is similar to the procedure described for updater.exe for a non-Steam versions’ patch. The significant (rightmost) numbers in the fields where it days
0000 represent Windows NT 6.0, or in other words Windows Vista. Since the patcher doesn’t really need any Vista-specific functions, we’ll just fix the header that is currently asking for a NT 6.0 platform as follows:
Change the fields to 5.1 (
0001 respectively) to have it check for XP+ instead, and it’s fixed!
Save the file after modifying it. Just like for the non-Steam version patches, there is no need to repack anything. Just run
updater.exe directly, and you’ll now get this:
The Nekopara Vol.3 content restoration patch for the Steam version working on XP x64. Because you’re in it for the Hentai.
There you go, pervert! You now have the fully restored version of Nekopara Vol.3 on Steam, running on XP or XP x64.
And last but not least: Thanks again, Oleg! I made you touch some weird shit, but you still fixed it and gave me the right ideas about the Steam version as well, yay!
4. Bonus feature: How to make Mechwarrior Online work on XP / XP x64 after their launcher upgrade
While entirely unrelated to the weird Japanese shit above, I’ll just mention this here as well, because it doesn’t deserve its own post, given the simplicity of the “solution”; Piranha Games decided to give Mechwarrior Online (MWO) a new game launcher called “MWO Portal”, that is now built with .Net 4.5.2, just like Steamless, breaking it on XP. Mind you, the game itself would still work just fine, even the 64-bit version on XP x64.
Windows XP / XP x64 users will likely never see this launcher work on their OS (Unless ExtendedXP really takes off, it’s pretty good already, but yeah).
Since hacking .Net 4.5 stuff to run on .Net 4 / .Net 4 CP is not something I can do yet, MWO would be gone from all XP machines. There is an easy fix for this though:
Get the game on Steam! The Steam version doesn’t include the launcher, as Steam itself is handling both the execution and the updates of MWO. Without the launcher, MWO still works just fine!