Solved using assembly in c++?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

MyRightHandMann

Newbie
Full Member
Dec 30, 2015
12
62
0
i have been told to use inline asm for assembly in c++, i dont really know assembly but i need it for a small cheat im working on, has anyone ever right clicked on something in cheat engine and did the "replace code with nothing (nop)" button? im guessing nop replaces the code in the address with nothing if there is code in the addresses and i need to nop an address required to finish my small cheat so how would i do it? again i know nothing about assembly so please dont talk about some difficult assembly stuff.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
i have been told to use inline asm for assembly in c++, i dont really know assembly but i need it for a small cheat im working on, has anyone ever right clicked on something in cheat engine and did the "replace code with nothing (nop)" button? im guessing nop replaces the code in the address with nothing if there is code in the addresses and i need to nop an address required to finish my small cheat so how would i do it? again i know nothing about assembly so please dont talk about some difficult assembly stuff.

?t=3285
 
Last edited:

PwndDepot

I has a status
Dank Tier VIP
Trump Tier Donator
Dank Tier Donator
Nov 5, 2014
239
7,748
19
If all you're trying to do is replace some opcodes with nop then I don't think you'll need inline asm for that. You can just replace the bytes with 0x90 (opcode for nop).

copied from fleep's midfunction hook tutorial, replaces 5 bytes with nop:
C++:
for(DWORD x = 0x5; x < length; x++)
          *(Address + x) = 0x90;
 

MyRightHandMann

Newbie
Full Member
Dec 30, 2015
12
62
0
If all you're trying to do is replace some opcodes with nop then I don't think you'll need inline asm for that. You can just replace the bytes with 0x90 (opcode for nop).

copied from fleep's midfunction hook tutorial, replaces 5 bytes with nop:
C++:
for(DWORD x = 0x5; x < length; x++)
          *(Address + x) = 0x90;
thank you, but is there another way? i remember learning from a source code where there was stuff like this in c++

mov eax, 19 //no idea what that does
nop //guessing it removes code from an address?

that kind of stuff, i just want to nop the address i get

edit:

i found this video


https://www.youtube.com/watch?v=guru397zg2g

so kind of like that, except replace mov eax, 39 with noping the address
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,073
78,998
2,371
There are specific bytes that represent instructions and operands in the instruction set for your processor.
You need to write these bytes to memory.
You can do this in c++ or assembly. The choice is yours :)
 

MyRightHandMann

Newbie
Full Member
Dec 30, 2015
12
62
0
Rake;43635 said:
There are specific bytes that represent instructions and operands in the instruction set for your processor.
You need to write these bytes to memory.
You can do this in c++ or assembly. The choice is yours :)
uhh, how would i do it with c++?
 

Lovelace

Jr.Coder
Full Member
Nobleman
Oct 23, 2015
83
938
5
You seem to have the wrong idea/understanding of how assembly works on c/c++. PwndDepot already gave you a simple source code on how to replace opcodes with nop.

C++:
memset(address, 0x90, length); // obviously, this isn't going to work externally
Breaking it down:



0x90 means nop in asm btw if you don't know

https://www.mathemainzel.info/files/x86asmref.html#nop
 
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