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 


Cheat Engine Forum Index
PostGo back to topic
Dark Byte
Site Admin
Reputation: 458
Joined: 09 May 2003
Posts: 25291
Location: The netherlands

PostPosted: Mon Dec 10, 2018 6:35 am    Post subject:

Code:

aobscanmodule(health,VictorVranSteam.exe,89 02 8B 41 04 8B 4D F8) // should be unique
alloc(newmem,$1000)

label(code)
label(return)
label(park)

newmem:

push eax //store eax as the code below is going to change it
{$try}
//----------------------check health string
lea eax,[edx+8]
cmp dword ptr[eax+10],'heal'  //this can cause an exception
jne park
cmp dword ptr[eax+14],'th'  //this can cause an exception
jne park
//-----------if health string then write health

//the code managed to get here, so no exception happened (and the text is 'health' )
jmp itishealthandnocrash
{$except}
//if this gets reached an exception happened which would have crashes the game otherwise, just deal it as no health
jmp park

itishealthandnocrash:
pop eax //undo the push, or use add esp,4
mov eax,3e8
jmp code

park:
pop eax //restore eax

code:

  mov [edx],eax
  mov eax,[ecx+04]
  jmp return

health:
  jmp newmem
return:
registersymbol(health)

_________________
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
Post reviews:   Approve 1
Author Review
dharmang1910
Review: Approve
Post reference:
ReviewPosted: Thu Dec 13, 2018 12:39 am

Great lesson from dark byte!!
Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites