duki Posted August 10 Posted August 10 (edited) Used this for few years as loader. Rename og Chat.dll to OChat.dll #include <map> std::map<std::string, FARPROC> ogFuncs; HMODULE hOGDLL = NULL; //this was just one of the modules that i did proxied FARPROC gOGFunc(const char* funcName) { if (!ogFuncs[funcName]) { ogFuncs[funcName] = GetProcAddress(hOGDLL, funcName); } return ogFuncs[funcName]; } extern "C" { typedef void* (*ChaterInfoMgrQueryFunc)(); typedef int(__cdecl* ChatInfoManagerDestroyFunc)(int, int); __declspec(dllexport) void* ChaterInfoMgrQuery() { ChaterInfoMgrQueryFunc original = (ChaterInfoMgrQueryFunc)gOGFunc("ChaterInfoMgrQuery"); return original ? original() : nullptr; } __declspec(dllexport) int __cdecl ChatInfoManagerDestroy(int a1, int a2) { ChatInfoManagerDestroyFunc original = (ChatInfoManagerDestroyFunc)gOGFunc("ChatInfoManagerDestroy"); return original ? original(a1, a2) : 0; } } void Hook() { //your stuff here :) } BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: hOGDLL = LoadLibrary("OChat.dll"); CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)Hook, NULL, 0, NULL); break; case DLL_PROCESS_DETACH: if (hOGDLL) FreeLibrary(hOGDLL); break; } return TRUE; } This is just for chat.dll, you can replace almost any module of the game by doing proxy. Edited August 12 by duki . Quote
Spirited Posted August 10 Posted August 10 I'm not familiar with what chat.dll does! What's the advantage of detouring these functions? Quote
duki Posted August 10 Author Posted August 10 1 hour ago, Spirited said: I'm not familiar with what chat.dll does! What's the advantage of detouring these functions? This is just a proxy to load your own module into the game without modifying or injecting a DLL into the client, while maintaining the chat functionality (Chat.dll manages private message window creation) Quote
kennylovecode Posted August 13 Posted August 13 On 8/11/2025 at 3:17 AM, Spirited said: I'm not familiar with what chat.dll does! What's the advantage of detouring these functions? 我不熟悉 chat.dll 的作用!绕过这些函数有什么优势? For example, you can customize your chat room UI, such as adding some fun features to chat messages and implementing them through custom packaging. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.