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 


stalker:COC cant disable aob script+can i optimize it?

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

Joined: 03 Sep 2014
Posts: 112

PostPosted: Sun Apr 12, 2020 5:09 pm    Post subject: stalker:COC cant disable aob script+can i optimize it? Reply with quote

hi all
the script works perfectly but I can't disable it!!

Code:
{ Game   : xrEngine.exe
  Version:
  Date   : 2020-04-13
  Author : shetal

  This script does blah blah blah
}

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat

 
 
aobscanmodule(INJECT,xrGame.dll,8B 40 14 5E C2 08 00 33 C0 5E C2 08 00 CC CC CC A1) // should be unique
alloc(newmem,$1000)

label(code)
label(return)
label(do)


newmem:
mov [GWbase],eax
cmp [loner],1
jne @F
cmp [eax+10],9
jne @F
mov eax,7d0
mov [loner],0
jmp do

@@:
cmp [duty],1
jne @F
cmp [eax+10],2
jne @F
mov eax,7d0
mov [duty],0
jmp do

@@:
cmp [freedom],1
jne @F
cmp [eax+10],4
jne @F
mov eax,7d0
mov [freedom],0
jmp do

@@:
cmp [clearsky],1
jne @F
cmp [eax+10],B
jne @F
mov eax,7d0
mov [clearsky],0
jmp do

@@:
cmp [ecologist],1
jne @F
cmp [eax+10],3
jne @F
mov eax,7d0
mov [ecologist],0
jmp do

@@:
cmp [mercenary],1
jne @F
cmp [eax+10],5
jne @F
mov eax,7d0
mov [mercenary],0
jmp do

@@:
cmp [military],1
jne @F
cmp [eax+10],6
jne @F
mov eax,7d0
mov [military],0
jmp do

@@:
cmp [bandit],1
jne @F
cmp [eax+10],1
jne @F
mov eax,7d0
mov [bandit],0
jmp do

@@:
cmp [monolith],1
jne code
cmp [eax+10],7
jne code
mov eax,7d0
mov [monolith],0
jmp do


code:
  mov eax,[eax+14]
do:
  push ebx
  mov ebx,[GWbase]
  mov [ebx+14],eax
  pop ebx
  pop esi
  ret 0008
  jmp return


loner:
db 00
duty:
db 00
freedom:
db 00
clearsky:
db 00
ecologist:
db 00
mercenary:
db 00
military:
db 00
bandit:
db 00
monolith:
db 00
GWbase:
dd 00

INJECT:
  jmp newmem
  nop
  nop
return:
registersymbol(GWbase)
registersymbol(loner)
registersymbol(duty)
registersymbol(freedom)
registersymbol(clearsky)
registersymbol(ecologist)
registersymbol(mercenary)
registersymbol(military)
registersymbol(bandit)
registersymbol(monolith)


[DISABLE]
//code from here till the end of the code will be used to disable the cheat
INJECT:
  db 8B 40 14 5E C2 08 00
dealloc(newmem)


{
// ORIGINAL CODE - INJECTION POINT: "xrGame.dll"+40BCE0

"xrGame.dll"+40BCC4: 8D 70 10              -  lea esi,[eax+10]
"xrGame.dll"+40BCC7: 8D 44 24 08           -  lea eax,[esp+08]
"xrGame.dll"+40BCCB: 8B CE                 -  mov ecx,esi
"xrGame.dll"+40BCCD: 50                    -  push eax
"xrGame.dll"+40BCCE: 8D 44 24 10           -  lea eax,[esp+10]
"xrGame.dll"+40BCD2: 50                    -  push eax
"xrGame.dll"+40BCD3: E8 18 20 CD FF        -  call xrGame.dll+DDCF0
"xrGame.dll"+40BCD8: 8B 44 24 0C           -  mov eax,[esp+0C]
"xrGame.dll"+40BCDC: 39 06                 -  cmp [esi],eax
"xrGame.dll"+40BCDE: 74 07                 -  je xrGame.dll+40BCE7
// ---------- INJECTING HERE ----------
"xrGame.dll"+40BCE0: 8B 40 14              -  mov eax,[eax+14]
"xrGame.dll"+40BCE3: 5E                    -  pop esi
"xrGame.dll"+40BCE4: C2 08 00              -  ret 0008
// ---------- DONE INJECTING  ----------
"xrGame.dll"+40BCE7: 33 C0                 -  xor eax,eax
"xrGame.dll"+40BCE9: 5E                    -  pop esi
"xrGame.dll"+40BCEA: C2 08 00              -  ret 0008
"xrGame.dll"+40BCED: CC                    -  int 3
"xrGame.dll"+40BCEE: CC                    -  int 3
"xrGame.dll"+40BCEF: CC                    -  int 3
"xrGame.dll"+40BCF0: A1 8C 89 C8 09        -  mov eax,[xrGame.dll+79898C]
"xrGame.dll"+40BCF5: 56                    -  push esi
"xrGame.dll"+40BCF6: 57                    -  push edi
"xrGame.dll"+40BCF7: A8 01                 -  test al,01
}


dont know where is the problem.
and it uld be great if i cant reduce the codes and jumps.my aa seems a little stupid to me......so much jumps....
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Apr 12, 2020 6:31 pm    Post subject: Reply with quote

registersymbol your INJECT variable from the aobresult. Also, you should be cleaning up any symbols you register in your [DISABLE] section.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
reverser69
Expert Cheater
Reputation: 0

Joined: 03 Sep 2014
Posts: 112

PostPosted: Mon Apr 13, 2020 1:41 am    Post subject: Reply with quote

thnx.issue is fixed
any hints on making the script more beautiful and compact?

also, when I have a script active and the game crashes and I reattach the table to the reopened the game, I have to manually delete symbols for scripts to enable nut with other tables I download from a forum I don't have to do it!!!
any clues on this?
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