// Enter SystemDllMain.h and change the game title ID before making any other edits! DWORD Initialize( void ) { //if (CreateSymbolicLink("hdd1:", CONTENT_PARTITION_PATH, true) != S_OK) // return S_FALSE; //Create our new thread to wait on halo for. DWORD threadId; ExCreateThread(&ModuleHandle, 0, &threadId, (VOID*)GameCheck, (LPTHREAD_START_ROUTINE)GameCheck, NULL, 0x02); return S_OK; }
BOOL APIENTRY DllMain( HANDLE hModule, DWORD dwReason, LPVOID lpReserved ) { if ( dwReason == DLL_PROCESS_ATTACH ) { HANDLE hThread; DWORD dwThreadId; ExCreateThread( &hThread, 0, &dwThreadId, ( PVOID )XapiThreadStartup , ( LPTHREAD_START_ROUTINE )MainThread, 0, 0x2 ); ResumeThread( hThread ); CloseHandle( hThread ); } return TRUE; }
DWORD HUD_BootToDashHelper_Hook(DWORD* _XUIOBJ, _XDASHLAUNCHDATA* LaunchData, DWORD* cstr, DWORD* r6, DWORD* r7) { //if pressing family settings button if (LaunchData->dwCommand == (DWORD)HUDelems.LaunchData_FamilySettings) { HANDLE hThread; DWORD threadId; ExCreateThread(&hThread, 0, &threadId, (VOID*)XapiThreadStartup, (LPTHREAD_START_ROUTINE)HUD_go, NULL, 0x2 | CREATE_SUSPENDED); XSetThreadProcessor(hThread, 4); SetThreadPriority(hThread, THREAD_PRIORITY_ABOVE_NORMAL); ResumeThread(hThread); DbgPrint("Opened HUD.xex"); return true; } else { return ((HUD_BOOTTODASHHELPER)HUDelems.BootToDashHelper_Func)(_XUIOBJ, LaunchData, cstr, r6, r7); } }
//------------------------------------------------------------------------------------- // Name: main() // Desc: The application's entry point //------------------------------------------------------------------------------------- void __cdecl main() { // Create a system thread to launch our "system plugin" HANDLE hThread; DWORD threadId; ExCreateThread(&hThread, 0, &threadId, (VOID*)XapiThreadStartup, (LPTHREAD_START_ROUTINE)StartSystemDll, NULL, 0x2); // Set the thread processor and priority, otherwise it will start on its own XSetThreadProcessor(hThread, 4); SetThreadPriority(hThread, THREAD_PRIORITY_TIME_CRITICAL); ResumeThread(hThread); // Just loop until the dll has been loaded while (DllResult == -1) { Sleep(0); } // The dll has loaded, now launch the game executable XLaunchNewImage((CHAR*)&GameXexPath, NULL); }
bool System::start() { be_ptr32_t<Thread> thread; // Initialize kernel initKernel(); // Create main thread ExCreateThread(reinterpret_cast<be_uint32_t*>(&thread), mBinary.header.defaultStackSize.size, nullptr, nullptr, reinterpret_cast<void*>(mBinary.header.entryPoint.address), nullptr, 0); // Swap pointer back to little endian memory... thread->join(); return true; }