You're going to need a few kernel functions defined...
OpenProcess,
WriteProcessMemory, and some kind of
GetModuleBaseAddress function.
GetModuleBaseAddress <---- Search for this in C# or vb.net.
:::: EXPLANATION OF YOUR CODE ::::
- You read module address
- You add the offset to pointer
- Then you write 0 to that added address.
- After all, you pause then loop. (basic functionality)
And its pretty easy (as long as you know a bit of c#)
processhandle is a
intptr.
processID as int32
Code:
processID = system.diagnostics.process.getprocessesbyname("skype")(0).Id;
^^^^ I'm not sure about caps. Im just using what i know from memory
OpenProcess(processhandle, false, 0x43A);
processhandle is an empty intptr that you are going to fill in
false is the parameter to not inherit handle into process
0x43A is some random access that has everything to need (WPM/RPM/Allocation/Protection) I use this instead of
PROCESS_ALL_ACCESS for detection
Now you will get module address:
SF is a Int32.
SF = GetModuleBaseAddress("processname", "game.exe");
GetModuleBaseAddress is a function that is not declared. Find this on google somewhere. Must be able to search modules in another process
Speed is a Int32.
Speed = SF + 0x798F80;
Now for writing you can simple use
WriteByte(ProcessHandle, Speed, 0);
Write Byte function params :
Int32, Int32, Byte
and function consists of:
Byte oBuffer[1] = {wrteByte};
WriteProcessMemory(pHandle, wrteByte, obuffer, 1, null);
MSDN Definitions :
Code:
HANDLE WINAPI OpenProcess(
_In_ DWORD dwDesiredAccess,
_In_ BOOL bInheritHandle,
_In_ DWORD dwProcessId
);
Code:
BOOL WINAPI WriteProcessMemory(
_In_ HANDLE hProcess,
_In_ LPVOID lpBaseAddress,
_In_ LPCVOID lpBuffer,
_In_ SIZE_T nSize,
_Out_ SIZE_T *lpNumberOfBytesWritten
);
I went ahead and found a working example of how to make your own GetModuleBaseAddress
Code:
Process[] ProcessList = System.Diagnostics.Process.GetProcessByName("skype");
IntPtr
if (ProcessList.Length > 0
{
Process MYPROCESS = ProcessList[0];
IntPtr BaseAddress = IntPtr.Zero;
foreach (System.Diagnostics.ProcessModule Module in MYPROCESS.Modules)
{
if (Module.ModuleName.ToLower.Contains("game.exe"))
BaseAddress = Module.BaseAddress;
}
if (BaseAddress != IntPtr.Zero)
{
// No Module
}
}
Note : Make sure to run your app as x86 though, or else you will only receive a the x64 modules if you are on a x64 machine.