hey Fleep i just wanted you ask if the ACubeDll didnt work on Win 7 Ultimate 32bit version or i am wrong?
I just tested your project even no result.
it starts the dll injecter and says it was ok to Inject the Dll but then nothing happens in the game maybe i am too newbish for it but i dont think it!
i even created 2 times my own DLL and tryed to load it in the game always the same problem maybe you have any answers for me sry if my english is so bad ^^ but i am from germany and a long time out of school
//////////////////EDIT/////////////////////
sry i got the error i forget to rename the dll from top of the head ^.^ maybe i should look first than ask ;D
but why isnt my dll didnt working can someone of you guys look it up and tell me whats wrong?! thx
I just tested your project even no result.
it starts the dll injecter and says it was ok to Inject the Dll but then nothing happens in the game maybe i am too newbish for it but i dont think it!
i even created 2 times my own DLL and tryed to load it in the game always the same problem maybe you have any answers for me sry if my english is so bad ^^ but i am from germany and a long time out of school
//////////////////EDIT/////////////////////
sry i got the error i forget to rename the dll from top of the head ^.^ maybe i should look first than ask ;D
but why isnt my dll didnt working can someone of you guys look it up and tell me whats wrong?! thx
C++:
#include <Windows.h>
#include <iostream>
void WriteToMemory(DWORD AddressToWrite, char* valueToWrite, int byteNum);
DWORD FindDmaAddy(int pointerLevel, DWORD offsets[], DWORD BaseAddress);
char *StringToCharArr(std::string strToConvert);
int main();
using namespace std;
DWORD WINAPI Main_Thread(LPVOID lpParam)
{
main();
return S_OK;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD _reason, LPVOID lpReserved)
{
if(_reason == DLL_PROCESS_ATTACH)
{
CreateThread(0, 0x1000, &Main_Thread, 0, 0, NULL);
}
}
int main()
{
string Nops[] =
{
"\x90",
"\x90\x90",
"\x90\x90\x90",
"\x90\x90\x90\x90",
};
bool AmmoStatus;
char AmmoOpCode[] = "\xFF\x06";
char AmmoDefaultOpCode[] = "\xFF\x0E";
DWORD AmmoAddress = 0x45B75F;
bool HealthStatus;
char HealthValue[] = "\x39\x5";
char DefaultHealthValue[] = "\x64\x0";
DWORD HealthBaseAddress = 0x4DF73C;
DWORD HealthOffsets[] = { 0xF4 };
DWORD AddressToWrite;
bool RfireStatus;
char RfireOpCode[] = "\x90\x90";
char RfireDefaultOpCode[] = "\x89\x10";
DWORD RfireAddress = 0x45B75A;
bool RecoilStatus;
string RecoilDefaultOpCodes[] =
{
"\x8B\x16",
"\x8B\x52\x14",
"\x50",
"\x8D\x4c\x24\x1C",
"\x51",
"\x8B\xCE",
"\xFF\xD2",
};
DWORD RecoilAddress[] = { 0x45B70A, 0x45B70C, 0x45B70F, 0x45B710, 0x45B714, 0x45B715, 0x45B717 };
int NoOfBytes[] = {2, 3, 1, 4, 1, 2, 2};
bool AutoGunStatus;
char AutoGunOpCode[] = "\xEB\x09";
char AutoGunDefaultOpCode[] = "\x75\x09";
DWORD AutoGunAddress = 0x45B6BB;
//-------------Ammo---------------------
if(GetAsyncKeyState(VK_F1))
{
AmmoStatus = !AmmoStatus;
if(AmmoStatus)
{
WriteToMemory(AmmoAddress, AmmoOpCode, 2);
}
else
{
WriteToMemory(AmmoAddress, AmmoDefaultOpCode, 2);
}
}
//---------------Health-----------------
if(GetAsyncKeyState(VK_F2))
{
HealthStatus = !HealthStatus;
AddressToWrite = FindDmaAddy(1, HealthOffsets, HealthBaseAddress);
if(!HealthStatus)
{
if(AddressToWrite != NULL)
{
WriteToMemory(AddressToWrite, DefaultHealthValue, 2);
}
}
else
{
}
}
//--------------Rfire---------------
if(GetAsyncKeyState(VK_F3))
{
RfireStatus = !RfireStatus;
if(RfireStatus)
{
WriteToMemory(RfireAddress, RfireOpCode, 2);
}
else
{
WriteToMemory(RfireAddress, RfireDefaultOpCode, 2);
}
}
//--------------Recoil---------------
if(GetAsyncKeyState(VK_F3))
{
RecoilStatus = !RecoilStatus;
if(RecoilStatus)
{
for(int i = 0; i < 7; i++)
{
WriteToMemory(RecoilAddress[i], StringToCharArr(Nops[NoOfBytes[i]-1]), NoOfBytes[i]);
}
}
else
{
for(int i = 0; i < 7; i++)
{
WriteToMemory(RecoilAddress[i], StringToCharArr(RecoilDefaultOpCodes[i]), NoOfBytes[i]);
}
}
}
//--------------AutoGunStatus---------------
if(GetAsyncKeyState(VK_F3))
{
AutoGunStatus = !AutoGunStatus;
if(AutoGunStatus)
{
WriteToMemory(AutoGunAddress, AutoGunOpCode, 2);
}
else
{
WriteToMemory(AutoGunAddress, AutoGunDefaultOpCode, 2);
}
}
if(HealthStatus)
{
if(AddressToWrite != NULL)
{
WriteToMemory(AddressToWrite, HealthValue, 2);
}
}
return true;
}
void WriteToMemory(DWORD AddressToWrite, char* valueToWrite, int byteNum)
{
unsigned long oldProtection;
VirtualProtect((LPVOID)AddressToWrite, byteNum, PAGE_EXECUTE_READWRITE, &oldProtection);
memcpy((LPVOID)AddressToWrite, valueToWrite, byteNum);
VirtualProtect((LPVOID)AddressToWrite, byteNum, oldProtection, NULL);
}
DWORD FindDmaAddy(int pointerLevel, DWORD offsets[], DWORD BaseAddress)
{
DWORD Ptr = *(DWORD*)(BaseAddress);
if(Ptr == 0) return NULL;
for(int i = 0; i < pointerLevel; i++)
{
if(i == pointerLevel - 1)
{
Ptr = (DWORD)(Ptr+offsets[i]);
if(Ptr == 0) return NULL;
return Ptr;
}
else
{
Ptr = *(DWORD*)(Ptr+offsets[i]);
if(Ptr == 0) return NULL;
}
}
return Ptr;
}
char *StringToCharArr(std::string strToConvert)
{
char *charRet = new char[strToConvert.length()+1];
std::strcpy(charRet, strToConvert.c_str());
return charRet;
}