View previous topic :: View next topic |
Author |
Message |
Dodish Cheater
Reputation: 0
Joined: 16 Nov 2016 Posts: 27
|
Posted: Thu Dec 15, 2016 3:52 am Post subject: Trainer freezes for a while on script enable |
|
|
Hello, I've created a trainer for my game but when I activate the hack with F1 hotkey, the trainer takes long time like a minute to do everything while freezing.
Is there any possibility to reduce these lags?
Here's my code:
Code: | [ENABLE]
aobscan(nocensor, 55 8B EC 83 EC 08 8B 05 E8 ?? ?? ?? 85 C0 74 1E 8B 05 E8 ?? ?? ?? 83 EC 04 68 ?? ?? ?? ?? FF 75 08 50 39 00 E8 ?? ?? ?? ?? 83 C4 10 EB 03 8B 45 08 C9 C3)
label(_nocensor)
registersymbol(_nocensor)
nocensor:
_nocensor:
db 55 8B EC 83 EC 08 8B 05 E8 ?? ?? ?? 85 C0 74 1E 8B 05 E8 ?? ?? ?? 83 EC 04 68 ?? ?? ?? ?? FF 75 08 50 39 00 E8 ?? ?? ?? ?? 83 C4 10 90 90 8B 45 08 C9 C3
[DISABLE]
_nocensor:
db 55 8B EC 83 EC 08 8B 05 E8 ?? ?? ?? 85 C0 74 1E 8B 05 E8 ?? ?? ?? 83 EC 04 68 ?? ?? ?? ?? FF 75 08 50 39 00 E8 ?? ?? ?? ?? 83 C4 10 EB 03 8B 45 08 C9 C3
unregistersymbol(_nocensor) |
Simply, nopping EB 03. (Changing EB 03 to 90 90)
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Dec 15, 2016 4:21 am Post subject: |
|
|
If you know which module this aob is in you can use aobscanmodule
or resort to lua, and run your code in a thread
_________________
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 |
|
 |
Dodish Cheater
Reputation: 0
Joined: 16 Nov 2016 Posts: 27
|
Posted: Thu Dec 15, 2016 6:13 am Post subject: |
|
|
The function is JITed (Mono) so it will not belong to any module.
About the second thing, can you give me an example?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Thu Dec 15, 2016 6:55 am Post subject: |
|
|
ah, mono.
In that case I recommend activating the mono features and then fetch the address of the function you're interested in. (if it's not JITed yet CE will JIT it for you)
and if you worry that it can change the compilation and cause different sized instructions (jumps could change size), then use AOBSCANREGION(nocensor,monoclass:monomethod,monoclass:monomethod+8192,xx xx xx xx xx)
as for threaded:
Code: |
[enable]
{$lua}
createNativeThread(function()
autoAssemble([[
aobscan(nocensor, 55 8B EC 83 EC 08 8B 05 E8 ?? ?? ?? 85 C0 74 1E 8B 05 E8 ?? ?? ?? 83 EC 04 68 ?? ?? ?? ?? FF 75 08 50 39 00 E8 ?? ?? ?? ?? 83 C4 10 EB 03 8B 45 08 C9 C3)
label(_nocensor)
registersymbol(_nocensor)
nocensor:
_nocensor:
db 55 8B EC 83 EC 08 8B 05 E8 ?? ?? ?? 85 C0 74 1E 8B 05 E8 ?? ?? ?? 83 EC 04 68 ?? ?? ?? ?? FF 75 08 50 39 00 E8 ?? ?? ?? ?? 83 C4 10 90 90 8B 45 08 C9 C3
]])
end
)
[disable]
{$lua}
createNativeThread(function()
autoAssemble([[
_nocensor:
db 55 8B EC 83 EC 08 8B 05 E8 ?? ?? ?? 85 C0 74 1E 8B 05 E8 ?? ?? ?? 83 EC 04 68 ?? ?? ?? ?? FF 75 08 50 39 00 E8 ?? ?? ?? ?? 83 C4 10 EB 03 8B 45 08 C9 C3
unregistersymbol(_nocensor)
]]
)
|
_________________
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
Last edited by Dark Byte on Wed Dec 21, 2016 6:45 pm; edited 1 time in total |
|
Back to top |
|
 |
Dodish Cheater
Reputation: 0
Joined: 16 Nov 2016 Posts: 27
|
Posted: Thu Dec 15, 2016 9:43 am Post subject: |
|
|
Using AOBSCANREGION, I'm afraid I cannot find the mono class and method names because it has a random name like "a:EEEE", but I got to it from another function which uses it that I could find in Mono dissector called "_SendChatMessage".
Is there any way using cheat engine to get to the mono file of a:EEEE?
Also if I may ask, what's the "+8192" for?
In _SendChatMessage, calling the function I want looks like that:
Description: |
|
Filesize: |
85.54 KB |
Viewed: |
8197 Time(s) |

|
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Thu Dec 15, 2016 10:45 am Post subject: |
|
|
Nexero wrote: | Also if I may ask, what's the "+8192" for? |
AOBSCANREGION takes 4 arguments:
AOBSCANREGION(name,startAddress,endAddress,xx xx xx xx xx)
if you know that endAddress is, for example, 8192 bytes after start address you can use
AOBSCANREGION(name,startAddress,startAddress+8191,xx xx xx xx xx)
_________________
|
|
Back to top |
|
 |
Dodish Cheater
Reputation: 0
Joined: 16 Nov 2016 Posts: 27
|
Posted: Wed Dec 21, 2016 9:37 am Post subject: |
|
|
Thanks mgr.inz.Player & Dark_Byte!
I was kinda busy with schools so couldn't test everything, I've just tested the threaded method and it returns with an error at the disable section, I don't understand why though.
Description: |
|
Filesize: |
50.1 KB |
Viewed: |
7953 Time(s) |

|
|
|
Back to top |
|
 |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Wed Dec 21, 2016 12:43 pm Post subject: |
|
|
You must have forgotten to close something. Type when one opens ( must have another one that closes it ).
Code: |
[ENABLE]
{$lua}
{$asm}
[DISABLE]
{$lua}
autoAssemble([[
]])
{$asm}
|
_________________
... |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Wed Dec 21, 2016 6:44 pm Post subject: |
|
|
fixed my example, and your disable doesn't need a thread as it doesn't do an aob scan (it's fast)
_________________
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 |
|
 |
Dodish Cheater
Reputation: 0
Joined: 16 Nov 2016 Posts: 27
|
Posted: Thu Dec 22, 2016 3:39 am Post subject: |
|
|
Thank you two, I was too dumb to figure this out by myself, now it works after I removed the thread as DB suggested but there's one more thing.
Whenever I activate the cheat, it causes the game client huge lags/freezes.
The hotkeys are F1 for enable and F2 for disable.
When I press F1, it gets activated and the client starts to get huge lags.
However, when I press F2, it doesn't disable BUT stops the lags while the cheat is still activated.
Is it possible that the activate section keeps on repeating the thread?
|
|
Back to top |
|
 |
Dodish Cheater
Reputation: 0
Joined: 16 Nov 2016 Posts: 27
|
Posted: Thu Dec 22, 2016 1:26 pm Post subject: |
|
|
Nevermind I figured it out, thank you all. This will really help me with the project I'm working on. Will give credits.
|
|
Back to top |
|
 |
|