diff --git a/game_payload/blob/core.o b/game_payload/blob/core.o index 83124ed..48cfc88 100644 Binary files a/game_payload/blob/core.o and b/game_payload/blob/core.o differ diff --git a/game_payload/include/core.h b/game_payload/include/core.h index d0d868b..46e33c7 100644 --- a/game_payload/include/core.h +++ b/game_payload/include/core.h @@ -4,6 +4,6 @@ #include -void core_setup_patcher(struct game_data *game, HMODULE baseModule); +void core_setup_patcher(struct game_data *game, HMODULE baseModule, wchar_t *txFile); void *core_perform_tx(size_t *outLength); diff --git a/game_payload/src/main.c b/game_payload/src/main.c index 718e7a4..c0d6d79 100644 --- a/game_payload/src/main.c +++ b/game_payload/src/main.c @@ -38,7 +38,7 @@ void request_restart() { CloseHandle(hRestartFlag); } -static void _run_game(struct game_data *game) { +static void _run_game(struct game_data *game, wchar_t *txFile) { // Create fake ACE driver files ace_fake_driver_files(); @@ -47,14 +47,14 @@ static void _run_game(struct game_data *game) { ace_load_driver_module(); // ...magic - core_setup_patcher(game, baseModule); + core_setup_patcher(game, baseModule, txFile); // Load the UnityPlayer module and invoke the callback HMODULE unityModule = LoadLibraryA("UnityPlayer.dll"); INVOKE_CALLBACK(game->unityplayer_callback, unityModule); } -static void _run_tx(struct game_data *game, wchar_t *tableFile) { +static void _run_tx(struct game_data *game, wchar_t *txFile) { // Load unpatched base module HMODULE baseModule = LoadLibraryA(game->base_module_name); if (!baseModule) { @@ -66,8 +66,8 @@ static void _run_tx(struct game_data *game, wchar_t *tableFile) { void *table = core_perform_tx(&tableSize); // Save to file - utils_create_dir_recursively(tableFile); - utils_save_to_file(tableFile, table, tableSize); + utils_create_dir_recursively(txFile); + utils_save_to_file(txFile, table, tableSize); // Cleanup free(table); @@ -93,13 +93,13 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { game_detect(&game); // Get required table file path - wchar_t tableFile[MAX_PATH]; - tx_table_file(&game, tableFile); + wchar_t txFile[MAX_PATH]; + tx_table_file(&game, txFile); - if (utils_path_exists(tableFile)) { - _run_game(&game); + if (utils_path_exists(txFile)) { + _run_game(&game, txFile); } else { - _run_tx(&game, tableFile); + _run_tx(&game, txFile); } return TRUE;