From 3e836e5dd95f881ca388e9d9e91087e90fb883e1 Mon Sep 17 00:00:00 2001 From: BroGamer <64546358+BroGamer4256@users.noreply.github.com> Date: Fri, 23 Sep 2022 02:16:11 +1200 Subject: [PATCH] Force TLS v1.2 --- patches/8.18/dllmain.c | 4 ++++ src/boilerplate.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/patches/8.18/dllmain.c b/patches/8.18/dllmain.c index 9009d5e..5c31e4e 100644 --- a/patches/8.18/dllmain.c +++ b/patches/8.18/dllmain.c @@ -18,6 +18,7 @@ PreInit () { if (readConfigBool (config, "shared_audio", true)) WRITE_MEMORY (ASLR (0x140692E17, handle), u8, 0xEB); // Shared audio // Remove song limit WRITE_MEMORY (ASLR (0x140313726, handle), u8, 0x28, 0x23); + /* Unfinished network stuff WRITE_MEMORY (ASLR (0x1402F39E6, handle), u8, 0x28, 0x23); WRITE_MEMORY (ASLR (0x1402F3AB0, handle), u8, 0x28, 0x23); WRITE_MEMORY (ASLR (0x1402F3BE4, handle), u8, 0x28, 0x23); @@ -34,6 +35,7 @@ PreInit () { WRITE_MEMORY (ASLR (0x140313CF4, handle), u8, 0x28, 0x23); WRITE_MEMORY (ASLR (0x1403140C4, handle), u8, 0x28, 0x23); WRITE_MEMORY (ASLR (0x1403147AA, handle), u8, 0x28, 0x23); + */ if (!readConfigBool (config, "vsync", false)) WRITE_MEMORY (ASLR (0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x90); // Disable VSync // Save settings cross session without F:/ and G:/ drive WRITE_MEMORY (ASLR (0x140B5C528, handle), u8, "./Setting1.bin"); @@ -41,6 +43,8 @@ PreInit () { // Move F:/ files to current directory WRITE_MEMORY (ASLR (0x140B1B4B0, handle), u8, "./"); WRITE_MEMORY (ASLR (0x14001C941, handle), u8, 0x02); + // Patch TLS v1.0 to v1.2 + WRITE_MEMORY (ASLR (0x14044b1a9, handle), u8, 0x10); // Move various files to current directory void *amHandle = GetModuleHandle ("AMFrameWork.dll"); diff --git a/src/boilerplate.c b/src/boilerplate.c index c40991d..1d01d52 100644 --- a/src/boilerplate.c +++ b/src/boilerplate.c @@ -79,6 +79,8 @@ HOOK_DYNAMIC (i32, __stdcall, bngrw_ReqSendUrl) { return 1; } HOOK_DYNAMIC (u64, __stdcall, bngrw_ReqSetLedPower) { return 0; } HOOK_DYNAMIC (i32, __stdcall, bngrw_reqCancel) { return 1; } +HOOK_DYNAMIC (i32, __stdcall, ssleay_Shutdown) { return 1; } + void init_boilerplate () { INSTALL_HOOK_DYNAMIC (ShowMouse, PROC_ADDRESS ("user32.dll", "ShowCursor")); @@ -110,4 +112,6 @@ init_boilerplate () { INSTALL_HOOK_DYNAMIC (bngrw_ReqSendUrl, PROC_ADDRESS ("bngrw.dll", "BngRwReqSendUrlTo")); INSTALL_HOOK_DYNAMIC (bngrw_ReqSetLedPower, PROC_ADDRESS ("bngrw.dll", "BngRwReqSetLedPower")); INSTALL_HOOK_DYNAMIC (bngrw_reqCancel, PROC_ADDRESS ("bngrw.dll", "BngRwReqCancel")); -} \ No newline at end of file + + INSTALL_HOOK_DYNAMIC (ssleay_Shutdown, PROC_ADDRESS ("ssleay32.dll", "SSL_shutdown")); +}