cheat-engine / cheat-engine

Cheat Engine. A development environment focused on modding

Home Page:http://cheatengine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deactivation in an auto assembly script using a large number of user symbols causes overflow.

gir489returns opened this issue · comments

aobscanmodule(aob_InfiniteAmmo,hl.dll,29 B4 8B 04 05 00 00)
aobscanmodule(aob_InfiniteAltFire,hl.dll,FF 8C 88 04 05 00 00 F3)
aobscanmodule(aob_Shotgun,hl.dll,FF 8C 8A 04 05 00 00 C7)
aobscanmodule(aob_GaussFire,hl.dll,83 84 88 04 05 00 00 FE)
aobscanmodule(aob_GausCharge1,hl.dll,FF 8C 88 04 05 00 00 8B CF)
aobscanmodule(aob_GausCharge2,hl.dll,FF 8C 8A 04 05 00 00 84)
aobscanmodule(aob_Egon1,hl.dll,49 EB ? 33 C9 89 88 ? ? ? ? F3 0F 10 02 0F 5A C0 F2 0F 58 05 ? ? ? ? 66 0F 5A C0 F3 0F 11 87 ? ? ? ? F3 0F 10 02 F3 0F 10 0D)
aobscanmodule(aob_Egon2,hl.dll,49 EB ? 33 C9 89 88 ? ? ? ? F3 0F 10 02 0F 5A C0 F2 0F 58 05 ? ? ? ? 66 0F 5A C0 F3 0F 11 87 ? ? ? ? F3 0F 10 02 F3 0F 10 4C 24)
aobscanmodule(aob_HornetGun,hl.dll,FF 8C 88 04 05 00 00 8B 47)
aobscanmodule(aob_Satchel,hl.dll,FF 8C 88 ? ? ? ? A1 ? ? ? ? 89 45 ? FF 55 ? F3 0F 10 1D)
aobscanmodule(aob_Tripmine,hl.dll,FF 8C 88 04 05 00 00 8B 4E)
aobscanmodule(aob_Handgrenade,hl.dll,FF 8C 88 ? ? ? ? A1 ? ? ? ? 89 45 ? FF 55 ? D9 5D ? F3 0F 10 45 ? 83 C4 ? 0F 2E 05 ? ? ? ? 9F F6 C4 ? 0F 8B ? ? ? ? 8B 47 ? 8B 40 ? FF B0 ? ? ? ? 6A ? FF 35 ? ? ? ? 6A ? FF 15 ? ? ? ? A1 ? ? ? ? 83 C4 ? 89 45 ? C7 44 24 ? ? ? ? ? C7 04 24 ? ? ? ? FF 55 ? D9 5D ? FF 75 ? FF 15 ? ? ? ? C7 45 ? ? ? ? ? FF 75 ? FF 15 ? ? ? ? A1 ? ? ? ? 83 C4 ? 89 45 ? C7 44 24 ? ? ? ? ? C7 04 24 ? ? ? ? FF 55 ? D9 5D)
registersymbol(aob_InfiniteAmmo)
registersymbol(aob_InfiniteAltFire)
registersymbol(aob_Shotgun)
registersymbol(aob_GaussFire)
registersymbol(aob_GausCharge1)
registersymbol(aob_GausCharge2)
registersymbol(aob_Egon1)
registersymbol(aob_Egon2)
registersymbol(aob_HornetGun)
registersymbol(aob_Satchel)
registersymbol(aob_Tripmine)
registersymbol(aob_Handgrenade)

aob_InfiniteAmmo:
nop 7

aob_InfiniteAltFire:
nop 7

aob_Shotgun:
nop 7

aob_GaussFire:
nop 8

aob_GausCharge1:
nop 7

aob_GausCharge2:
nop 7

aob_Egon1:
nop

aob_Egon2:
nop

aob_HornetGun:
nop 7

aob_Satchel:
nop 7

aob_Tripmine:
nop 7

aob_Handgrenade:
nop 7

[DISABLE]

aob_InfiniteAmmo:
  db 29 B4 8B 04 05 00 00

aob_InfiniteAltFire:
  db FF 8C 88 04 05 00 00

aob_Shotgun:
  db FF 8C 8A 04 05 00 00

aob_GausFire:
  db 83 84 88 04 05 00 00 FE

aob_GausCharge1:
  db FF 8C 88 04 05 00 00

aob_GausCharge2:
  db FF 8C 8A 04 05 00 00

aob_Egon1:
  db 49

aob_Egon2:
  db 49

aob_HornetGun:
  db FF 8C 88 04 05 00 00

aob_Satchel:
  db FF 8C 88 04 05 00 00

aob_Tripmine:
  db FF 8C 88 04 05 00 00

aob_Handgrenade:
  db FF 8C 88 04 05 00 00

unregistersymbol(aob_InfiniteAmmo)
unregistersymbol(aob_InfiniteAltFire)
unregistersymbol(aob_Shotgun)
unregistersymbol(aob_GaussFire)
unregistersymbol(aob_GausCharge1)
unregistersymbol(aob_GausCharge2)
unregistersymbol(aob_Egon1)
unregistersymbol(aob_Egon2)
unregistersymbol(aob_HornetGun)
unregistersymbol(aob_Satchel)
unregistersymbol(aob_Tripmine)
unregistersymbol(aob_Handgrenade)

This script works fine activating, but when deactivating, after aob_Shotgun, all of the bytes subsequently are emplaced after aob_Shotgun. This causes two problems, one the script can't activate again because the AoB can't match, and two, the next time I reload the shotgun, the game will crash.

Haven't tested it yet, but from a first glance I think the script crashes after aob_GausFire: in disable as that symbol can't be found

Haven't tested it yet, but from a first glance I think the script crashes after aob_GausFire: in disable as that symbol can't be found

Yep that was it. Typo. It's fixed now.