Solved Acquiring EHandle Address

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

redsalmon

Newbie
Jul 9, 2015
2
84
0
When in game, I open up the console and type cl_pdump 1 and I see a variable under C_BaseCombatCharacter that is m_hActiveWeapon EHandle(0xADRESS->weapon).

I add that address to Cheat Engine and I can see all the variables and values that I need to make my hack in there. However, I don't know how to access it.

I am currently using Cheat Engine and Ollydbg to get my memory addresses and offsets. From reading arounding, it looks like I only need the player base and the m_hActiveWeapon offset. Here is how I am storing them:

C++:
ReadProcessMemory(handleProcess, (PBYTE*)(handleClient + playerBase), &local, sizeof(DWORD), 0);

ReadProcessMemory(handleProcess, (PBYTE*)(local + m_hActiveWeapon), &weaponBase, sizeof(DWORD), 0);
As I understand, weaponBase is now a pointer to the m_hActiveWeapon EHandle. I'm not exactly sure how to get from here to the EHandle memory address. I've tried RPMing it, but I get a null value each time. Please help. Thank you in advance!
 
Last edited:

redsalmon

Newbie
Jul 9, 2015
2
84
0
Sorry about #1!
And no luck on #2.

I looked at rN's post in the CSGO Tutorial section titled SourceEngine for noobs, but that also didn't help me very much.

I quadruple checked my offsets with Olly and other people's offsets. handleClient, local, and weaponBase are all DWORDs.

It turns out that my last RPM was returning false because it wasn't able to access that memory address. So I read around and found that local + m_hActiveWeapon will give me a pointer to the weapon base, not the actual weapon. So I changed up my code to the following:

C++:
ReadProcessMemory(p_Handle, LPCVOID(dwClient + OFFSET_PLAYER), &m_dwEntity, sizeof(m_dwEntity), NULL);

ReadProcessMemory(p_Handle, LPCVOID(m_dwEntity + OFFSET_ACTIVE_WEAPON), &m_ulWeapon, sizeof(m_ulWeapon), NULL);

ReadProcessMemory(p_Handle, LPCVOID(m_ulWeapon), &m_ulWeapon, sizeof(m_ulWeapon), NULL);

ReadProcessMemory(p_Handle, LPCVOID(m_ulWeapon + OFFSET_BACKSTAB), &m_hReadyToBackstab, sizeof(m_hReadyToBackstab), NULL);
But that still makes the final RPM return 0. So I changed it again to:

C++:
ReadProcessMemory(p_Handle, LPCVOID(dwClient + OFFSET_PLAYER), &m_dwEntity, sizeof(m_dwEntity), NULL);

ReadProcessMemory(p_Handle, LPCVOID(m_dwEntity + OFFSET_ACTIVE_WEAPON), &m_ulWeapon, sizeof(m_ulWeapon), NULL);

ReadProcessMemory(p_Handle, LPCVOID(m_ulWeapon + OFFSET_BACKSTAB), &m_hReadyToBackstab, sizeof(m_hReadyToBackstab), NULL);
Now when I cout m_hReadyToBackstab, I get a value. But this isn't the correct value. I went into the console (ingame) and typed cl_pdump 1. There is a line under C_BaseCombatCharacter that reads:

C++:
m_hActiveWeapon EHandle(0x499E39D0->tf_weapon_knife)
Of course the address changes when I switch weapons or classes, and tf_weapon_xxxx is whatever weapon I am holding. So I add the 0x499E39D0 address into my cheat engine table -> browse memory region -> dissect data/structure and then scrolled down to the offset, which is a number 0.007xxxx in double that increases when I can backstab, and reverts back when I can't. cout'ing my m_hReadyToBackstab will give me some strange value like 3.34901e-317 and it never changes.

So I thought I would try a different method. I Pointer Scanned 0x499E39D0 and found 2 static addresses that always show up (even after restarting the game).

C++:
"client.dll"+00C6E3D0
"client.dll"+00C6E3E0
They both have the same offset, and will always point to whatever m_hActiveWeapon EHandle is for only the knife. However, the offsets for them will change on every restart and I am unsure how to calculate it. When I RPM dwClient + 0x36E3D0 or 0x36E3E0 and then RPM the result + their offset, and then RPM that + OFFSET_BACKSTAB, I get the value that I am looking for. I am unsure of how I am supposed to calculate the offset for these two results, or if I even should be doing that.

Am I on the right track? Is there something that I missed or am doing wrong? I didn't think finding m_hReadyToBackstab should be this difficult. But it is a great and humbling learning experience.
 
Last edited:
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