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 


Question basis of __asm command
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
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Sat Sep 13, 2008 12:22 pm    Post subject: Question basis of __asm command Reply with quote

help please :

if i am patch this address : 00AAAAAA = nop

DWORD address = 0x00AAAAAA
*(BYTE*)address = 0x90

but, other method, in asm for example

this correct?

__asm {
cs:00AAAAAA NOP
}

??
i look a example in this forum with __asm patching memory, but can't found,
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Sep 13, 2008 12:25 pm    Post subject: Reply with quote

Haven't really touched ASM but wouldn't it be something like this?

Code:

_asm {
   mov DWORD PTR DS:[0x00AAAAAA], 0x90
}


I'm not sure if you need the hex notation though.

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Sat Sep 13, 2008 12:29 pm    Post subject: Reply with quote

yes, thanks!!
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Sep 13, 2008 12:30 pm    Post subject: Reply with quote

No problem Razz
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Sat Sep 13, 2008 12:36 pm    Post subject: Reply with quote

oib111 wrote:
Haven't really touched ASM but wouldn't it be something like this?

Code:

_asm {
   mov DWORD PTR DS:[0x00AAAAAA], 0x90
}


I'm not sure if you need the hex notation though.

Wouldnt it be BYTE?
I know 0x00AAAAAA is DWORD but i got curious the xxx in:
Code:

   mov xxx PTR DS:[0x00AAAAAA], 0x90

Is for the addy or the value?

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

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Sep 13, 2008 12:38 pm    Post subject: Reply with quote

I think it's the value that the address holds, not for what value you're trying to move into it. But then again, I'm not an ASM expert.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
samuri25404
Grandmaster Cheater
Reputation: 7

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

PostPosted: Sat Sep 13, 2008 12:45 pm    Post subject: Reply with quote

The xxx represents the size of the value moving.

MOV DWORD implies 4 bytes, therefore, you would be moving

Code:

90 00 00 00


MOV BYTE implies 1 byte, so it would only move

Code:

90


into the address.

_________________
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
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Sat Sep 13, 2008 1:02 pm    Post subject: Reply with quote

samuri25404 wrote:
The xxx represents the size of the value moving.

MOV DWORD implies 4 bytes, therefore, you would be moving

Code:

90 00 00 00


MOV BYTE implies 1 byte, so it would only move

Code:

90


into the address.

He so i was right =D thx for cleanning that up.
It would be stupid to define the address as DWORD since the address will always be a DWORD.

_________________
Gone
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sat Sep 13, 2008 1:11 pm    Post subject: Reply with quote

defining it as a dword would fill it up with crap + nop.
_________________
Back to top
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat Sep 13, 2008 5:36 pm    Post subject: Reply with quote

I have a question. Do you need to put the DS: part? Can't you just put this?

Code:

_asm {
   mov BYTE PTR:[0x00AAAAAA], 0x90
}

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
sylvanus
Advanced Cheater
Reputation: 0

Joined: 09 May 2006
Posts: 68

PostPosted: Sat Sep 13, 2008 8:37 pm    Post subject: Reply with quote

yes oib,

i have other question,

I suppose this is also correct

_asm {
mov OWORD PTR:[0x00AAAAAA], 0x90909090909090909090909090909090
}

oword = 8 words

and DS = DATA SEGMENT not it neccesary?
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat Sep 13, 2008 9:12 pm    Post subject: Reply with quote

there's no colon when you don't use a segment register.

__asm mov dword ptr [0x123456], 0x90909090
__asm mov byte ptr [0x123456], 0x90

__asm mov dword ptr ds:[0x123456], 0x90909090
__asm mov byte ptr ds:[0x123456], 0x90

_________________
Back to top
View user's profile Send private message
Zand
Master Cheater
Reputation: 0

Joined: 21 Jul 2006
Posts: 424

PostPosted: Sat Sep 13, 2008 9:39 pm    Post subject: Reply with quote

OWORD?

I kinda recall there was a QWORD, but not OWORD...
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Sun Sep 14, 2008 6:21 am    Post subject: Reply with quote

Zand wrote:
OWORD?

I kinda recall there was a QWORD, but not OWORD...

Me too but i searched and OWORD rlly exist =/

_________________
Gone
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Sun Sep 14, 2008 7:04 am    Post subject: Reply with quote

When you use 0x for this, you have to reverse the bytes...

Lets say jmp 00112233 is 75 77 and, jne 00112233 is 74 77. We want to change the jmp to jne.
That would mean you could do:
__asm mov word ptr ds:[0x00112233], 0x7774

OR

__asm mov word ptr ds:[0x00112233], 7477h

Someone please correct me if I am wrong...

Fixed typo...


Last edited by Wintermoot on Sun Sep 14, 2008 10:28 pm; edited 1 time in total
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