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 


Assembly Script not changing value at offset

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

Joined: 15 Dec 2018
Posts: 1

PostPosted: Fri Dec 28, 2018 6:28 pm    Post subject: Assembly Script not changing value at offset Reply with quote

I have an OP code that controls HP for all npcs in the game. I'm trying to use code injection to change a value at an offset for all npcs.

This is the original opcode that all HP passes through
Code:
comiss xmm10,[rdi+00000FD8]


This is my script where I'm trying to change a value at the offset E8 to the value 3. It is a 4byte address.
Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048,"hitman2.exe"+58F9DB3)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov [rdi+E8],3
jmp exit

originalcode:
comiss xmm10,[rdi+00000FD8]

exit:
jmp returnhere

"hitman2.exe"+58F9DB3:
jmp newmem
nop
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"hitman2.exe"+58F9DB3:
comiss xmm10,[rdi+00000FD8]
//Alt: db 44 0F 2F 97 D8 0F 00 00



The offset I found was with taking a bunch of addresses from the health opcode and comparing them all with dissect structure

Any help is appreciated. I'm not sure what I'm doing wrong or what to even search google for without being too general.
Back to top
View user's profile Send private message
jungletek
Advanced Cheater
Reputation: 0

Joined: 02 Oct 2011
Posts: 72

PostPosted: Wed Jan 02, 2019 9:45 am    Post subject: Reply with quote

Your original code never executes, you move 3 into [rdi+E8] and then you jump to the exit. Is this intentional?

What are you trying to do? I have Hitman 2 so maybe I can help...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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