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 Issue

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun May 29, 2016 3:26 pm    Post subject: Assembly Issue Reply with quote

Hey there, so I'm really new to Assembly I read some Tut and watched videos about it, I got the basics but I want to understand why this script of mine keeps changing every time I open the game

Originalcode:

mov [rax+18],ecx
mov rax,[rdi+10]
jmp return

My New code was adding

mov [rax+18],(int)999


In the end the code looks like that

//mov [rax+18],ecx
mov [rax+18],(int)999
mov rax,[rdi+10]
jmp return
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Sun May 29, 2016 3:31 pm    Post subject: Reply with quote

And now what exactly is your problem with this script???
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Sun May 29, 2016 3:33 pm    Post subject: Reply with quote

Because the instructions are not using static address and its being created on runtime ?. Rolling Eyes

Template -> AOB Injection

_________________
...
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun May 29, 2016 3:35 pm    Post subject: Reply with quote

My problem is that the script is not working as it should while I restart the game, can someone explain me what I need to do like step by step please ?

Or direct me to a specific guide for that ?

Yes AOB Injection used and unity game too.
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Sun May 29, 2016 3:47 pm    Post subject: Reply with quote

Could you please post the whole script? Because AOB-Injection should do for you but it's hard to figure out a problem without seeing the content.
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun May 29, 2016 3:54 pm    Post subject: Reply with quote

Code:
[ENABLE]

aobscan(Items,89 48 18 48 8B 47 10 48) // should be unique
alloc(newmem,$100,6B38102C)

label(code)
label(return)

newmem:

code:
  //mov [rax+18],ecx
  mov [rax+18],(int)999
  mov rax,[rdi+10]
  jmp return

Items:
  jmp code
  nop
  nop
return:
registersymbol(Items)

[DISABLE]

Items:
  db 89 48 18 48 8B 47 10

unregistersymbol(Items)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: 6B38102C

""+6B381002: 48 8B 47 10                    -  mov rax,[rdi+10]
""+6B381006: 48 63 8F 94 00 00 00           -  movsxd  rcx,dword ptr [rdi+00000094]
""+6B38100D: 48 63 C9                       -  movsxd  rcx,ecx
""+6B381010: 39 48 18                       -  cmp [rax+18],ecx
""+6B381013: 0F 86 14 01 00 00              -  jbe 6B38112D
""+6B381019: 48 8D 44 C8 20                 -  lea rax,[rax+rcx*8+20]
""+6B38101E: 48 8B 00                       -  mov rax,[rax]
""+6B381021: 48 8B 40 18                    -  mov rax,[rax+18]
""+6B381025: 48 63 48 18                    -  movsxd  rcx,dword ptr [rax+18]
""+6B381029: 2B 4D E0                       -  sub ecx,[rbp-20]
// ---------- INJECTING HERE ----------
""+6B38102C: 89 48 18                       -  mov [rax+18],ecx
""+6B38102F: 48 8B 47 10                    -  mov rax,[rdi+10]
// ---------- DONE INJECTING  ----------
""+6B381033: 48 63 8F 94 00 00 00           -  movsxd  rcx,dword ptr [rdi+00000094]
""+6B38103A: 48 63 C9                       -  movsxd  rcx,ecx
""+6B38103D: 39 48 18                       -  cmp [rax+18],ecx
""+6B381040: 0F 86 D0 00 00 00              -  jbe 6B381116
""+6B381046: 48 8D 44 C8 20                 -  lea rax,[rax+rcx*8+20]
""+6B38104B: 48 8B 00                       -  mov rax,[rax]
""+6B38104E: 48 8B 40 18                    -  mov rax,[rax+18]
""+6B381052: 48 63 40 18                    -  movsxd  rax,dword ptr [rax+18]
""+6B381056: 85 C0                          -  test eax,eax
""+6B381058: 40 0F 9F C0                    -  setg al
}
[/code]
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Sun May 29, 2016 4:27 pm    Post subject: Reply with quote

2 possible reasons:

1. code create on runtimes, so , you have to do something like opening the inventory/etc to dump the code before activation of script.

2. wrong injection location which maybe, the aobscan not unique enough. You can check this by scanning that aob signature eg: Value type set to Array of byte -> copy & paste the aob signature into the value to scan bar -> gray out all the protection eg:Writable/Executable/CopyOnWrite -> Scan -> if there're more than a result, make sure the first result is the right injection point -> else, make the aob signature longer/more unique.

_________________
...
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Sun May 29, 2016 4:37 pm    Post subject: Reply with quote

I have fixed it!, thank you for yout help both of you Razz
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun May 29, 2016 9:12 pm    Post subject: Reply with quote

When creating your scripts, in order to ensure that CE generates a more reliable AOB signature, it is better to not have any other scripts activated during that time, otherwise, the signature that CE generates for you may not be unique.
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Mon May 30, 2016 5:07 am    Post subject: Reply with quote

Oh I'll remember that, but yea this one was the only Script I was working on at the time nothing else, I will also have some time working on health, the issue about the Health is that the Address is sub the HP from AI's too, I tried using the Dissect data to find Different Values/Groups whatever but unfortunately did not worked.
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