GARbro icon indicating copy to clipboard operation
GARbro copied to clipboard

Game Request: Nukige Mitai na Shima ni Sunderu Watashi wa Dou Surya Ii Desu ka? 2

Open KiritoCy opened this issue 6 years ago • 13 comments

https://vndb.org/v23741 archives : .WAR It seems it uses a new updated encryption compared to the prequel since i can't even extract the script archives, can you update it plz? Thanks in advance ;)

KiritoCy avatar Jul 27 '19 12:07 KiritoCy

VNDB: https://vndb.org/v23741 Developer: Qruppo Engine: 椎名里猪 v2.50 Archive files: .WAR Thank you so much!

morumoto avatar Aug 22 '19 13:08 morumoto

RioShiinaDump.zip This is a semi-automatic solution for Nukige Mitai na Shima ni Sunderu Watashi wa Dou Surya Ii Desu ka? 2. It will dump all files which are accessed by RioShiina 2.5 engine. If you want to use it to unpack specific files. You need generate a Dump file list. In Garbro repo, you can find how to decrypt file name in War file. Then modified the dumper function. Use CreateThread to create a Thread for dumping files.

jszhtian avatar Apr 03 '20 20:04 jszhtian

RioShiinaDump.zip This is a semi-automatic solution for Nukige Mitai na Shima ni Sunderu Watashi wa Dou Surya Ii Desu ka? 2. It will dump all files which are accessed by RioShiina 2.5 engine. If you want to use it to unpack specific files. You need generate a Dump file list. In Garbro repo, you can find how to decrypt file name in War file. Then modified the dumper function. Use CreateThread to create a Thread for dumping files.

Just tried Your code and successfully extracted all 18241 NUKITASHI2 files. (Actually It is 18248 but 7 are duplicated file and no way to extract it separately) There were memory leak? problem and crashing when extracting files too fast. So I changed some of code.

Again Thank you for your code!

Gezine avatar Apr 08 '20 12:04 Gezine

I'm sorry I'm new to programs and code. I would be grateful if anyone could teach me how to use RioShiinaDump.zip.

parasaite avatar Jan 04 '22 18:01 parasaite

Thank jszhtian for the code!

@parasaite FYI, the following is how I use RioShiinaDump.zip

  1. Download GARbro release and use GARbro.GUI.exe to view WAR files in NUKITASHI2's folder
  2. Find the filenames you are interested and save to a text file named "list.txt" (e.g. a text file containing "REI_01M.S25" as its content)
  3. Download Detours source code from its GitHub repo and build it (build the x86 version)
  4. Create a Visual Studio project containing dllmain.cpp(from RioShiinaDump.zip), detours.h(from Detours), and detours.lib(from Detours)
  5. Build dll (x86 version) from the above project
  6. (optional?) Change system to Japanese (control panel=>region=>language to non-unicode program) and ensure NUKITASHI2.EXE can run correctly
  7. (There are different ways to achieve this) Create another VS project and build a console application (x86 version) that uses DetourCreateProcessWithDllEx() to launch NUKITASHI2.EXE and inject the above dll into it
  8. Run the console application, and files listed in "list.txt" will be generated in "dump\"
  9. Use GARbro.GUI.exe to view and extract those files

I also modified some code in dllmain.cpp

  • I don't know why, but I make the ExtractFile thread sleep 10s before calling ExtractFile() the first time, otherwise p_ReadCompFile will fail.
  • Move CreateThread() from newCreateFontA() to NewReadCompFile(), because NewReadCompFile() is called more often

yenting-chen avatar Apr 10 '22 13:04 yenting-chen

I'm stuck with an unfamiliar error. What should I do unknown ?

parasaite avatar May 01 '22 06:05 parasaite

It says detours.h cannot be opened. Seems like those header files are not included correctly. The following is my project setting. You may need to change the path according to your detours library location. 1 2 3

yenting-chen avatar May 01 '22 10:05 yenting-chen

@yenting-chen Thanks for sharing how to use RioShiinaDump.zip. I have not been successful though and would like to ask a few questions.

  • Where should I locate the "list.txt" in step 2?
  • I would like to know more about step 7. I wrote the following code, but I cannot launch NUKITASHI2.EXE.
    #undef UNICODE
    #include <iostream>
    #include <windows.h>
    #include <detours.h>
    #pragma comment(lib, "detours.lib")
    
    int main()
    {
        STARTUPINFO si;
        PROCESS_INFORMATION pi;
    
        ZeroMemory(&si, sizeof(si));
        ZeroMemory(&pi, sizeof(pi));
        si.cb = sizeof(si);
    
        std::cout << "Hello World!\n";
        if (!DetourCreateProcessWithDllEx(
            "C:\\Program Files (x86)\\Qruppo\\抜きゲーみたいな島に住んでる貧乳はどうすりゃいいですか?2\\NUKITASHI2.EXE",
            NULL, NULL, NULL, TRUE,
            CREATE_DEFAULT_ERROR_MODE | CREATE_SUSPENDED,
            NULL, NULL, &si, &pi,
            "C:\\Users\\user\\source\\repos\\Meu\\Release\\Meu.dll", NULL))
            std::cout << "failed\n";
        else
            std::cout << "success\n";
    
        ResumeThread(pi.hThread);
        WaitForSingleObject(pi.hProcess, INFINITE);
    
        CloseHandle(&si);
        CloseHandle(&pi);
    }
    

By the way, I have probably done well up to step 6.

Kyome22 avatar May 14 '22 14:05 Kyome22

@Kyome22

Q: "list.txt" in step 2 Its path is defined in precheck(). It's probably in the working folder of NUKITASHI2.EXE. I changed it to absolute path when I use it.

Q: step 7 Your code is almost the same as mine. Maybe there is some problem in dll? BTW, I built x86 version. I don't know why, but x64 version doesn't work for me.

I will upload my modified version of dllmain.cpp for your reference. modified RioShiinaDump.zip Q: How to use the modified version of RioShiinaDump.zip?

  • There are some absolute paths in dllmain.cpp. You need to change them according to your needs. Search for "tmp.txt", "dump\", "list.txt".
  • Console output (containing some debug log) is redirected to tmp.txt. If you want to see debug log in console directly, comment/uncomment freopen_s in make_console().
  • I added some delay to the thread that reads filenames from "list.txt" and dump files to "dump" folder. So after opening the game, click some button (e.g. EXTRA) and wait for 30s. There should be two dialog windows popping up indicating the thread starts and ends.
  • Besides filenames listed in "list.txt", every resource used by the game is also dumped to "dump" folder. So if you run the game in skip mode, (almost?) all resources will be dumped.

yenting-chen avatar May 15 '22 07:05 yenting-chen

What is the working folder of NUKITASHI2.EXE?

parasaite avatar May 15 '22 08:05 parasaite

@parasaite

What is the working folder of NUKITASHI2.EXE?

It depends on how you run the game and the parameter of DetourCreateProcessWithDllEx(). Please refer to lpCurrentDirectory in https://github.com/microsoft/Detours/wiki/DetourCreateProcessWithDllEx For simplicity, you can just change the path of list.txt to an absolute path (in precheck() in dllmain.cpp).

yenting-chen avatar May 15 '22 11:05 yenting-chen

@yenting-chen Thank you for replying. Thanks to the Zip source you attached, I have a solution! I have got to output all the OGG files I wanted.

Kyome22 avatar May 15 '22 14:05 Kyome22

@yenting-chen I am Japanese and I am not good at English. If possible, I would appreciate it if you could make a video of how to do it.

surumeika3 avatar May 26 '23 10:05 surumeika3