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 


List of opcodes to bytes

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sun Jan 09, 2011 1:32 pm    Post subject: List of opcodes to bytes Reply with quote

Can anybody help me?

I know that 90 represents NOP, is there a useful source I can use to find out what byte represents what opcode / register?
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Sun Jan 09, 2011 1:38 pm    Post subject: Reply with quote

http://www.intel.com/Assets/PDF/manual/253666.pdf
and
http://www.intel.com/Assets/PDF/manual/253667.pdf

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sun Jan 09, 2011 2:31 pm    Post subject: Reply with quote

This is what I got so far from CE 5.6:

eax - 0 || 8
ecx - 1 || 9
edx - 2 || A
ebx - 3 || B
esp - 4 || C
ebp - 5 || D
esi - 6 || E
edi - 7 || F

bl - 00 || 02
ebx - 01 || 03
al - 04
eax - 05

pushad - 60
popad - 61
nop - 90

inc - 40 to 47
dec - 48 to 4F

push - 50 to 57
pop - 58 to 5F

Some are inaccurate, some depend on the instruction.
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Jan 09, 2011 6:08 pm    Post subject: Reply with quote

just use a library that does this already unless you seriously enjoy tedium
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Sun Jan 09, 2011 6:36 pm    Post subject: Reply with quote

iPromise wrote:
This is what I got so far from CE 5.6:

eax - 0 || 8
ecx - 1 || 9
edx - 2 || A
ebx - 3 || B
esp - 4 || C
ebp - 5 || D
esi - 6 || E
edi - 7 || F

bl - 00 || 02
ebx - 01 || 03
al - 04
eax - 05

pushad - 60
popad - 61
nop - 90

inc - 40 to 47
dec - 48 to 4F

push - 50 to 57
pop - 58 to 5F

Some are inaccurate, some depend on the instruction.

As you've discovered, there is no hard or fast rule when it comes to this conversion. The links Dark Byte posted are all you need. Do not waste your time attempting to infer the opcodes yourself as you will end up with a set of incomplete and most likely incorrect rules.
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sun Jan 09, 2011 6:59 pm    Post subject: Reply with quote

@slovach Do you know any libraries that already do that job, because after a while of research I had no results.

@slugsnack If slovach has an answer then there is no need for this whole manual stuff, if he doesn't i'll take a closer look at the links dark byte gave me.
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Jan 09, 2011 7:09 pm    Post subject: Reply with quote

http://code.google.com/p/asmjit/
Back to top
View user's profile Send private message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Sun Jan 09, 2011 7:28 pm    Post subject: Reply with quote

@slovach

That is a plugin to C++ to compile JIT code, I don't see any functions that can convert bytes into asm =/

guess i gotta do this the hard way.
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Jan 09, 2011 8:04 pm    Post subject: Reply with quote

oops had it backwards, erm.

just google it, i see plenty of hits... like the first one for that matter.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25788
Location: The netherlands

PostPosted: Sun Jan 09, 2011 9:14 pm    Post subject: Reply with quote

distorm is pretty easy to use in c apps
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Jan 10, 2011 10:03 am    Post subject: Reply with quote

ADE32 / HDE32/64 are also fairly decent projects.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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