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 


Need help with a simple AA script

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Thu Nov 01, 2012 1:34 pm    Post subject: Need help with a simple AA script Reply with quote

Hey, I just started using auto assembler and I made this simple code that works very nicely (gives unlimited ammo):
Code:
[enable]
"PKHDGame-Win32-Shipping.exe"+48B04:
db 90 90
[disable]
"PKHDGame-Win32-Shipping.exe"+48B04:
db 89 01


However instead of having unlimited ammo I want to set ammo to 100

Code:
00448AFE - 7D 0C - jnl PKHDGame-Win32-Shipping.exe+48B0C
00448B00 - 8B 4C 24 10  - mov ecx,[esp+10]
00448B04 - 89 01  - mov [ecx],eax <<
00448B06 - 83 C4 08 - add esp,08
00448B09 - C2 0800 - ret 0008

EAX=00000024 <-----this is the ammo
EBX=0F5BF110
ECX=34CD3EBC
EDX=01E0AB7C
ESI=01E0AC6C
EDI=34CD3EBC
ESP=01E0AB78
EBP=00000000
EIP=00448B06


How do I do set my ammo to 100?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu Nov 01, 2012 2:10 pm    Post subject: Reply with quote

try this:
Code:

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048) //2kb should be enough
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
mov eax,#100

originalcode:
mov ecx,[esp+10]
mov [ecx],eax

exit:
jmp returnhere

"PKHDGame-Win32-Shipping.exe"+48B00:
jmp newmem
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"PKHDGame-Win32-Shipping.exe"+48B00:
mov ecx,[esp+10]
mov [ecx],eax
//Alt: db 8B 4C 24 10 89 01

_________________
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
Eraser
Grandmaster Cheater
Reputation: 0

Joined: 23 Jul 2008
Posts: 504
Location: http://www.youtube.com/PCtrainers

PostPosted: Thu Nov 01, 2012 2:57 pm    Post subject: Reply with quote

Thanks Dark Byte, I analyzed the code and I will surely use it in the future.

Worked very nicely.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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