Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


how would I find the actual opcode for this?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Nicholas Cage
Newbie cheater
Reputation: 0

Joined: 18 Apr 2014
Posts: 16
Location: no

PostPosted: Wed Jul 09, 2014 11:57 pm    Post subject: how would I find the actual opcode for this? Reply with quote

cmp ebx,00010000
like
how would I find the opcode to cmp ebx,00010000?
i'm new to cheat engine.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jul 10, 2014 12:05 am    Post subject: Reply with quote

In memory viewer, select 'search' from drop-down menu, then click on 'find assembly code'. Alternatively, you can do an array of bytes scan for the hex equivalent.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Jul 10, 2014 2:15 am    Post subject: Reply with quote

or aobscan this
Code:
81 FB 00 00 01 00

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Rissorr
Master Cheater
Reputation: 3

Joined: 17 Sep 2013
Posts: 273
Location: Israel!

PostPosted: Thu Jul 10, 2014 5:36 am    Post subject: Reply with quote

I have a question:

How does the program "calculate" the bytes of the intruction?

for example: 8B 4C 24 0C - mov ecx,[esp+0C]

(also i noticed that most of the MOV instructions start with 8B)

so why it 8B? also why the INT 3 = CC? actually: HOW IT CALCULATED?
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Thu Jul 10, 2014 5:57 am    Post subject: Reply with quote

LemonMan wrote:
I have a question:

How does the program "calculate" the bytes of the intruction?

for example: 8B 4C 24 0C - mov ecx,[esp+0C]

(also i noticed that most of the MOV instructions start with 8B)

so why it 8B? also why the INT 3 = CC? actually: HOW IT CALCULATED?


http://forum.cheatengine.org/viewtopic.php?t=573831

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
cashd
Cheater
Reputation: 0

Joined: 25 Nov 2012
Posts: 25

PostPosted: Thu Jul 10, 2014 3:36 pm    Post subject: Reply with quote

i can give you more resource to read how mov and other instructions opcodes determined

http://www.codeproject.com/Articles/662301/x-Instruction-Encoding-Revealed-Bit-Twiddling-fo

[my mate wrote it]
Back to top
View user's profile Send private message
Rissorr
Master Cheater
Reputation: 3

Joined: 17 Sep 2013
Posts: 273
Location: Israel!

PostPosted: Thu Jul 10, 2014 3:42 pm    Post subject: Reply with quote

Thanks guys :D
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 204

Joined: 25 Jan 2006
Posts: 8579
Location: 127.0.0.1

PostPosted: Fri Jul 11, 2014 3:57 pm    Post subject: Reply with quote

Cheat Engine has its own disassembler engine in it that Dark Byte wrote.
You can find all the source for Cheat Engine here:
https://code.google.com/p/cheat-engine/

The code specific to the disassembler can be found here:
https://code.google.com/p/cheat-engine/source/browse/trunk/Cheat%20Engine/Assemblerunit.pas
https://code.google.com/p/cheat-engine/source/browse/trunk/Cheat%20Engine/disassembler.pas

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Sat Jul 12, 2014 7:18 am    Post subject: Reply with quote

A simple answer is because that is how the intel architecture is, they decided what mnemonic to use for what op code.

While the information given in the threads linked is very informative indeed, all that accomplishes is make you scratch your head (look at the last post in that thread) and think the guy who posted it is some genius who magically knows this shit. Not the case, You can find all this in the Intel Software Developer's manual where each instruction set and its mnemonic/byte code is explained. It also describes the architecture in great detail. I suggest you give it a read if you really want the answer to your curiosity because nobody here can explain in a post what is the job of a book and they are going to reference what is there already so why not go to the source.
Link to manual
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html?iid=tech_vt_tech+64-32_manuals

It will also serve as a reference because you can't remember this shit obviously. There are even online resources that makes it easier for you to quickly search what opcode stands for what mnemonic instead of searching in the manual. Here you go

http://ref.x86asm.net/coder32.html

This question was asked on stackoverflow and some very useful resources mentioned there so give that a read too (you can quickly find all the resource i linked to from there as well)
http://stackoverflow.com/questions/6401586/intel-x86-opcode-reference

Finally, if you want to quickly find out the op code for an instruction just assemble it anywhere in CE (jumps are relative so be careful when doing long jumps, you can calculate jmps too easily but i digress as this is not the topic for that) and notice the opcodes. Or use ollydebug. If you want to do the reverse (find out what op codes stands for what instruction) you can use CE hex viewer windows or ollydbg edit bytes option.

Hope this helps.

PS: Here's a tip that helped me when i had to learn this for university, use Google ( Surprised ) because you can find various articles on it that different tech university have on assembly (stay away from wikipedia: worst place for this) and other similar people as you asking the same question/needing help/writing their own article in their easy to understand noobish way and google brings that stuff up neatly. Pretty obvious but still not many do it when they should.

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites