С трудом и потом, я прикрутил защиту фт гвард к моей сборке, ну как прикрутил пару файлов с исходников джанки перекинул и сборочка завелась.
Но теперь проблема lvl 2.
Клиент часть, как ее под епилог подогнать то?
Исходя из всего того что мне сказали надо переделать подключение к движку(адрес)
ADDR 0x203B0B90
Отличие с епилогом есть только в одной функции
?DrawTextTTFToCanvas@UCanvas@@QAEHHHPBGPBVFontDrawInfo@@EHHPBV?$TArray@PAVFontDrawInfoSection@@@@@Z
Без понятия что делать, буду рад любой помощи.
И на затравочку чтобы вам унывать, а немного посмеяться.
Но теперь проблема lvl 2.
Клиент часть, как ее под епилог подогнать то?
Исходя из всего того что мне сказали надо переделать подключение к движку(адрес)
ADDR 0x203B0B90
unsigned int GetSendPacketAddress(void)
{
HMODULE hEngine = LoadLibraryA("engine.dll");
unsigned int startVMT = (unsigned int) hEngine + 0x51F658;
unsigned int AddNetworkQueue = (unsigned int) GetProcAddress(hEngine, "?AddNetworkQueue@UNetworkHandler@@UAEHPAUNetworkPacket@@@Z");
unsigned int currVMT = startVMT;
if (AddNetworkQueue == 0)
return 0;
while (true)
{
if (*(unsigned int*) currVMT == AddNetworkQueue)
return *(unsigned int*) (currVMT - 0xA4);
currVMT++;
if (currVMT - startVMT > 10000)
return 0;
}
return 0;
}
bool SetHooks(void)
{
FARPROC addr;
HMODULE hEngine = LoadLibraryA("engine.dll"), hNtDlll = LoadLibraryA("ntdll.dll");
MODULEINFO modinfo;
GetModuleInformation(GetCurrentProcess(), hEngine, &modinfo, sizeof(MODULEINFO));
hEngineStart = (unsigned int) hEngine;
hEngineEnd = hEngineStart + modinfo.SizeOfImage - 1;
GetModuleInformation(GetCurrentProcess(), hNtDlll, &modinfo, sizeof(MODULEINFO));
hNtDllStart = (unsigned int) hNtDlll;
hNtDllEnd = hNtDllStart + modinfo.SizeOfImage - 1;
if ((KiUserExceptDispADR = (unsigned int) GetProcAddress(LoadLibraryA("ntdll.dll"), "KiUserExceptionDispatcher")) == 0)
return false;
if (*(unsigned char*) (KiUserExceptDispADR) == 0xFC)
KiUserExceptDispADR++;
if ((addr = GetProcAddress(LoadLibraryA("ws2_32.dll"), "connect")) == 0)
return false;
true_connect = (_connect) splice((unsigned char*) addr, new_connect);
if ((addr = GetProcAddress(hEngine, "?AddNetworkQueue@UNetworkHandler@@UAEHPAUNetworkPacket@@@Z")) == 0)
return false;
true_AddNetworkQueue = (_AddNetworkQueue) splice((unsigned char*) addr, new_AddNetworkQueue);
if ((addr = (FARPROC) GetSendPacketAddress()) == 0)
return false;
true_SendPacket = (_SendPacket) splice((unsigned char*) addr, new_SendPacket);
if ((addr = GetProcAddress(hEngine, "?MasterProcessPreRender@UInteractionMaster@@QAEXPAVUCanvas@@@Z")) == 0)
return false;
true_MasterProcessPreRender = (_MasterProcessPreRender) splice((unsigned char*) addr, new_MasterProcessPreRender);
if ((addr = GetProcAddress(hEngine, "?DrawTextTTFToCanvas@UCanvas@@QAEHHHPB_WPBVFontDrawInfo@@EHHPBV?$TArray@PAVFontDrawInfoSection@@@@@Z")) == 0)
return false;
true_DrawTextTTFToCanvas = (_DrawTextTTFToCanvas) addr;
if ((addr = GetProcAddress(hEngine, "?Render@FPlayerSceneNode@@UAEXPAVFRenderInterface@@@Z")) == 0)
return false;
true_Render = (_Render) splice((unsigned char*) addr, new_Render);
return true;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
}
bool LoadTrayIcon(HINSTANCE hInst, unsigned int ID)
{
ghMutex = CreateMutexA(0, false, "First Guard");
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
CloseHandle(ghMutex);
return true;
}
WNDCLASSEXA wcx;
NOTIFYICONDATAA niData;
memset(&wcx, 0, sizeof(WNDCLASSEXA));
wcx.cbSize = sizeof(wcx);
wcx.lpfnWndProc = WndProc;
wcx.hInstance = hInst;
wcx.lpszClassName = "tray_icon";
if ((RegisterClassExA(&wcx) == 0) && (GetLastError() != ERROR_CLASS_ALREADY_EXISTS))
return false;
if ((hWND = CreateWindowExA(0, "tray_icon", 0, 0, 0, 0, 0, 0, 0, 0, hInst, 0)) == 0)
return false;
memset(&niData, 0, sizeof(NOTIFYICONDATAA));
niData.cbSize = sizeof(NOTIFYICONDATAA);
niData.uID = ID;
niData.uFlags = NIF_ICON | NIF_TIP;
niData.hWnd = hWND;
strcpy_s(niData.szTip, "First Guard");
niData.hIcon = (HICON) LoadImageA(hInst, MAKEINTRESOURCEA(IDI_TRAYICON), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
if (!Shell_NotifyIconA(NIM_ADD, &niData))
return false;
return true;
}
{
HMODULE hEngine = LoadLibraryA("engine.dll");
unsigned int startVMT = (unsigned int) hEngine + 0x51F658;
unsigned int AddNetworkQueue = (unsigned int) GetProcAddress(hEngine, "?AddNetworkQueue@UNetworkHandler@@UAEHPAUNetworkPacket@@@Z");
unsigned int currVMT = startVMT;
if (AddNetworkQueue == 0)
return 0;
while (true)
{
if (*(unsigned int*) currVMT == AddNetworkQueue)
return *(unsigned int*) (currVMT - 0xA4);
currVMT++;
if (currVMT - startVMT > 10000)
return 0;
}
return 0;
}
bool SetHooks(void)
{
FARPROC addr;
HMODULE hEngine = LoadLibraryA("engine.dll"), hNtDlll = LoadLibraryA("ntdll.dll");
MODULEINFO modinfo;
GetModuleInformation(GetCurrentProcess(), hEngine, &modinfo, sizeof(MODULEINFO));
hEngineStart = (unsigned int) hEngine;
hEngineEnd = hEngineStart + modinfo.SizeOfImage - 1;
GetModuleInformation(GetCurrentProcess(), hNtDlll, &modinfo, sizeof(MODULEINFO));
hNtDllStart = (unsigned int) hNtDlll;
hNtDllEnd = hNtDllStart + modinfo.SizeOfImage - 1;
if ((KiUserExceptDispADR = (unsigned int) GetProcAddress(LoadLibraryA("ntdll.dll"), "KiUserExceptionDispatcher")) == 0)
return false;
if (*(unsigned char*) (KiUserExceptDispADR) == 0xFC)
KiUserExceptDispADR++;
if ((addr = GetProcAddress(LoadLibraryA("ws2_32.dll"), "connect")) == 0)
return false;
true_connect = (_connect) splice((unsigned char*) addr, new_connect);
if ((addr = GetProcAddress(hEngine, "?AddNetworkQueue@UNetworkHandler@@UAEHPAUNetworkPacket@@@Z")) == 0)
return false;
true_AddNetworkQueue = (_AddNetworkQueue) splice((unsigned char*) addr, new_AddNetworkQueue);
if ((addr = (FARPROC) GetSendPacketAddress()) == 0)
return false;
true_SendPacket = (_SendPacket) splice((unsigned char*) addr, new_SendPacket);
if ((addr = GetProcAddress(hEngine, "?MasterProcessPreRender@UInteractionMaster@@QAEXPAVUCanvas@@@Z")) == 0)
return false;
true_MasterProcessPreRender = (_MasterProcessPreRender) splice((unsigned char*) addr, new_MasterProcessPreRender);
if ((addr = GetProcAddress(hEngine, "?DrawTextTTFToCanvas@UCanvas@@QAEHHHPB_WPBVFontDrawInfo@@EHHPBV?$TArray@PAVFontDrawInfoSection@@@@@Z")) == 0)
return false;
true_DrawTextTTFToCanvas = (_DrawTextTTFToCanvas) addr;
if ((addr = GetProcAddress(hEngine, "?Render@FPlayerSceneNode@@UAEXPAVFRenderInterface@@@Z")) == 0)
return false;
true_Render = (_Render) splice((unsigned char*) addr, new_Render);
return true;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
return DefWindowProcW(hWnd, uMsg, wParam, lParam);
}
bool LoadTrayIcon(HINSTANCE hInst, unsigned int ID)
{
ghMutex = CreateMutexA(0, false, "First Guard");
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
CloseHandle(ghMutex);
return true;
}
WNDCLASSEXA wcx;
NOTIFYICONDATAA niData;
memset(&wcx, 0, sizeof(WNDCLASSEXA));
wcx.cbSize = sizeof(wcx);
wcx.lpfnWndProc = WndProc;
wcx.hInstance = hInst;
wcx.lpszClassName = "tray_icon";
if ((RegisterClassExA(&wcx) == 0) && (GetLastError() != ERROR_CLASS_ALREADY_EXISTS))
return false;
if ((hWND = CreateWindowExA(0, "tray_icon", 0, 0, 0, 0, 0, 0, 0, 0, hInst, 0)) == 0)
return false;
memset(&niData, 0, sizeof(NOTIFYICONDATAA));
niData.cbSize = sizeof(NOTIFYICONDATAA);
niData.uID = ID;
niData.uFlags = NIF_ICON | NIF_TIP;
niData.hWnd = hWND;
strcpy_s(niData.szTip, "First Guard");
niData.hIcon = (HICON) LoadImageA(hInst, MAKEINTRESOURCEA(IDI_TRAYICON), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTCOLOR);
if (!Shell_NotifyIconA(NIM_ADD, &niData))
return false;
return true;
}
?DrawTextTTFToCanvas@UCanvas@@QAEHHHPBGPBVFontDrawInfo@@EHHPBV?$TArray@PAVFontDrawInfoSection@@@@@Z
Без понятия что делать, буду рад любой помощи.
И на затравочку чтобы вам унывать, а немного посмеяться.
Последнее редактирование модератором: