| 1969 | } |
| 1970 | |
| 1971 | static bool __stdcall DEditLoadModule_Hook(const char* pszProjectPath) |
| 1972 | { |
| 1973 | // Load StringEditRuntime.dll |
| 1974 | bool res = DEditLoadModule(pszProjectPath); |
| 1975 | |
| 1976 | // Get and hook 'LoadString' |
| 1977 | DWORD addr = ScanModuleSignature(g_State.GameClient, "8B 4C 24 18 03 C1 8B 0D ?? ?? ?? ?? 03 F7 85 C9", "LoadString", -1, false); |
| 1978 | |
| 1979 | if (addr != 0) |
| 1980 | { |
| 1981 | int StringEditRuntimePtr = MemoryHelper::ReadMemory<int>(addr + 0x8); |
| 1982 | int StringEditRuntime = MemoryHelper::ReadMemory<int>(StringEditRuntimePtr); |
| 1983 | int vTable = MemoryHelper::ReadMemory<int>(StringEditRuntime); |
| 1984 | int pLoadString = MemoryHelper::ReadMemory<int>(vTable + 0x1C); |
| 1985 | |
| 1986 | HookHelper::ApplyHook((void*)pLoadString, &LoadGameString_Hook, (LPVOID*)&LoadGameString); |
| 1987 | } |
| 1988 | |
| 1989 | return res; |
| 1990 | } |
| 1991 | |
| 1992 | // ======================= |
| 1993 | // ConsoleEnabled |
nothing calls this directly
no test coverage detected