MemoryFunctions.h
1 2 |
#include <windows.h> #include <iostream> |
Gerekli olan bağdaştırıcılar
1 2 3 4 5 6 7 |
#define CopyBytes(Dest, Src) memcpy(Dest, (BYTE *)&Src, sizeof(Src)) DWORD GAME_CHRPTR = 0x00C27C50; DWORD GAME_PKTPTR = 0x00C27F10; DWORD GAME_SNDPTR = 0x00C1D368; DWORD GAME_SNDFNC; WORD GAME_CHARID = 0x5C4; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#pragma region MEMORYFUNCTİONS DWORD RDWORD(DWORD ulBase) { if (!IsBadReadPtr((VOID *)ulBase, sizeof(DWORD))) { return (*(DWORD *)(ulBase)); } return 0; } float Rfloat(DWORD ulBase) { if (!IsBadReadPtr((VOID *)ulBase, sizeof(DWORD))) { return (*(float *)(ulBase)); } return 0; } WORD RWORD(DWORD ulBase) { if (!IsBadReadPtr((VOID *)ulBase, sizeof(DWORD))) { return (*(WORD *)(ulBase)); } return 0; } BYTE RBYTE(DWORD ulBase) { if (!IsBadReadPtr((VOID *)ulBase, sizeof(DWORD))) { return (*(BYTE *)(ulBase)); } return 0; } #pragma endregion |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
void SendFunction() { switch ((*(BYTE *)(GAME_SNDPTR))) { case 22: __asm mov GAME_SNDFNC, 0 break; case 23: __asm mov GAME_SNDFNC, 1 break; case 20: __asm mov GAME_SNDFNC, 2 break; case 21: __asm mov GAME_SNDFNC, 3 break; case 18: __asm mov GAME_SNDFNC, 4 break; case 19: __asm mov GAME_SNDFNC, 5 break; case 16: __asm mov GAME_SNDFNC, 6 break; case 17: __asm mov GAME_SNDFNC, 7 break; case 30: __asm mov GAME_SNDFNC, 8 break; case 31: __asm mov GAME_SNDFNC, 9 break; } } void SendPacketz(BYTE *packets, size_t sizes) { __asm { mov ecx, GAME_PKTPTR mov ecx, dword ptr ds:[ecx] mov eax, GAME_SNDFNC push sizes push packets call [eax*4+ecx+40064h] } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
void isMinorHealling() { SendFunction(); while (1) { if (GetAsyncKeyState(VK_END)) { DWORD ADDR_CHRB = RDWORD(GAME_CHRPTR); WORD MEID = RWORD(ADDR_CHRB + GAME_CHARID); DWORD SkillID = 108705; BYTE packet[] = {0x31, 0x03, 0x73, 0x8E, 0x01, 0, 0, 0, 0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; CopyBytes(packet + 2, SkillID); CopyBytes(packet + 6, MEID); CopyBytes(packet + 8, MEID); SendPacketz(packet, sizeof(packet)); // puts("Sent."); } Sleep(500); } } |
dllmain.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#include "MemoryFunctions.h" extern void isMinorHealling(); DWORD ThreadID; BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: CreateThread(0, 0, (LPTHREAD_START_ROUTINE)&isMinorHealling, 0, 0, &ThreadID); case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } |