Coded by NASA OUTPOST 14
Sig(untested):
Code:
game_shared.dll
00 40 1C "xxx"
Code:
#include <iostream>
#include <fstream>
#include <string>
#include <Windows.h>
using namespace std;
#define CamZoom_Value 2500
#include <tlhelp32.h>
HMODULE GetRemoteModuleHandle(unsigned long pId, char *module)
{
MODULEENTRY32 modEntry;
HANDLE tlh = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pId);
modEntry.dwSize = sizeof(MODULEENTRY32);
Module32First(tlh, &modEntry);
do
{
if(!stricmp(modEntry.szModule, module))
return modEntry.hModule;
modEntry.dwSize = sizeof(MODULEENTRY32);
}
while(Module32Next(tlh, &modEntry));
return NULL;
}
float outPut = CamZoom_Value;
HWND hwnd;
HANDLE hdc;
DWORD pid;
HANDLE process;
//00 40 1C "xxx"
int __stdcall WinMain(HINSTANCE__* hinst, HINSTANCE__* previnst, char* cmd, int cmds)
{
while(!(hwnd = FindWindow(NULL,"Heroes of Newerth")))
Sleep(10);
SetForegroundWindow(hwnd);
while(!(hdc = GetWindowDC(hwnd)))
Sleep(10);
while(!(GetWindowThreadProcessId(hwnd,&pid)))
Sleep(10);
while(!(process = OpenProcess(PROCESS_ALL_ACCESS,false,pid)))
Sleep(10);
DWORD dwZoomPtr = 0x2D287C;
DWORD remoteModuleBase = (DWORD)GetRemoteModuleHandle(pid,"game_shared.dll");
char sPrint[265];
sprintf(sPrint,"game_shared.dll: 0x%X - Zoom Ptr: 0x%X",remoteModuleBase,((DWORD)remoteModuleBase+(DWORD)dwZoomPtr));
WriteProcessMemory(process,(PVOID)(remoteModuleBase + dwZoomPtr),&outPut,4,NULL);
::MessageBoxA(0,sPrint,"visit Project-7.net for the latest version after every update",0);
return 0;
}
Credits:
Darawk
To find the offset:
Zoom in as far as you can
search for float 1650.0000
about 5 addresses in game_shared.dll should show up, one of them is the max zoom.