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 


Need help with this script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> Auto Assembler tutorials
View previous topic :: View next topic  
Author Message
TurtleMountain
How do I cheat?
Reputation: 0

Joined: 10 Feb 2018
Posts: 6

PostPosted: Sat Feb 10, 2018 1:14 pm    Post subject: Need help with this script Reply with quote

How would I add a pointer and change the value of the address being pointed to in this script? I've been messing around in CE out of boredom but I can't seem to figure it out.

Code:
[ENABLE]
aobscan(stopupdate, 89 51 1C 5D C3)
label(_stopupdate)
registersymbol(_stopupdate)

stopupdate:
_stopupdate:
nop
nop
nop

[DISABLE]
unregistersymbol(_stopupdate)
_stopupdate:
db 89 51 1C
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 19

Joined: 24 Feb 2017
Posts: 529
Location: 'Merica

PostPosted: Sat Feb 10, 2018 3:00 pm    Post subject: Reply with quote

That is only NOPing the instructions, you would need to do whats referred to as a full injection, and then change the value.

Code:


define(address, Tutorial-i386.exe+2481F)
define(step4Bytes, D9 9E 94 04 00 00)

////
//// ------------------------------ ENABLE ------------------------------
[ENABLE]
aobScanModule(aobStep4Hook, Tutorial-i386.exe, DBxxxxDBxxxxxxxxD9xxxxD9xxxxD8xxxxxxxxxxD9xxxxxxxxxxFFxxxxxxxxxx8DxxxxxxB9xxxxxxxxBAxxxxxxxxB8xxxxxxxx)
define(injStep4Hook, aobStep4Hook+14)
assert(injStep4Hook, step4Bytes)
registerSymbol(injStep4Hook)

alloc(memStep4Hook, 0x400, injStep4Hook)

label(ptrStep4Hook)
registerSymbol(ptrStep4Hook)

label(step4n_code)
label(step4o_code)
label(step4exit)
label(step4return)

memStep4Hook:
   dq (double)5000
   align 10 CC
   ptrStep4Hook:
      dd 0
   align 10 CC
   step4n_code:
      mov [ptrStep4Hook],esi
      fstp st(0)
      mov [esi+494],(float)5000
      fld qword ptr [memStep4Hook]
      fstp qword ptr [esi+498]
   step4o_code:
      // fstp dword ptr [esi+00000494]
   step4exit:
      jmp step4return


////
//// ---------- Injection Point ----------
injStep4Hook:
   jmp step4n_code
   nop
   step4return:


////
//// ------------------------------ DISABLE ------------------------------
[DISABLE]
////
//// ---------- Injection Point ----------
injStep4Hook:
   db step4Bytes

unregisterSymbol(injStep4Hook)

unregisterSymbol(ptrStep4Hook)

dealloc(memStep4Hook)

This is step 4 of the CE tutorial.

_________________
Back to top
View user's profile Send private message
TurtleMountain
How do I cheat?
Reputation: 0

Joined: 10 Feb 2018
Posts: 6

PostPosted: Sun Feb 11, 2018 6:05 pm    Post subject: Reply with quote

TheyCallMeTim13 wrote:
That is only NOPing the instructions, you would need to do whats referred to as a full injection, and then change the value.

I probably should've phrased the question better. The problem i'm having is this part:
Code:
mov [ptrStep4Hook],esi

For example, when I do:
Code:
mov [THREADSTACK0-258],ecx

It becomes 00C9FCD4 instead of 00F7FCB8 which is what I need for the pointer right?

I attached a couple screenshots since it wont let me post links.



Pointer.PNG
 Description:
pointer
 Filesize:  12.36 KB
 Viewed:  3900 Time(s)

Pointer.PNG



Capture.PNG
 Description:
Memory view
 Filesize:  46.22 KB
 Viewed:  3900 Time(s)

Capture.PNG


Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 19

Joined: 24 Feb 2017
Posts: 529
Location: 'Merica

PostPosted: Sun Feb 11, 2018 6:31 pm    Post subject: Reply with quote

Why the "[THREADSTACK0-258]"? Is "THREADSTACK0" and "THREADSTACK0-258" in memory you allocated? Is the code in memory you allocated?

I tend to stay away from "THREADSTACK" based pointers. It's been a while but I want to say those just aren't really static or some thing like that.

_________________
Back to top
View user's profile Send private message
TurtleMountain
How do I cheat?
Reputation: 0

Joined: 10 Feb 2018
Posts: 6

PostPosted: Mon Feb 12, 2018 7:09 am    Post subject: Reply with quote

Yeah I have no idea lol. I'm no expert and mostly just play around with CE when i'm bored. Every time I look for pointers in this game called Stardew Valley I end up with around less than 20 or so and they're all THREADSTACK0s. I read somewhere that the game was made from C# and XNA, so maybe its because the game is a mix of managed and unmanaged code, but I dunno.
Back to top
View user's profile Send private message
TheyCallMeTim13
Wiki Contributor
Reputation: 19

Joined: 24 Feb 2017
Posts: 529
Location: 'Merica

PostPosted: Mon Feb 12, 2018 8:24 am    Post subject: Reply with quote

I would say if you're using the pointer scanner then increasing the levels should help, but I prefer to use injections and hooks. Just check out the CE tutorial in the CE main from Help Menu, for the basics of code injection. Then in your injected code you can just store an address.
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Tutorials -> Auto Assembler tutorials 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