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 


Asking for feedback on my 1st StealthEdit scripts, plz

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

Joined: 30 Jan 2023
Posts: 155

PostPosted: Wed Dec 13, 2023 2:56 am    Post subject: Asking for feedback on my 1st StealthEdit scripts, plz Reply with quote

I got Stealth Edit working with CE 7.5 and wrote a couple scripts that are working nicely but I was wondering if this is the most efficient way to write them before I continue making more.

My understanding is that if you disable a Stealth Edit script, you can't re-enable it again until you restart the game (per the original SE post). I think this applies to both AA options stealthedit and stealtheditex, correct? If this is NOT the case and I can just toggle it freely using stealtheditex or some other way, please let me know. Otherwise, since I want to be able to toggle scripts on and off, I had to use two scripts so the SE script never needs to be disabled or re-enabled.

These work for what I want in the game, but please take a look and let me know how I can improve them.

First script, enable SE where I will need it:
Code:
[ENABLE]
stealtheditex(seww1,game.exe+10837B1,1)
registersymbol(scopy1)
label(scopy1)

seww1:
scopy1:

stealtheditex(seww2,game.exe+10860FE,1)
registersymbol(scopy2)
label(scopy2)

seww2:
scopy2:

[DISABLE]



Second script, now I can toggle my desired changes on/off:
Code:
[ENABLE]
scopy1:
 db EB

scopy2:
db 90 90 90

[DISABLE]
scopy1:
  db 74

{
// ORIGINAL CODE - INJECTION POINT: game.exe+10835A1

game.exe+108357E: 48 83 C0 30           - add rax,30
game.exe+1083582: 41 83 F9 03           - cmp r9d,03
game.exe+1083586: 72 EE                 - jb game.exe+1083576
game.exe+1083588: 41 FF C2              - inc r10d
game.exe+108358B: 48 81 C2 D0 00 00 00  - add rdx,000000D0
game.exe+1083592: 41 83 FA 02           - cmp r10d,02
game.exe+1083596: 72 D8                 - jb game.exe+1083570
game.exe+1083598: 66 83 FF FF           - cmp di,-01
game.exe+108359C: 74 42                 - je game.exe+10835E0
game.exe+108359E: 83 FD 02              - cmp ebp,02
// ---------- INJECTING HERE ----------
game.exe+10835A1: 74 0C                 - je game.exe+10835AF
// ---------- DONE INJECTING  ----------
game.exe+10835A3: 0F B7 CF              - movzx ecx,di
game.exe+10835A6: E8 15 C1 3B FF        - call game.exe+43F6C0
game.exe+10835AB: 3B C5                 - cmp eax,ebp
game.exe+10835AD: 75 31                 - jne game.exe+10835E0
game.exe+10835AF: 8B 96 3C 06 00 00     - mov edx,[rsi+0000063C]
game.exe+10835B5: 85 D2                 - test edx,edx
game.exe+10835B7: 74 23                 - je game.exe+10835DC
game.exe+10835B9: 4C 8B 86 28 06 00 00  - mov r8,[rsi+00000628]
game.exe+10835C0: 8B C3                 - mov eax,ebx
game.exe+10835C2: 48 6B C8 58           - imul rcx,rax,58
}
scopy2:
  db 44 8B D8

{
// ORIGINAL CODE - INJECTION POINT: game.exe+1085EEE

game.exe+1085ED1: 74 0D                 - je game.exe+1085EE0
game.exe+1085ED3: 66 3B CE              - cmp cx,si
game.exe+1085ED6: 77 08                 - ja game.exe+1085EE0
game.exe+1085ED8: 42 80 7C 12 0A 04     - cmp byte ptr [rdx+r10+0A],04
game.exe+1085EDE: 77 09                 - ja game.exe+1085EE9
game.exe+1085EE0: FF C0                 - inc eax
game.exe+1085EE2: 41 3B C1              - cmp eax,r9d
game.exe+1085EE5: 72 D9                 - jb game.exe+1085EC0
game.exe+1085EE7: EB 08                 - jmp game.exe+1085EF1
game.exe+1085EE9: E8 D2 97 3B FF        - call game.exe+43F6C0
// ---------- INJECTING HERE ----------
game.exe+1085EEE: 44 8B D8              - mov r11d,eax
// ---------- DONE INJECTING  ----------
game.exe+1085EF1: 48 8B 74 24 30        - mov rsi,[rsp+30]
game.exe+1085EF6: 48 8B 0B              - mov rcx,[rbx]
game.exe+1085EF9: 45 8B C3              - mov r8d,r11d
game.exe+1085EFC: 0F B7 D7              - movzx edx,di
game.exe+1085EFF: 4C 8B 89 98 06 00 00  - mov r9,[rcx+00000698]
game.exe+1085F06: 48 8B CB              - mov rcx,rbx
game.exe+1085F09: 48 8B 5C 24 38        - mov rbx,[rsp+38]
game.exe+1085F0E: 48 83 C4 20           - add rsp,20
game.exe+1085F12: 5F                    - pop rdi
game.exe+1085F13: 49 FF E1              - jmp r9
}


Is there anything I should change or could improve on with these? I'm basically going to expand on this idea with many more codes if this is the most efficient way.
Back to top
View user's profile Send private message
Autem
Expert Cheater
Reputation: 1

Joined: 30 Jan 2023
Posts: 155

PostPosted: Thu Dec 14, 2023 9:07 pm    Post subject: Reply with quote

Just a quick update. When I started to expand on the above idea with more cheats using CE 7.5, I started running into crashes in a couple select areas. I went back to trying full module copy with CE 7.5 and also got crashes.

After more testing it turns out I'm having the best luck with a full module copy rather than small region, but I have to use to CE 6.7 in order to get the full module copy to work without a crash.

Not sure if there's anything more that can be done for my situation other than to just stick with 6.7. Good news is it's working perfectly with 6.7 even after I added a lot of codes to really test it out. I am still open to suggestions for getting it working with more recent versions of CE, but either way, I figured I'd document my experience here in case it helps anyone else down the line too.
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 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