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 


[problem] why this code wrong and how to fix it?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
eranj
How do I cheat?
Reputation: 0

Joined: 28 Feb 2010
Posts: 9

PostPosted: Fri Mar 05, 2010 4:22 am    Post subject: [problem] why this code wrong and how to fix it? Reply with quote

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

017A0000:
jmp newmem
returnhere:

newmem: //this is allocated memory, you have read,write,execute access

originalcode:
mov [ecx+0c],xmm0*3
exit:
jmp returnhere

 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
017A0000:
movss [ecx+0c],xmm0
//Alt: db F3 0F 11 41 0C
Back to top
View user's profile Send private message
educofu
Expert Cheater
Reputation: 3

Joined: 21 Aug 2009
Posts: 171
Location: Brazil,MG,OP

PostPosted: Thu May 06, 2010 4:07 pm    Post subject: Reply with quote

at 017A0000:
lacking NOP's when [enabled] (not sure)


[disable]
OP wrote wrong: movss
original code says that "xmm0*3" is moved, not just "xmm0"

_________________
"I finally started thinking outside of the box, only to find myself in a larger box."
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Thu May 06, 2010 4:37 pm    Post subject: Reply with quote

Code:

Alt: db F3 0F 11 41 0C

This means the original instruction is "movss [ecx+c],xmm0"

the OP probably wants to multiply the value stored in xmm0 and then write it to [ecx+c]

seeing it's using movss (single precision scalar) you should probably use mulss
or even better just write the value you want at [ecx+0c]

e.g:
Code:

push eax
mov eax,(float)10000
mov [ecx+c],eax
pop eax

_________________
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
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