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 


Assembler sytax for Code Injection help

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

Joined: 18 Dec 2017
Posts: 2

PostPosted: Mon Dec 18, 2017 12:16 pm    Post subject: Assembler sytax for Code Injection help Reply with quote

Hey,

I've been trying to make a small cheat table for a game called Nuclear Throne, apparently in the game there are multiple different types of damage and i managed to pinpoint all of them and made "infinite hp" scripts for all, only problem is, one of them gives infinite hp to enemies as well. I did the usual struct dissection and found a 4-bit value consistently same among players and different on enemies (players all 5, enemies all 0)

my problem is the syntax of the code to use to distinguish the player from the enemy and give infinite hp to player only. i did experiment for a long time, hopefully someone experienced can help me properly use cmp function

This is the original code :

*******************************

label(code)
label(return)

newmem:

code:
movsd [ebx],xmm1
jmp nuclearthrone.exe+1C2CD4
jmp return

HP4:
jmp newmem
nop
return:
registersymbol(HP4)


******************************


[ebx] is address of HP, i found address of differentiating type is [ebx+1C], where 5 is player and 0 is enemy. can someone help me code the syntax.



also, what i normally do is:


********************************

label(code)
label(return)

newmem:

code:
nop
nop
nop
nop
jmp nuclearthrone.exe+1C2CD4
jmp return

HP4:
jmp newmem
nop
return:
registersymbol(HP4)

**********************************

this nullifies the code but gives enemy infinite hp
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 9

Joined: 01 Feb 2016
Posts: 867

PostPosted: Mon Dec 18, 2017 2:04 pm    Post subject: Reply with quote

TrollerForever wrote:
I did the usual struct dissection and found a 4-bit value consistently same among players and different on enemies (players all 5, enemies all 0)

you meant 4-byte value? if so then:

Code:
label(code)
label(return)

newmem:
cmp byte ptr [ebx+1C],05
jz nuclearthrone.exe+1C2CD4

code:
movsd [ebx],xmm1
jmp nuclearthrone.exe+1C2CD4
jmp return

HP4:
jmp newmem
nop
return:
registersymbol(HP4)

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
patched cheat engine tutorials
Memory Hacker
Back to top
View user's profile Send private message Visit poster's website
TrollerForever
How do I cheat?
Reputation: 0

Joined: 18 Dec 2017
Posts: 2

PostPosted: Tue Dec 19, 2017 2:38 am    Post subject: Reply with quote

thanks for the help,

how is jz different from jmp?
Back to top
View user's profile Send private message
aeree
Cheater
Reputation: 3

Joined: 23 Jan 2010
Posts: 42
Location: Germany

PostPosted: Tue Dec 19, 2017 3:37 am    Post subject: Reply with quote

TrollerForever wrote:
thanks for the help,

how is jz different from jmp?


jz is a conditional jump and jmp is not

_________________
1 + 1 =
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 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