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 


help opcode aobscan with dynamic address

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

Joined: 13 Jul 2015
Posts: 3

PostPosted: Mon Jul 13, 2015 7:51 am    Post subject: help opcode aobscan with dynamic address Reply with quote

If you look at sample code below, there is mov [00E16218],F and mov [00E1621C],F . 00E16218 and 00E1621C is dynamic, so how to make it ... well "searchable" so my aobscan can work?


Code:


[ENABLE]
aobscan(INJECT_reset_tooltilereach,3B 05 ?? ?? ?? ?? 75 14 C7 05 ?? ?? ?? ?? 05 00 00 00) // should be unique
alloc(newmem,$1000)

globalalloc(xTileR,10)
globalalloc(yTileR,10)

label(code)
label(return)

xTileR:
dd 0

yTileR:
dd 0

newmem:

code:

   mov [00E16218],F
   mov [00E1621C],F

  //cmp eax,[00E15954] //we just skip this since we forced it to edit
  jmp INJECT_reset_tooltilereach+1c //force jump
  jmp return

INJECT_reset_tooltilereach:
  jmp code
  nop
return:
registersymbol(INJECT_reset_tooltilereach)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
INJECT_reset_tooltilereach:
  db 3B 05 54 59 E1 00

unregistersymbol(INJECT_reset_tooltilereach)
dealloc(newmem)
dealloc(xTileR)
dealloc(yTileR)

{
// ORIGINAL CODE - INJECTION POINT: 1E3536BC

1E3536A5: 7E 12                          -  jle 1E3536B9
1E3536A7: 8B 79 04                       -  mov edi,[ecx+04]
1E3536AA: 3B F7                          -  cmp esi,edi
1E3536AC: 73 3D                          -  jae 1E3536EB
1E3536AE: 33 C0                          -  xor eax,eax
1E3536B0: 89 44 B1 08                    -  mov [ecx+esi*4+08],eax
1E3536B4: 46                             -  inc esi
1E3536B5: 3B DE                          -  cmp ebx,esi
1E3536B7: 7F F1                          -  jg 1E3536AA
1E3536B9: 8B 42 08                       -  mov eax,[edx+08]
// ---------- INJECTING HERE ----------
1E3536BC: 3B 05 54 59 E1 00              -  cmp eax,[00E15954]
// ---------- DONE INJECTING  ----------
1E3536C2: 75 14                          -  jne 1E3536D8
1E3536C4: C7 05 18 62 E1 00 05 00 00 00  -  mov [00E16218],00000005
1E3536CE: C7 05 1C 62 E1 00 04 00 00 00  -  mov [00E1621C],00000004
1E3536D8: 8B 8A D8 00 00 00              -  mov ecx,[edx+000000D8]
1E3536DE: 39 09                          -  cmp [ecx],ecx
1E3536E0: FF 15 40 6C 45 06              -  call dword ptr [06456C40]
1E3536E6: 5B                             -  pop ebx
1E3536E7: 5E                             -  pop esi
1E3536E8: 5F                             -  pop edi
1E3536E9: 5D                             -  pop ebp
}
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Mon Jul 13, 2015 3:19 pm    Post subject: Reply with quote

Find out what writes (not writes to) 00E16218 and 00E1621C and hook at that point. Store generated addresses and use these as pointers.
_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Mon Jul 13, 2015 3:49 pm    Post subject: Reply with quote

reassemble(address) is useful here
_________________
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
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Mon Jul 13, 2015 5:04 pm    Post subject: Reply with quote

Does this work?
Code:
mov ecx,[INJECT_reset_tooltilereach+A]
mov [ecx],F
mov ecx,[INJECT_reset_tooltilereach+14]
mov [ecx],F


Should also be able to add those values as pointers in your table.
INJECT_reset_tooltilereach+A
INJECT_reset_tooltilereach+14
Back to top
View user's profile Send private message
RendakDewo
How do I cheat?
Reputation: 0

Joined: 13 Jul 2015
Posts: 3

PostPosted: Mon Jul 13, 2015 5:24 pm    Post subject: Reply with quote

Dark Byte wrote:
reassemble(address) is useful here


do you have tutorial for these "reassemble(address)"?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

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

PostPosted: Mon Jul 13, 2015 6:25 pm    Post subject: Reply with quote

let's say you do an aobscan for 8B 42 08 3B 05 ?? ?? ?? ?? 75 14 and do the actual hook at 3b 05 ?? ?? ?? ??

Now you'd want to save the original instruction, and for that you use reassemble(address)

e.g:
Code:

aobscan(bla,8B 42 08 3B 05 ?? ?? ?? ?? 75 14)
alloc(newmem,1024)
label(originalcode)
label(returnhere)

newmem:
//do stuff
originalcode:
reassemble(bla+4)

//do other stuff
jmp returnhere

bla+4:
jmp newmem
nop

returnhere:

_________________
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
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Tue Jul 14, 2015 2:55 am    Post subject: Reply with quote

@DB

bla+3

_________________
Back to top
View user's profile Send private message MSN Messenger
Rudo
Advanced Cheater
Reputation: 2

Joined: 27 Jun 2015
Posts: 80

PostPosted: Tue Jul 14, 2015 3:04 am    Post subject: Reply with quote

@DB
This is the very first time I see you posted something wrong haha
It should be bla+3
Back to top
View user's profile Send private message
RendakDewo
How do I cheat?
Reputation: 0

Joined: 13 Jul 2015
Posts: 3

PostPosted: Wed Jul 15, 2015 7:08 am    Post subject: Reply with quote

yup thanks for the help, today I randomly search around and found this tutorial from Rydian in forum.cheatengine.org/viewtopic.php?t=572465 (ahahaha I can't post url?), and looks good on my problem. so my final code something like this
Code:

[ENABLE]
aobscan(INJECT_blockP, 3B 05 ?? ?? ?? ?? 75 14 C7 05 ?? ?? ?? ??)

label(_xblockP)
label(_yblockP)

registersymbol(_xblockP)
registersymbol(_yblockP)

INJECT_blockP+8:
_xblockP:

INJECT_blockP+12:
_yblockP:


[DISABLE]
unregistersymbol(_xblockP)
unregistersymbol(_yblockP)


and add address manually, and put _xblockP+6 and _yblockP+6 as normal address 4 bytes, and done, now I can edit it as I want.


@Daijobu :: yeah, that's what Im thinking, but how to do that in CE? since at first I do not understand from just reading Rydian's tutorial. Embarassed forgot to mention that my skill is limited X)
@Zanzer :: nope, throwing a warning, saying it cannot inject or something, but thanks for trying to help me.
@Dark Byte :: wow interesting, I'll try your method too. thanks for the info.
@mgr.inz.Player and @Rudo-kun :: ahahaha no worries, make mistake once in a while is normal Razz
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