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 


Aobscanmodule - pointer

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

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 31, 2014 9:32 am    Post subject: Aobscanmodule - pointer Reply with quote

i want to save address of [rdi+00000170] into _player so i can set offset to it later but i dont know why i get wrong address so even if i had offset it points to the wrong value

real value is 200 and i can change it
with my code i get a value of 200 but the other dosent change if i change this value

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048,"Disrupt_b64.dll"+6F1B6E)
globalalloc(_player,32)
label(returnhere)
label(originalcode)
label(exit)
label(_ntr)
registersymbol(_ntr)
aobscanmodule(ntr,Disrupt_b64.dll,8B 87 ?? ?? ?? ?? 44 89 9F ?? ?? ?? ??)

newmem:
mov [_player],r11d // not allowing me to do lea it says cant be compiled
originalcode:
mov [rdi+00000170],r11d

exit:
jmp returnhere

ntr+6:
_ntr:
jmp newmem
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
dealloc(_player)
_ntr:
mov [rdi+00000170],r11d
unregistersymbol(_ntr)
unregistersymbol(_player)
//Alt: db 44 89 9F 70 01 00 00
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 892

PostPosted: Sat May 31, 2014 10:40 am    Post subject: Reply with quote

just mov [yourmem],rdi and add [yourmem]+170 to your addresslist.
_________________
A nagy kapu mellett, mindig van egy kis kapu.
----------------------
Come on...
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 31, 2014 11:12 am    Post subject: Reply with quote

still wrong value Sad
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: Sat May 31, 2014 12:20 pm    Post subject: Reply with quote

Are you using an intermediate register to use load effective address?

lea eax,[something+offset]
mov [player],eax

It's something easily forgotten as you can't load mov(e) [value],[value].

_________________
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
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 31, 2014 12:54 pm    Post subject: Reply with quote

Sorry i'm still newbie

intermediate register?

i was using esi
but i just changed it to eax and it now allows the lea command

output of eax is 422113736 and its suppose to be 12500

Update !!!

Woot it works if you do it with a pointer instead of saying _player+170

[X]Pointer
[170]
[_player]

whats the difference?
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: Sat May 31, 2014 1:56 pm    Post subject: Reply with quote

The pointer takes the value inside your designated variable and then you set the offset to that address.
When you set it directly without a pointer it takes the address of your variable in stead of what's inside it.

With intermediate register I meant a register you use (temporarily) in stead of directly.

lea [_player],[rdi+00000170] - directly, this will fail.

lea eax,[rdi+00000170]
mov [_player],eax - using eax as a intermediate (in between) register

I'm glad to see you've got it working, I'll add your script to the compilation table for Watch Dogs.

_________________
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
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 31, 2014 3:12 pm    Post subject: Reply with quote

I mean like this.
1 works but 2 dosent whats the matter isnt it basically the same thing?



Capture.PNG
 Description:
 Filesize:  9.96 KB
 Viewed:  18854 Time(s)

Capture.PNG


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: Sat May 31, 2014 4:03 pm    Post subject: Reply with quote

That's what I explained.

1. Takes the value of _player and uses +a8 as offset = address.

2. Uses _player itself (not the value inside it) and uses +a8 as offset = address.

Also, take a look at your other topic in this section. I believe I've got a proper God Mode working.

_________________
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
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 31, 2014 5:10 pm    Post subject: Reply with quote

Sorry to ask stupidly

but what u mean _player itself

just what did i store inside it address?

[eax] = value?
eax = address?

also i'm on to something big Very Happy

read my next topic Very Happy
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: Sat May 31, 2014 5:51 pm    Post subject: Reply with quote

Yes.

If:

EAX is 123456
and EAX contains 777777.

Then:

EAX = 123456
[EAX] = 777777

Smile

_________________
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
Polynomial
Grandmaster Cheater
Reputation: 5

Joined: 17 Feb 2008
Posts: 524
Location: Inside the Intel CET shadow stack

PostPosted: Sat May 31, 2014 6:34 pm    Post subject: This post has 2 review(s) Reply with quote

To make it clearer, [eax] means "the memory at the address contained in eax". This is called a pointer dereference.

So if eax is 04001234, then:


  • mov [eax], 666 sets the memory at 04001234 to 666
  • mov eax, 666 just sets the value of eax to 666


What Daijobu means is that your first example takes the value inside the _player pointer (it dereferences the pointer) and adds 0xA8 to it, whereas your second example takes the address of _player (i.e. where the pointer is stored, not where the pointer points to) and adds 0xA8 to it.

_________________
It's not fun unless every exploit mitigation is enabled.
Please do not reply to my posts with LLM-generated slop; I consider it to be an insult to my time.
Back to top
View user's profile Send private message
NanoByte
Expert Cheater
Reputation: 1

Joined: 13 Sep 2013
Posts: 222

PostPosted: Sat May 31, 2014 8:07 pm    Post subject: Reply with quote

Ohh, Thanks Guys Very Happy

i really appreciate it Very Happy
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