SmileHelpHow to coding increase/decrease value in c++?

Posts 1–8 of 8 · Page 1 of 1
How to coding increase/decrease value in c++?
Hello..

How to coding increase value by 100 in c++?

Sample :
Address is 0x00DD92A1
Offset1 is 0x7F0
Offset2 is 0x24

So if press F3 the value will increase by 100 if press F3 again the value will increase again by 100.
and if press F4 the value will decrease by 100 if press F4 again the will decrease again by 100.
And so on.

thanks in advance
Quote Originally Posted by aprielleon View Post
Hello..

How to coding increase value by 100 in c++?

Sample :
Address is 0x00DD92A1
Offset1 is 0x7F0
Offset2 is 0x24

So if press F3 the value will increase by 100 if press F3 again the value will increase again by 100.
and if press F4 the value will decrease by 100 if press F4 again the will decrease again by 100.
And so on.

thanks in advance
set ur hotkey by yourself i just help about increase and decrease

increase
*(DWORD*)((Address+Offset1)+Offset2) += 100;
decrease
*(DWORD*)((Address+Offset1)+Offset2) -= 100;

actually i havent try it yet,because none of my hack have increase,decrease.
No. ((Address+Offset1)+Offset2) would be the same as

(Address + Offsets1 + Offset2) , which I doubt is correct...
DWORD WINAPI mythread(LPVOID param)
{InitApplicationProcess();
while (1)
{
if(GetAsyncKeyState(VK_F3)&1)
{
*(DWORD*)(DeRef(DeRef(0x00DD92A1)+0x7F0)+0x24) += 100;
MessageBeep(MB_ICONINFORMATION);
}

if(GetAsyncKeyState(VK_F4)&1)
{
*(DWORD*)(DeRef(DeRef(0x00DD92A1)+0x7F0)+0x24) -= 100;
MessageBeep(MB_ICONINFORMATION);
}
Sleep(1);
}
return (0);
}
working perfectly
thank you so much
Quote Originally Posted by abuckau907 View Post
(Address + Offsets1 + Offset2)
i already try this,but this is not working because this is multi level pointer
No shit, I said "...which I doubt is correct... "

It's probably

addr1 = *(DWORD*)(0x00DD92A1);
addr2 = *(DWORD*)(addr1 + offset1);
addr3 = *(DWORD*)(addr2 + offset2)

or

addr1 = *(DWORD*)(0x00DD92A1);
addr2 = *(DWORD*)(addr1 + offset1);
addr3 = addr2 + offset2;
Code:
// Credit by L. Spiro
UINT_PTR DeRef( UINT_PTR _uiptrPointer ) 
{
    UINT_PTR uiptrRet;
    if (!::ReadProcessMemory(hProcess, reinterpret_cast<LPVOID>(_uiptrPointer), &uiptrRet, sizeof(uiptrRet), NULL)) { return 0UL; }
    return uiptrRet;
}
for multi level pointer i using this function.
Quote Originally Posted by aprielleon View Post
Code:
// Credit by L. Spiro
UINT_PTR DeRef( UINT_PTR _uiptrPointer ) 
{
    UINT_PTR uiptrRet;
    if (!::ReadProcessMemory(hProcess, reinterpret_cast<LPVOID>(_uiptrPointer), &uiptrRet, sizeof(uiptrRet), NULL)) { return 0UL; }
    return uiptrRet;
}
for multi level pointer i using this function.
that code hard tu understand,unlime my way,u can just edit it without problem
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us