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 


Auto Assembler Help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
user5594
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2014
Posts: 72
Location: ::1

PostPosted: Wed Mar 16, 2016 1:52 am    Post subject: Auto Assembler Help Reply with quote

I have a game that I have been trying to make a one hit kill for but it is VERY frustrating because it does something weird with 6 different health addresses. The instruction that modifies health is "mov [eax+7C],ecx" but the problem is that this applies to the player and all enemies.

Is there a way to nop (db 90) this code if the address it's writing to is a certain value?
Essentially, I want to check if the value it's writing to is equal to exactly 1700 (my health). If yes, nop it. If no, then the "ecx" value will be 0.

I would REALLY appreciate this as it's the only decent solution I've thought of but I'm not sure how to implement it Sad
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Wed Mar 16, 2016 2:23 am    Post subject: Reply with quote

find a way to distinguish between your and the enemies memory.

find out the addresses that instruction accesses and hurt a few enemies. (don't kill them)
then do a dissect data on the base addresses (so -7c). Compare their data with the data of your own character, and check if there is a way to distinguish between them

then in your code injection check for that identifier and skip the original code if it's you, or else execute the original code (or even set their health to 0 or negative to make a 1 hit kill)


(step 9 of the tutorial describes this)

_________________
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
user5594
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2014
Posts: 72
Location: ::1

PostPosted: Wed Mar 16, 2016 9:44 am    Post subject: Reply with quote

Dark Byte wrote:
find a way to distinguish between your and the enemies memory.

find out the addresses that instruction accesses and hurt a few enemies. (don't kill them)
then do a dissect data on the base addresses (so -7c). Compare their data with the data of your own character, and check if there is a way to distinguish between them

then in your code injection check for that identifier and skip the original code if it's you, or else execute the original code (or even set their health to 0 or negative to make a 1 hit kill)


(step 9 of the tutorial describes this)


Thanks for this reply! I knew about this method but I couldn't get it to work for the life of me. Totally forgot that this was in the Cheat Engine tutorial; I'll give it another try and check back in! Smile

------------------------------Edit:------------------------------
OK, I studied Tutorial 9 and understood it but my game looks a little different.
Here's what I have so far:

Instruction that modifies lots of values
Code:
mov [eax+7C],ecx


Data Structure - Group 1 (Me + Friendly), Group 2 (3 enemies)


How do I know what to choose as the injection point for the auto assembler? I coundn't find anything like "fsub" in the tutorial (the value for health in this game is also float). I tried auto assembling at the original "mov [eax+7C],ecx" with this script, but I get an instant crash:
Code:
[ENABLE]

aobscanmodule(OHK,Template.exe,89 48 7C F3 0F 11 80 80 00 00 00 EB)
alloc(newmem,$1000)

label(newcode)
label(originalcode)
label(return)

newmem:

newcode:
  cmp [ecx+400],15
  je originalcode
  mov [eax+7C],ecx
  movss [eax+00000080],xmm0
  jmp return

originalcode:
  mov [eax+7C],ecx
  movss [eax+00000080],xmm0
  jmp return

OHK:
  jmp newcode
  nop
  nop
  nop
  nop
  nop
  nop
return:
registersymbol(OHK)

[DISABLE]

OHK:
  db 89 48 7C F3 0F 11 80 80 00 00 00

unregistersymbol(OHK)
dealloc(newmem)


Sorry if my code makes me look stupid; I am still learning even though I have been using Cheat Engine for a while now!
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