Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d742b2a15 | |||
| cf5d87f7a7 | |||
| 181d14e4ce | |||
| 0067ceb85c | |||
| 33cf0a65e8 | |||
| d30a2aba9e |
@ -1,5 +1,5 @@
|
||||
### Games and regions
|
||||
- **3rd**: glb v6.6.0
|
||||
- **3rd**: glb v6.7.0
|
||||
- **SR**: os/cn v1.1.0 (unsafe, refer to [configuration](#configuration))
|
||||
|
||||
It may be possilbe to completely remove the region and version-specific data in the future. Refer to the source code in `game_payload/src` for details.
|
||||
@ -14,7 +14,7 @@ The anticheat the games use is fundamentally incompatible with Wine in multiple
|
||||
**This is not a cheating tool**. Using it with Windows is not possible, and Windows support is not planned or intended in any way. However, as it does not perform any on-disk file modifications, you may reuse the same game install for Windows if you have a dual-boot setup.
|
||||
|
||||
### Usage
|
||||
**Refer to [third-party launchers](#third-party-launchers) (will be written later)** for convenient usage. If you don't want to (or can't) use third-party launchers, continue reading the section below.
|
||||
**Refer to [third-party launchers](#third-party-launchers)** for convenient usage. If you don't want to (or can't) use third-party launchers, continue reading the section below.
|
||||
|
||||
**Wine 8.0+ is recommended**, as lower versions leak "The Wine project" as the device identifier. Not critical, but taking a precaution never hurt anyone. **DXVK is strongly recommended.**
|
||||
|
||||
@ -55,7 +55,8 @@ A part of the source code is witheld (`game_payload/src/tp6.c`). This is a force
|
||||
Please do not report any issues with the Game to the official channels. Use the issue tracker of this repository
|
||||
|
||||
### Third-party launchers
|
||||
Will be written later
|
||||
- Honkers Launcher — Linux launcher for 3rd ([GitHub](https://github.com/an-anime-team/honkers-launcher) | [Codeberg](https://codeberg.org/an-anime-team/honkers-launcher))
|
||||
- The Honkers Railway Launcher — Linux launcher for SR ([GitHub](https://github.com/an-anime-team/the-honkers-railway-launcher) | [Codeberg](https://codeberg.org/an-anime-team/the-honkers-railway-launcher))
|
||||
|
||||
### Credits
|
||||
- mkrsym1 — project leader, reverse engineering
|
||||
|
||||
@ -17,7 +17,7 @@ const struct crc_id_pair HI3_REGIONS[] = {
|
||||
// Only glb for now
|
||||
// It may be possible to get rid of region-specific data altogether in the future
|
||||
|
||||
{ 0x45221647, GAME_HI3_GLB } // glb v6.6.0
|
||||
{ 0x45221647, GAME_HI3_GLB } // glb v6.7.0
|
||||
};
|
||||
|
||||
void hi3_fill_data(struct game_data *buf) {
|
||||
|
||||
@ -5,6 +5,10 @@
|
||||
|
||||
#include <game_p.h>
|
||||
|
||||
typedef char *(*wgufn_t)(wchar_t* path); // wine_get_unix_file_name
|
||||
|
||||
const char *J_MB_TITLE = "Jadeite Launcher Payload";
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||
// Only listen for attach
|
||||
if (reason != DLL_PROCESS_ATTACH) {
|
||||
@ -25,6 +29,38 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||
strcpy(workdir, targetExe);
|
||||
*(strrchr(workdir, '\\')) = '\0';
|
||||
|
||||
// SAFETY: verify that the injector is not inside the game directory
|
||||
HMODULE kernel32 = GetModuleHandleA("kernel32.dll");
|
||||
wgufn_t wine_get_unix_file_name = (wgufn_t)GetProcAddress(kernel32, "wine_get_unix_file_name");
|
||||
|
||||
if (wine_get_unix_file_name) {
|
||||
wchar_t wInjectDll[MAX_PATH], wWorkdir[MAX_PATH];
|
||||
MultiByteToWideChar(CP_UTF8, 0, injectDll, strlen(injectDll) + 1, wInjectDll, MAX_PATH);
|
||||
MultiByteToWideChar(CP_UTF8, 0, workdir, strlen(workdir) + 1, wWorkdir, MAX_PATH);
|
||||
|
||||
char *unixInjectDll = wine_get_unix_file_name(wInjectDll);
|
||||
char *unixWorkdir = wine_get_unix_file_name(wWorkdir);
|
||||
|
||||
char startsWith = 0;
|
||||
while (*unixInjectDll != '\0' && *unixWorkdir != '\0') {
|
||||
startsWith = *unixInjectDll == *unixWorkdir;
|
||||
if (!startsWith) break;
|
||||
|
||||
unixInjectDll++, unixWorkdir++;
|
||||
}
|
||||
|
||||
HANDLE heap = GetProcessHeap();
|
||||
HeapFree(heap, 0, unixInjectDll);
|
||||
HeapFree(heap, 0, unixWorkdir);
|
||||
|
||||
if (startsWith) {
|
||||
MessageBoxA(NULL, "Putting the patcher (or any other foreign PE binaries) inside the game directory is dangerous! Please move it elsewhere.", J_MB_TITLE, MB_OK | MB_ICONERROR);
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
MessageBoxA(NULL, "Could not find wine_get_unix_file_name! Wine version too old?", J_MB_TITLE, MB_OK | MB_ICONWARNING);
|
||||
}
|
||||
|
||||
// Start the game
|
||||
STARTUPINFO si;
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
@ -47,7 +83,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||
)) {
|
||||
char message[64];
|
||||
sprintf(message, "Failed to start game process: %ld", GetLastError());
|
||||
MessageBoxA(NULL, message, "Jadeite Launcher Payload", MB_OK | MB_ICONERROR);
|
||||
MessageBoxA(NULL, message, J_MB_TITLE, MB_OK | MB_ICONERROR);
|
||||
|
||||
exit(1);
|
||||
}
|
||||
@ -62,7 +98,7 @@ BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||
if (waitEnabled && strcmp(waitEnabled, "") != 0) {
|
||||
char message[64];
|
||||
sprintf(message, "PID: %ld. Press OK to continue", pi.dwProcessId);
|
||||
MessageBoxA(NULL, message, "Jadeite Launcher Payload", MB_OK | MB_ICONINFORMATION);
|
||||
MessageBoxA(NULL, message, J_MB_TITLE, MB_OK | MB_ICONINFORMATION);
|
||||
}
|
||||
|
||||
// Resume the process
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
project('jadeite', 'c', version: '1.1.5')
|
||||
project('jadeite', 'c', version: '1.1.6')
|
||||
|
||||
nasm = find_program('nasm')
|
||||
gen_res = find_program('gen_resources.sh')
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"jadeite": {
|
||||
"version": "1.1.5"
|
||||
"version": "1.1.6"
|
||||
},
|
||||
"games": {
|
||||
"hi3rd": {
|
||||
|
||||
Reference in New Issue
Block a user