Solved WPM, RPM & Pointers

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,164
78,998
2,398
Declarations:
C++:
BYTE OneShotKillValueRegular[4];
BYTE OneShotKillValueHacked[4];
float Float888 = 888;
LPVOID FloatAddress = &Float888;
Niether of these work:
Code1:
C++:
//Read 4 bytes of local variable
ReadProcessMemory(hProcHandle, (LPVOID*)FloatAddress, &OneShotKillValueHacked, 4, NULL);
Code2:
C++:
//Read 4 bytes of local variable
ReadProcessMemory(hProcHandle, (LPCVOID)&Float888, &OneShotKillValueHacked, 4, NULL);
I can't find the right syntax.
I want to read 4bytes of a local variable(Float888) and later write those 4 bytes into an external process using WPM.
I was trying to be lazy so I didn't have to do the conversion to write this crap out:
OneShotKillValueHacked[4] = { 0x00, 0x00, 0x5E, 0x44}

I was trying to make the program do it for me but was having trouble using addressof and de-reference operator.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,164
78,998
2,398
:facepalm:
Boy did I fuck this one up.

I am passing hprochandle from the game I'm hacking into the RPM instead of the hprochandle of the trainer that I'm storing the local variable float888

problem solved lol
:facepalm:

My Solution was to use memcpy to create an array of bytes from the local variable and then write it to memory
C++:
BYTE OneShotKillValueHacked[4]
float float888 = 888;
memcpy(&OneShotKillValueRegular, &float888, 4);
WriteProcessMemory(hProcHandle, (LPVOID)OneShotKillAddress, OneShotKillValueHacked, 4, NULL);
 
Last edited:

zepixx

Newbie
Full Member
Aug 29, 2014
27
168
0
Have you tried the following?
C++:
ReadProcessMemory(hProcHandle, (void*)FloatAddress, &OneShotKillValueHacked, sizeof(OneShotKillValueHacked), 0)
 
Last edited:

zepixx

Newbie
Full Member
Aug 29, 2014
27
168
0
I don't think you can convert a memory address into an unsigned char array using RPM
 

zepixx

Newbie
Full Member
Aug 29, 2014
27
168
0
I did this just now, perhaps it helps you.
It's using strings instead of char array, and DWORD to store the hex value.
You can then do whatever you want with the address.

C++:
#include <windows.h>
#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>

using namespace std;

int main() {
  float Float888 = 888;
  void *p_floataddr = &Float888;

  std::stringstream strm;
  strm << p_floataddr;
  string addr = strm.str();

  DWORD OneShotKillValueHacked = strtoul(addr.c_str(), nullptr, 16);

  cout << p_floataddr << endl;
  cout << hex << setiosflags(ios_base::showbase)<< OneShotKillValueHacked;

  return 0;
}
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods