Solved question about opcode

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat
Status
Not open for further replies.

mr.moon

Newbie
Full Member
Nobleman
Aug 29, 2016
64
383
1
Hello i have a little stupid question is there a way to get the opcode of address ?

like that



as can see i want to try make a pattern for that Client.exe+167DB50 but i can't because the pattern bytes not static mean the full pattern from a to z always changing when restart the game so i got idea what if can get the opcode from the address it's possible to do that ?

Thanks.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,137
78,998
2,393
To expand on what mambda said here's some psuedocode:

DWORD result = FindPattern("83 EC 40 A1");
DWORD kewlAddy = 0;

ReadProcessMemory(hProcess, (result + 5), &kewlAddy, NULL);

kewlAddy is now "client.exe + 167db50"

For a good pattern you will want to use wild card characters for hard coded numbers such as the 40 in "sub esp, 40", so even if the code changes slightly your pattern is still g00d, especially important when the code is generated dynamically such as with game engines that use modules/bytecode interpreters
 

mambda

headass
Escobar Tier VIP
Trump Tier Donator
Jun 25, 2014
2,298
37,938
269
get pattern for surrounding bytes

Go to the instruction
save the address
get the offset ( dereference instruction + 3 )

add address + offset + 5
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,746
40,528
316
Hello i have a little stupid question is there a way to get the opcode of address ?

like that



as can see i want to try make a pattern for that Client.exe+167DB50 but i can't because the pattern bytes not static mean the full pattern from a to z always changing when restart the game so i got idea what if can get the opcode from the address it's possible to do that ?

Thanks.
As mambda and rake said. Use patterns. A pattern like this will most likely work:
\x64\xA1\x00\x00\x00\x00\x50\x83\xEC\x40\xA1\x00\x00\x00\x00\x33\xC5
If you use an efficient pattern scanner it doesn't matter if the pattern is a little longer. As you can see this pattern "surrounds" the address you're searching for.
The mask would be "xxxxxxxxxxxx????xx". It might even works with less than 11 bytes before getting to the address you want.
Here are various tutorials/threads on pattern scanning:

 

mr.moon

Newbie
Full Member
Nobleman
Aug 29, 2016
64
383
1
get pattern for surrounding bytes

Go to the instruction
save the address
get the offset ( dereference instruction + 3 )

add address + offset + 5
Rake;48491 said:
To expand on what mambda said here's some psuedocode:

DWORD result = FindPattern("83 EC 40 A1");
DWORD kewlAddy = 0;

ReadProcessMemory(hProcess, (result + 5), &kewlAddy, NULL);

kewlAddy is now "client.exe + 167db50"

For a good pattern you will want to use wild card characters for hard coded numbers such as the 40 in "sub esp, 40", so even if the code changes slightly your pattern is still g00d, especially important when the code is generated dynamically such as with game engines that use modules/bytecode interpreters
As mambda and rake said. Use patterns. A pattern like this will most likely work:
\x64\xA1\x00\x00\x00\x00\x50\x83\xEC\x40\xA1\x00\x00\x00\x00\x33\xC5
If you use an efficient pattern scanner it doesn't matter if the pattern is a little longer. As you can see this pattern "surrounds" the address you're searching for.
The mask would be "xxxxxxxxxxxx????xx". It might even works with less than 11 bytes before getting to the address you want.
Here are various tutorials/threads on pattern scanning:
Thanks all for this information,I appreciate it and Thanks for helping me always :)
 
Status
Not open for further replies.
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