1
0
mirror of synced 2024-12-04 03:57:23 +01:00
TaikoArcadeLoader/patches/8.18/dllmain.c

35 lines
1.3 KiB
C
Raw Normal View History

2022-06-21 23:49:26 +02:00
#define BASE_ADDRESS 0x140000000
#include "helpers.h"
i32 __stdcall DllMain (HMODULE mod, DWORD cause, void *ctx) {
2022-06-21 23:49:26 +02:00
if (cause != DLL_PROCESS_ATTACH)
return 1;
2022-06-22 01:53:28 +02:00
void *handle = GetModuleHandle (0);
WRITE_MEMORY (ASLR(0x1400239C0, handle), u8, 0xC3); // Stop error
WRITE_MEMORY (ASLR(0x140314E8D, handle), u8, 0xB0, 0x01); // Unlock songs
WRITE_MEMORY (ASLR(0x140692E17, handle), u8, 0xEB); // Shared audio
WRITE_MEMORY (ASLR(0x140313726, handle), u8, 0x00, 0x7F); // Remove song limit
WRITE_MEMORY (ASLR(0x140517339, handle), u8, 0xBA, 0x00, 0x00, 0x00, 0x00,
2022-06-21 23:49:26 +02:00
0x90); // Disable VSync
// Save settings cross session
2022-06-22 01:53:28 +02:00
WRITE_MEMORY (ASLR(0x140B5C528, handle), u8, "./Setting1.bin");
WRITE_MEMORY (ASLR(0x140B5C538, handle), u8, "./Setting2.bin");
2022-06-22 19:30:36 +02:00
// CabinetOfflineData
WRITE_MEMORY (ASLR(0x140b1b4b0, handle), u8, "./");
WRITE_MEMORY (ASLR(0x14001c941, handle), u8, 0x02);
2022-06-22 01:53:28 +02:00
void *amHandle = GetModuleHandle ("AMFrameWork.dll");
WRITE_MEMORY (amHandle + 0x33EF7, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x3404A, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x34429, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x3457C, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x3497A, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x34ACD, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x148AF, u8, 0xEB);
WRITE_MEMORY (amHandle + 0x14A1A, u8, 0xEB);
2022-06-21 23:49:26 +02:00
return 1;
}