#include "backend/backend.hpp" #include "byte_patch_manager.hpp" #include "common.hpp" #include "core/globals.hpp" #include "fiber_pool.hpp" #include "gui.hpp" #include "hooking.hpp" #include "logger/exception_handler.hpp" #include "native_hooks/native_hooks.hpp" #include "pointers.hpp" #include "renderer.hpp" #include "script_mgr.hpp" #include "services/api/api_service.hpp" #include "services/context_menu/context_menu_service.hpp" #include "services/custom_text/custom_text_service.hpp" #include "services/globals/globals_service.hpp" #include "services/gta_data/gta_data_service.hpp" #include "services/gui/gui_service.hpp" #include "services/hotkey/hotkey_service.hpp" #include "services/matchmaking/matchmaking_service.hpp" #include "services/mobile/mobile_service.hpp" #include "services/model_preview/model_preview_service.hpp" #include "services/notifications/notification_service.hpp" #include "services/orbital_drone/orbital_drone.hpp" #include "services/pickups/pickup_service.hpp" #include "services/player_database/player_database_service.hpp" #include "services/players/player_service.hpp" #include "services/script_patcher/script_patcher_service.hpp" #include "services/vehicle/handling_service.hpp" #include "services/vehicle/vehicle_control_service.hpp" #include "thread_pool.hpp" #include "version.hpp" BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) { using namespace big; if (reason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls(hmod); g_hmodule = hmod; g_main_thread = CreateThread( nullptr, 0, [](PVOID) -> DWORD { auto handler = exception_handler(); while (!FindWindow("grcWindow", nullptr)) std::this_thread::sleep_for(100ms); std::filesystem::path base_dir = std::getenv("appdata"); base_dir /= "BigBaseV2"; auto file_manager_instance = std::make_unique(base_dir); auto logger_instance = std::make_unique("YimMenu", file_manager_instance->get_project_file("./cout.log")); EnableMenuItem(GetSystemMenu(GetConsoleWindow(), 0), SC_CLOSE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); std::srand(std::chrono::system_clock::now().time_since_epoch().count()); try { LOG(INFO) << "Yim's Menu Initializing"; LOGF(INFO, "Git Info\n\tBranch:\t{}\n\tHash:\t{}\n\tDate:\t{}", version::GIT_BRANCH, version::GIT_SHA1, version::GIT_DATE); g_translation_service.init(); LOG(INFO) << "Translation Service initialized."; auto thread_pool_instance = std::make_unique(); LOG(INFO) << "Thread pool initialized."; g.init(file_manager_instance->get_project_file("./settings.json")); LOG(INFO) << "Settings Loaded."; auto pointers_instance = std::make_unique(); LOG(INFO) << "Pointers initialized."; auto byte_patch_manager_instance = std::make_unique(); LOG(INFO) << "Byte Patch Manager initialized."; auto renderer_instance = std::make_unique(); LOG(INFO) << "Renderer initialized."; auto gui_instance = std::make_unique(); auto fiber_pool_instance = std::make_unique(11); LOG(INFO) << "Fiber pool initialized."; auto hooking_instance = std::make_unique(); LOG(INFO) << "Hooking initialized."; auto context_menu_service_instance = std::make_unique(); auto custom_text_service_instance = std::make_unique(); auto globals_service_instace = std::make_unique(); auto mobile_service_instance = std::make_unique(); auto notification_service_instance = std::make_unique(); auto pickup_service_instance = std::make_unique(); auto player_service_instance = std::make_unique(); auto gta_data_service_instance = std::make_unique(); auto model_preview_service_instance = std::make_unique(); auto handling_service_instance = std::make_unique(); auto gui_service_instance = std::make_unique(); auto script_patcher_service_instance = std::make_unique(); auto player_database_service_instance = std::make_unique(); auto hotkey_service_instance = std::make_unique(); auto matchmaking_service_instance = std::make_unique(); auto api_service_instance = std::make_unique(); LOG(INFO) << "Registered service instances..."; g_script_mgr.add_script(std::make_unique