| View previous topic :: View next topic |
| Author |
Message |
SirCabby Newbie cheater
Reputation: 0
Joined: 31 Aug 2020 Posts: 15
|
Posted: Fri Sep 11, 2020 11:43 pm Post subject: AA untoggle script on {$except} |
|
|
So I've been working on a script that runs in a separate thread. Between levels the pointers get reset and are unresolvable until the next level loads. During this time my thread can throw an exception while trying to read those pointer values. This is fine, the thread dies and the game doesn't crash, however the checkbox on the script remains checked and the user won't know that it stopped working until it's too late. Retoggling it manually off/on will get it working again.
So my assumption is that I have 2 options:
1) Write some asm or lua that is able to tell the address / script to untoggle. I found some threads on this, but the only asm example I saw would keep the script from being able to turn on at all (by writing to unwritable memory address). From my limited CE LUA understanding, the LUA code would trigger before the asm so I can't inject random lua to the middle of the asm I have so far in the {$except} block. So is this path a dead end unless I convert to lua?
2) Write my script in a way that it doesn't crash on multi-level pointers being broken. I saw a video on multi-level pointers where the auther was doing cmp's on the address values to 0 before traversing deeper. You end up with a lot of:
| Code: | mov edx,[edx+38]
cmp edx,0
je loop //reset to beginning of loop and try again |
That seems like a lot of boilerplate to the code, maybe it would work but when I attempted this I either had a bug or it still failed in my example.
Any answers or advice greatly appreciated.
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25820 Location: The netherlands
|
Posted: Sat Sep 12, 2020 12:14 am Post subject: |
|
|
1:instead of killing itself let the thread just wait for a few seconds and then try again from the start.
e.g call sleep and afterwards jump to the thread start address
2: Let the thread on normal run continuously increase a value (call it heartbeat) and in ce lua use a timer to see if the value has been increased
If not, disable the entry
(also, how does disabling your entry work? Do you even check the state before disabling it? Because freeing the memory of a thread that is still running can crash the game)
3: look at the lua code injection template
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
SirCabby Newbie cheater
Reputation: 0
Joined: 31 Aug 2020 Posts: 15
|
Posted: Sat Sep 12, 2020 3:11 pm Post subject: |
|
|
| great ideas, tyvm
|
|
| Back to top |
|
 |
|