Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Fovea's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    325
    Reputation
    101
    Thanks
    411
    My Mood
    Amused
    The size of data-types is implementation defined. An int is guaranteed to have a range of -32767 to 32767 by the C++ standard, although it can hold more. The same goes for other standard integral types.

  2. The Following User Says Thank You to Fovea For This Useful Post:

    Hell_Demon (09-26-2011)

  3. #17
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah
    THANKS but I am smart enough to understand on first exanation dont need 3 answers for a question that i didnt made.

  4. #18
    Phizo's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    1
    Ah, guys...can we please stay on topic please?

    Also, I think I posted this in the wrong section /facepalm.

  5. #19
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah

    Wink It should be enough.

    Quote Originally Posted by Phizo View Post
    Ah, guys...can we please stay on topic please?

    Also, I think I posted this in the wrong section /facepalm.

    For first you find what writes/accesses the address.

    After you click something and see more info.
    Click on the check-box HEX and search for the addres that him said on box.
    "The value of pointer that you need should be: "
    U search for this value.

    Go to add address manually.
    And click on check-box pointer.
    The offset will be the one when you find what it writes/access
    Like move [eax+10],ecx
    The offset will be 10.

    Now you do the samething search what access
    And find another pointer.

    And now for last you find a nice green and base pointer.
    Put offset and it will give us the value that we want.
    But how to use it on C++?
    Like this:
    [Highlight=C++]#include <windows.h>
    #include <tchar.h>
    #include <stdio.h>
    #include <tlhelp32.h>
    #include <conio.h>

    DWORD dwNOPs[]={0x90,0x90,0x90,0x90,0x90,0x90,0x90};
    DWORD dwScore = 0x0000FFFF;
    DWORD dwScorez = 0x00;

    DWORD dwGetModuleBaseAddress(DWORD dwProcessIdentifier, TCHAR *lpszModuleName)
    {
    HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessIdentifier);
    DWORD dwModuleBaseAddress = 0;
    if(hSnapshot != INVALID_HANDLE_VALUE)
    {
    MODULEENTRY32 ModuleEntry32 = {0};
    ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
    if(Module32First(hSnapshot, &ModuleEntry32))
    {
    do
    {
    if(_***cmp(ModuleEntry32.szModule, lpszModuleName) == 0)
    {
    dwModuleBaseAddress = (DWORD)ModuleEntry32.modBaseAddr;
    break;
    }
    }
    while(Module32Next(hSnapshot, &ModuleEntry32));
    }
    CloseHandle(hSnapshot);
    }
    return dwModuleBaseAddress;
    }

    int _tmain(int nArgumentCount, TCHAR **lpvArgumentVector)
    {
    SetConsoleTitle(_T("Solitaire Trainer [Windows 7 Version]"));
    HWND hWindow = FindWindow(NULL, _T("Paciência"));
    if(hWindow == NULL)
    {
    printf(_T("The window could not be found.\n"));
    }
    else
    {
    printf(_T("The window was found.\n"));
    DWORD dwProcessIdentifier = 0;
    GetWindowThreadProcessId(hWindow, &dwProcessIdentifier);
    HANDLE hProcess = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE, FALSE, dwProcessIdentifier);
    if(hProcess == NULL)
    {
    printf(_T("The process could not be opened.\n"));
    }
    else
    {
    printf(_T("The process was opened.\n"));
    DWORD dwModuleBaseAddress = dwGetModuleBaseAddress(dwProcessIdentifier, _T("solitaire.exe"));
    if(dwModuleBaseAddress != 0)
    {
    DWORD dwMemoryBuffer = 0;
    if(ReadProcessMemory(hProcess, (PVOID)(dwModuleBaseAddress + 0x00097074), &dwMemoryBuffer, sizeof(dwMemoryBuffer), NULL) && ReadProcessMemory(hProcess, (PVOID)(dwMemoryBuffer + 0x2C), &dwMemoryBuffer, sizeof(dwMemoryBuffer), NULL) && WriteProcessMemory(hProcess, (PVOID)(dwMemoryBuffer + 0x10), &dwScore, sizeof(dwScore), NULL))
    {
    printf(_T("The score was set.\n"));
    }
    else
    {
    printf(_T("The score could not be set.\n"));
    }
    DWORD dwMemoryBuffers = 0;
    printf(_T("The module base address was found.\n"));
    if(ReadProcessMemory(hProcess, (PVOID)(dwModuleBaseAddress + 0x00097074), &dwMemoryBuffers, sizeof(dwMemoryBuffers), NULL) && ReadProcessMemory(hProcess, (PVOID)(dwMemoryBuffers + 0x2C), &dwMemoryBuffers, sizeof(dwMemoryBuffers), NULL) && WriteProcessMemory(hProcess, (PVOID)(dwMemoryBuffers + 0x08), &dwNOPs, sizeof(dwNOPs), NULL)) {
    printf(_T("Time no longer decreases the score.\n"));

    }
    else
    {
    printf(_T("Time could not be prevented from decreasing the score.\n"));
    }
    }
    else
    {
    printf(_T("The module base address could not be found.\n"));
    }
    CloseHandle(hProcess);
    }
    }
    printf(_T("\nPress enter to exit.\n"));
    while(_getch() != 0x0D);
    return 0;
    }
    [/HIGHLIGHT]
    if(_***cmp(ModuleEntry32.szModule, lpszModuleName) == 0)
    is if(_ t c s cmp(ModuleEntry32.szModule, lpszModuleName) == 0) (I dont know why its _***cmp)
    ( I used a different base address on code but you can change )
    If you still dont understando ask us.
    I think its enough.
    Hope I helped. =) ::
    Last edited by KissU; 09-27-2011 at 04:44 AM.
    "More suicides in world make there are less suicides in the world"


  6. #20
    Phizo's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    1
    Thanks for the detailed reply dude .

    However...that's what I was doing. I found the green address the same way, but the green address changes :S. I'm really confused, isn't the static address suppose to stay the same?

    Sorry if I'm being a nuisance. It's just weird that I'm doing the exact same thing but my green address keep changing.

  7. #21
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah
    Quote Originally Posted by Phizo View Post
    Thanks for the detailed reply dude .

    However...that's what I was doing. I found the green address the same way, but the green address changes :S. I'm really confused, isn't the static address suppose to stay the same?

    Sorry if I'm being a nuisance. It's just weird that I'm doing the exact same thing but my green address keep changing.
    You dont need search for them every time that you run the program,just use one and it should work like in code that I give i used one different than the one that i found and both should work for us,hope you can end it!

  8. #22
    Phizo's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    26
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by KissU View Post
    You dont need search for them every time that you run the program,just use one and it should work like in code that I give i used one different than the one that i found and both should work for us,hope you can end it!
    Oh, okay. I'll try, thanks dude .

  9. #23
    KissU's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    107
    Reputation
    10
    Thanks
    14
    My Mood
    Blah

    Wink

    Quote Originally Posted by Phizo View Post
    Oh, okay. I'll try, thanks dude .
    Ok, nope.When you need just come there and ask!
    And if its works let we know
    Last edited by Hassan; 09-27-2011 at 09:01 AM.
    "More suicides in world make there are less suicides in the world"


Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 2
    Last Post: 07-13-2010, 08:53 AM
  2. Finding static pointer address? C++
    By scriptkiddy in forum C++/C Programming
    Replies: 0
    Last Post: 10-06-2009, 07:35 PM
  3. how to change a static ip address?
    By Ragehax in forum Combat Arms Help
    Replies: 6
    Last Post: 09-30-2009, 12:16 AM
  4. Replies: 3
    Last Post: 01-04-2006, 09:52 PM
  5. Direct Memory Access (DMA) to Static Memory Addresses
    By Dave84311 in forum Game Hacking Tutorials
    Replies: 0
    Last Post: 12-31-2005, 08:18 PM