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 does the mem Byte system work?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 10:47 am    Post subject: How does the mem Byte system work? Reply with quote

For example nop is 90 right? And each address has one of that and 16 bytes with opcodes. If each 16 byte containing opcodes and can have 16 nops then what does the next address have?

Example:

00401000 90 90 90 90
00401001 ?
00401002 ?
00401003 ?

00401000 nop
00401001 nop
00401002 nop
00401003 nop

So I dont get how this fits.
Back to top
View user's profile Send private message
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Mon Jan 07, 2008 10:56 am    Post subject: Re: How does the mem Byte system work? Reply with quote

dnsi0 wrote:

00401000 90 90 90 90
00401001 ?
00401002 ?
00401003 ?


what is this, this does not make sense

_________________
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 11:09 am    Post subject: Reply with quote

So what would be in those spots if the nops are already defined in the first address. ANd that would not be a real app initialization cause it would not have nops at the start.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jan 07, 2008 11:12 am    Post subject: Reply with quote

Ok, one address = 1 byte.

Code:

00400000 - 90
00400001 - 90
00400002 - 89
00400003 - 00


Will result in:

Code:

nop
nop
mov [eax],eax


What Cheat Engine does, however, is break it up into opcodes, so if you had:

Code:

00400000 - 90
00400001 - 90
00400002 - 89
00400003 - 00
00400004 - 90


Cheat Engine would break it up like this:

Code:

00400000 - 90
00400001 - 90
00400002 - 89 00
00400004 - 90


Then give you

Code:

00400000 - nop
00400001 - nop
00400002 - mov [eax],eax
00400004 - nop

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Jan 07, 2008 11:13 am    Post subject: Reply with quote

16 bytes? each address represent byte, since cheat engine converts it to instruction it takes more bytes. (Some instructions contains more than 1 byte)

So it would be:
00401000 90
00401001 90
00401002 90
00401003 90

00401000 nop
00401001 nop
00401002 nop
00401003 nop
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 11:15 am    Post subject: Reply with quote

Thank you so much. I knew something was fishy the way it skips.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jan 07, 2008 11:16 am    Post subject: Reply with quote

Nothing's fishy, it's just that, as Symbol said, some instructions take more than one byte (like "mov [eax],eax")
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 11:18 am    Post subject: Reply with quote

So If the Address Has something with like 3 bytes then it would kill the addresses under it? ANd they would countinue the preveous address's opcodes?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Jan 07, 2008 11:35 am    Post subject: Reply with quote

No, it wouldn't "kill", Cheat Engine just wouldn't show, because then the instruction will be diffrent. Lets say you got:

10 - 00 01 - add [eax],eax (I don't really remember the bytes, but just for the example)
12 - 00 00 - add [eax],al

So if you'll go to 11 you'll the the instruction of the byte 01, if there isn't one you'll see the instruction of 01 + 12's byte (00), if there isn't then checks for the next possible instruction and so on...
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 11:58 am    Post subject: Reply with quote

SO example:

00401000 01 //I dont know the opcodes either... So if this is mov eax, [eax]
00401001 01
00401002 01
00401003 90

In ce it would be:

00401000 Mov eax,[eax]
00401003 Nop


Right? Skipping the bytes on the address.
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Jan 07, 2008 12:01 pm    Post subject: Reply with quote

Yes.
But actually, 1 byte might belong to the mov, maybe it represents a "Register Parameter" (for example, eax, ebx) or maybe 2 bytes represents a register in brackets, or maybe 4 bytes represents an address/value or maybe 1 byte represents 2 parameters. (Instruction destination like push eax) well, you got me, its complicated...
Back to top
View user's profile Send private message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Mon Jan 07, 2008 12:03 pm    Post subject: Reply with quote

I think I might topply over in confusion if I keep typing...
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jan 07, 2008 12:26 pm    Post subject: Reply with quote

Cheat Engine starts at the base addy of the program (usually 00400000) and finds a possible opcode from it. For example:

Code:

400000 - 89 00 ; I've only memorized this version of mov, and add. 00 is
 ; the ModRM byte (basically a parameter byte) of [eax],eax


Then it'll say

Code:

400000 - mov [eax],eax


Then go on to the next place:

Code:

400002 - 00 00


then

Code:

400002 - add [eax],eax


then go on

Code:

400004 - 90


Recognize that...

Code:

400004 - nop


Code:

400005 - 00 00


blah..

Code:

400005 - add [eax],eax


So you end up having:

Code:

400000 - mov [eax],eax
400002 - add [eax],eax
400004 - nop
400005 - add [eax],eax


And you get the idea

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Uzeil
Moderator
Reputation: 6

Joined: 21 Oct 2006
Posts: 2411

PostPosted: Mon Jan 07, 2008 1:31 pm    Post subject: Reply with quote

db 00 00 is add [eax],al not add [eax],eax
_________________


Mini Engine v3.0
Mipla v1.0

Reposted old threads out of the MS section.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jan 07, 2008 1:41 pm    Post subject: Reply with quote

Ah, well my bad. I knew it was something like that, but it doesn't really matter.
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
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 programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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