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 


AOB Injection that finds the value etc. for each slot.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
DrAgOnK2LLER84
Newbie cheater
Reputation: 0

Joined: 21 Apr 2015
Posts: 16

PostPosted: Wed May 27, 2015 3:20 am    Post subject: AOB Injection that finds the value etc. for each slot. Reply with quote

I'm trying to figure out how to use AOB injection to allow cheat engine to detect what things I have in inventory for Resident Evil 5.
Code:
{ Game   : re5dx9.exe
  Version:
  Date   : 2015-05-27
  This script does blah blah blah
}

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat

 
 
aobscan(inventory,C8 00 00 00 00 00 0F 0F) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  enter 0000,00
  add [eax],al
  jmp return

inventory:
  jmp code
  nop
return:
registersymbol(inventory)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat
inventory:
  db C8 00 00 00 00 00

unregistersymbol(inventory)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: 0674C256

0674C242: 00 00              -  add [eax],al
0674C244: 00 00              -  add [eax],al
0674C246: 00 00              -  add [eax],al
0674C248: 00 00              -  add [eax],al
0674C24A: 00 00              -  add [eax],al
0674C24C: 00 00              -  add [eax],al
0674C24E: 00 00              -  add [eax],al
0674C250: 00 00              -  add [eax],al
0674C252: 00 00              -  add [eax],al
0674C254: 02 01              -  add al,[ecx]
// ---------- INJECTING HERE ----------
0674C256: C8 00 00 00        -  enter 0000,00
0674C25A: 00 00              -  add [eax],al
// ---------- DONE INJECTING  ----------
0674C25C: 0F                 -   
0674C25D: 0F 00 00           -  sldt [eax]
0674C260: C8 00 00 00        -  enter 0000,00
0674C264: D0 07              -  rol byte ptr [edi],1
0674C266: 00 00              -  add [eax],al
0674C268: DC 05 00 00 F4 01  -  fadd qword ptr [01F40000]
0674C26E: 00 00              -  add [eax],al
0674C270: B8 0B 00 00 00     -  mov eax,0000000B
0674C275: 00 00              -  add [eax],al
0674C277: 00 00              -  add [eax],al
}

When I test this code (It's for the first slot), it makes the first item to 42473.
Can anyone help me fix the problem?
Back to top
View user's profile Send private message
Alamer99
Expert Cheater
Reputation: 1

Joined: 04 Jan 2015
Posts: 136

PostPosted: Wed May 27, 2015 8:15 am    Post subject: Reply with quote

First: Find How is The Inventory Stored In The Memory
For Example If Every Items Slot Takes 4bytes
Then Do aobscan/code injecting to find the first item
and the second slot will be "FirstItem+4",Third "FirstItem+4+4" or "FirstItem+8" Its The Same
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 Lua Scripting 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