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 


assembler code crashing. help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 84

PostPosted: Fri Jan 24, 2025 11:51 pm    Post subject: assembler code crashing. help Reply with quote

Code:

[ENABLE]

aobscanmodule(freeeeeeze,game.EXE,D9 5E F0 D9 84 24 4C 02 00 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
push edx
push ebx
lea edx,[[[game.EXE+0049CDA8]+14]+6C]
lea ebx,[esi-10]
cmp edx,ebx
pop ebx
pop edx
je code
mov [esi-10],(float)0.0
mov [esi-C],(float)0.0
mov [esi-8],(float)0.0
jmp code

code:
  fstp dword ptr [esi-10]
  fld dword ptr [esp+0000024C]
  jmp return

freeeeeeze:
  jmp newmem
  nop 5
return:
registersymbol(freeeeeeze)

[DISABLE]

freeeeeeze:
  db D9 5E F0 D9 84 24 4C 02 00 00

unregistersymbol(freeeeeeze)
dealloc(newmem)


See the newmem block.
Back to top
View user's profile Send private message
Game Hacking Dojo
Master Cheater
Reputation: 1

Joined: 17 Sep 2023
Posts: 250

PostPosted: Sat Jan 25, 2025 2:41 am    Post subject: Reply with quote

replace:
Code:
lea edx,[[[game.EXE+0049CDA8]+14]+6C]


with:
Code:
mov edx,[game.exe+0049CDA8]
mov edx,[edx+14]
add edx,6C
Back to top
View user's profile Send private message Visit poster's website
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 84

PostPosted: Sat Jan 25, 2025 5:39 am    Post subject: Reply with quote

Replaced both lea instruxtions with mov but still crashing
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25783
Location: The netherlands

PostPosted: Sat Jan 25, 2025 3:00 pm    Post subject: Reply with quote

it sets esi-10 till esi-5 to 0 no matter if the cmp occurs. is that what you want?

anyhow, in memview go to the debug->break on unexpected exceptions->only in specified regions
then debug->break on unexpected exceptions->Automatically add allocated ....

then inject your script and see if it breaks. The caption may give some info

alternatively, try using {$try}/{$except}

_________________
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
View user's profile Send private message MSN Messenger
sgsgwv$6263
Advanced Cheater
Reputation: 0

Joined: 05 Aug 2020
Posts: 84

PostPosted: Sun Jan 26, 2025 12:05 am    Post subject: Reply with quote

If you mean that if cmp is success then do i want to set those to zero? yes.

Thanks. Will try this debug break method.


I tried using try and except but read that somewhere that you have to handle all register or memory related dirt(that try is responsible for) on your own in except so i didn't use it because i don't know how the crash is happening hence not sure how to do the cleanup in except.
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