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 


Crashing game when activate the script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
gea99
How do I cheat?
Reputation: 0

Joined: 30 Dec 2023
Posts: 8

PostPosted: Sat Jan 06, 2024 3:13 pm    Post subject: Crashing game when activate the script Reply with quote

When I activate the scripts game crash
alloc(newmem2,2048)
label(returnhere2)
label(originalcode2)
label(exit2)

newmem2: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode2:
cmp [ecx+20],72656E45
//72656E45 is string converted in 4 bytes. Fully it 'EnergyPack' but in 4 bytes there is only Ener
je p:

nop
ret

p:
mov [ecx+54],6
ret

mov eax,[esi+54]
pop esi
ret 0004

exit2:
jmp returnhere2

"METAL GEAR RISING REVENGEANCE.exe"+5516EE:
jmp newmem2
nop 2
returnhere2:
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Sat Jan 06, 2024 5:47 pm    Post subject: Reply with quote

I guess the originalcode was?
Code:

mov eax,[esi+54]
pop esi
ret 0004


you just do ret instead of ret 4 and don't seem to set eax to the value of [esi+54]

_________________
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
gea99
How do I cheat?
Reputation: 0

Joined: 30 Dec 2023
Posts: 8

PostPosted: Sun Jan 07, 2024 7:21 am    Post subject: Reply with quote

It works with this code

cmp [ecx+20],72656E45
je p

nop
jmp h

p:
mov [ecx+54],6
jmp h

h:
mov eax,[esi+54]
pop esi
ret 0004
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