Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // dllmain.cpp : Defines the entry point for the DLL application.
- #include "stdafx.h"
- #include <iPowerMemory.h>
- #define OFFSET_MOUSEX 0x1d7e06
- #define OFFSET_MOUSEY 0x1d7e0c
- DWORD ecxHooked = NULL;
- DWORD Offset = NULL;
- DWORD Offset2 = NULL;
- DWORD jumpBack = NULL;
- DWORD mouseX = NULL;
- DWORD jumpBack2 = NULL;
- DWORD mouseY = NULL;
- DWORD jumpBack3 = NULL;
- DWORD jumpBack4 = NULL;
- DWORD esiHooked = NULL;
- void _declspec(naked) Hook()
- {
- _asm
- {
- mov ecxHooked, ecx
- jmp jumpBack
- }
- }
- void _declspec(naked) Hook2()
- {
- _asm
- {
- mov mouseX, edx
- jmp jumpBack2
- }
- }
- void _declspec(naked) Hook3()
- {
- _asm
- {
- mov mouseY, eax
- jmp jumpBack3
- }
- }
- void _declspec(naked) Hook4()
- {
- _asm
- {
- mov esiHooked, esi
- jmp jumpBack4
- }
- }
- DWORD APIENTRY MainThread(LPVOID lparam)
- {
- bool Hooked = false;
- iPowerMemClass ipowerHack;
- DWORD AddressQuadradoX = NULL;
- DWORD AddressQuadradoY = NULL;
- void* AddressToHook = ipowerHack.AOB_Scan(0x2000000, 0xFFFFFFF, "\x85\x00\x0f\x84\x00\x00\x00\x00\x8b\x00\x00\x89\x00\x00\x8d\x00\x00\x00\x00\x00\x89\x00\x00\x8d\x00\x00\x8b\x00\x00\xe8\x00\x00\x00\x00\x8b\x00\x8b\x00\x00\x8b\x00\x00\x85\x00\x0f\x84\x00\x00\x00\x00\x8b\x00\x00\x66\x0f", "x?xx????x??x??x?????x??x??x??x????x?x??x??x?xx????x??xx");
- DWORD AddressToHook2 = (DWORD)GetModuleHandle("Adobe AIR.dll") + OFFSET_MOUSEX;
- DWORD AddressToHook3 = (DWORD)GetModuleHandle("Adobe AIR.dll") + OFFSET_MOUSEY;
- void* AddressToHook4 = ipowerHack.AOB_Scan(0x2000000, 0xFFFFFFF, "\x74\x00\x8b\x00\x00\x85\x00\x74\x00\x8b\x00\x00\x8b\x00\x00\x66\x0f\x00\x00\xf2\x0f\x00\x00\x8b\x00\x00\x66\x0f\x00\x00\xf2\x0f\x00\x00\xf2\x0f\x00\x00\x85\x00\x74\x00\x66", "x?x??x?x?x??x??xx??xx??x??xx??xx??xx??x?x?x");
- if (AddressToHook != nullptr && AddressToHook2 && AddressToHook3 && AddressToHook4 != nullptr)
- {
- Offset = *(PBYTE)((DWORD)AddressToHook + 0xA);
- Offset2 = *(PBYTE)((DWORD)AddressToHook4 + 0xB);
- if (!ipowerHack.HookInstrucao((uintptr_t)AddressToHook + 0x2, (uintptr_t)Hook, 6, &jumpBack))
- {
- MessageBox(NULL, "Hook falhou!", "HackInfo", MB_OK | MB_ICONINFORMATION);
- return 0;
- }
- if (!ipowerHack.HookInstrucao(AddressToHook2, (uintptr_t)Hook2, 6, &jumpBack2))
- {
- MessageBox(NULL, "Hook falhou!", "HackInfo", MB_OK | MB_ICONINFORMATION);
- return 0;
- }
- if (!ipowerHack.HookInstrucao(AddressToHook3, (uintptr_t)Hook3, 6, &jumpBack3))
- {
- MessageBox(NULL, "Hook falhou!", "HackInfo", MB_OK | MB_ICONINFORMATION);
- return 0;
- }
- if (!ipowerHack.HookInstrucao((uintptr_t)AddressToHook4 + 0xC, (uintptr_t)Hook4, 7, &jumpBack4))
- {
- MessageBox(NULL, "Hook falhou!", "HackInfo", MB_OK | MB_ICONINFORMATION);
- return 0;
- }
- }
- else
- {
- MessageBox(NULL, "ALGO NÃO FOI ENCONTRADO!", "HackInfo", MB_OK | MB_ICONINFORMATION);
- return 0;
- }
- while (true)
- {
- AddressQuadradoX = ecxHooked + Offset;
- AddressQuadradoY = esiHooked + Offset2;
- char buffer[1024];
- sprintf_s(buffer, "%02x", AddressQuadradoY);
- if (GetAsyncKeyState(VK_LBUTTON))
- {
- //MessageBox(NULL, buffer, "HackInfo", MB_OK | MB_ICONINFORMATION);
- *(int*)AddressQuadradoX = (int)(mouseX / 81.5);
- *(int*)AddressQuadradoY = (int)(mouseY / 81.5) - 1;
- }
- Sleep(1);
- }
- return 0;
- }
- BOOL APIENTRY DllMain( HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
- {
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- MessageBox(NULL, "Dll injetada!", "HackInfo", MB_OK | MB_ICONINFORMATION);
- CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)MainThread, nullptr, 0, nullptr);
- break;
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement