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 


Get address via aob inject but its not in register

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

Joined: 10 Nov 2019
Posts: 7

PostPosted: Sat Nov 30, 2019 3:45 pm    Post subject: Get address via aob inject but its not in register Reply with quote

Soo, I try to get the address of the player health using an aob injection and basically moving the address into pAddress. The problem is that the health address is "directly referenced in the code" (no clue if thats correct but you get the idea). I tried some work arounds, thats why my code is pretty fucked up.

The code basically is:
Code:

mov eax,[111DEF30]


And I want to change it to:
Code:

mov eax,[111DEF30]
mov [pAddress],111DEF30


My current script looks like this:

Code:


[ENABLE]

aobscan(PLAYERADDRESSINJECT,8B 05 ?? ?? ?? ?? 85 C0 7E 0B) // should be unique
alloc(newmem,$1000)
alloc(savedBytesPLAYERADDRESS, 6)
alloc(pAddress, 8)
alloc(actualAddress, 8)
registerSymbol(pAddress)
registerSymbol(savedBytesPLAYERADDRESS)
label(code)
label(return)
actualAddress:
  readmem(PLAYERADDRESSINJECT-4,4)

savedBytesPLAYERADDRESS:
  readmem(PLAYERADDRESSINJECT, 6)

newmem:

code:
  readmem(PLAYERADDRESSINJECT, 6)
  push eax
  mov eax,[actualAddress]
  mov [pAddress],eax
  pop eax
  jmp return



PLAYERADDRESSINJECT:
  jmp newmem
  nop
return:
registersymbol(PLAYERADDRESSINJECT)

[DISABLE]

PLAYERADDRESSINJECT:
  readmem(savedBytesPLAYERADDRESS, 6)

unregistersymbol(PLAYERADDRESSINJECT)
unregistersymbol(savedBytesPLAYERADDRESS)
unregistersymbol(pAddress)
dealloc(newmem)
dealloc(savedBytesPLAYERADDRESS)
dealloc(pAddress)
dealloc(actualAddress)


I hope someone finds the time and motivation to help me, thank you Smile



screenshot1.PNG
 Description:
Screenshot of the memory viewer
 Filesize:  24.38 KB
 Viewed:  2519 Time(s)

screenshot1.PNG


Back to top
View user's profile Send private message
DanyDollaro
Master Cheater
Reputation: 3

Joined: 01 Aug 2019
Posts: 334

PostPosted: Sat Nov 30, 2019 5:40 pm    Post subject: Reply with quote

Take this:
Code:
[ENABLE]
aobscan(INJECT,89 4C 24 04 8B 8D B4 FD FF FF 89 4C 24 08 50 39 00 ?? ?? ?? ?? ?? 83 C4 10 A1 ?? ?? ?? ?? 85 C0 7E 0B 0F B6 05 ?? ?? ?? ?? 85 C0 74 1A C7 87 40 01 00 00 63 00 00 00)
registersymbol(INJECT)

alloc(Address,4, INJECT)
registersymbol(Address)

Address:
readmem(INJECT + 1A,4)

//INJECT + 19:
//jmp no where

//return:


[DISABLE]
//INJECT + 19:
//db nothing

unregistersymbol(INJECT)
unregistersymbol(Address)
dealloc(Address)

{
// ORIGINAL CODE - INJECTION POINT: 00DD8A2C

""+DD8A18: 00 00                          -  add [eax],al
""+DD8A1A: 00 00                          -  add [eax],al
""+DD8A1C: 00 00                          -  add [eax],al
""+DD8A1E: 00 00                          -  add [eax],al
""+DD8A20: 00 00                          -  add [eax],al
""+DD8A22: 00 00                          -  add [eax],al
""+DD8A24: 00 00                          -  add [eax],al
""+DD8A26: 00 00                          -  add [eax],al
""+DD8A28: 00 00                          -  add [eax],al
""+DD8A2A: 00 00                          -  add [eax],al
// ---------- INJECTING HERE ----------
""+DD8A2C: 89 4C 24 04                    -  mov [esp+04],ecx
""+DD8A30: 8B 8D B4 FD FF FF              -  mov ecx,[ebp-0000024C]
// ---------- DONE INJECTING  ----------
""+DD8A36: 89 4C 24 08                    -  mov [esp+08],ecx
""+DD8A3A: 50                             -  push eax
""+DD8A3B: 39 00                          -  cmp [eax],eax
""+DD8A3D: E8 D2 C6 FE 65                 -  call 66DC5114
""+DD8A42: 83 C4 10                       -  add esp,10
""+DD8A45: A1 30 EF 1D 11                 -  mov eax,[111DEF30]
""+DD8A4A: 85 C0                          -  test eax,eax
""+DD8A4C: 7E 0B                          -  jle 00DD8A59
""+DD8A4E: 0F B6 05 A4 EE 1D 11           -  movzx eax,byte ptr [111DEEA4]
""+DD8A55: 85 C0                          -  test eax,eax
}


The Cheat Table:
Code:
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
  <CheatEntries>
    <CheatEntry>
      <ID>7</ID>
      <Description>"Code injection"</Description>
      <LastState/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscan(INJECT,89 4C 24 04 8B 8D B4 FD FF FF 89 4C 24 08 50 39 00 ?? ?? ?? ?? ?? 83 C4 10 A1 ?? ?? ?? ?? 85 C0 7E 0B 0F B6 05 ?? ?? ?? ?? 85 C0 74 1A C7 87 40 01 00 00 63 00 00 00)
registersymbol(INJECT)

alloc(Address,4, INJECT)
registersymbol(Address)

Address:
readmem(INJECT + 1A,4)

//INJECT + 19:
//jmp no where

//return:


[DISABLE]
//INJECT + 19:
//db nothing

unregistersymbol(INJECT)
unregistersymbol(Address)
dealloc(Address)

{
// ORIGINAL CODE - INJECTION POINT: 00DD8A2C

""+DD8A18: 00 00                          -  add [eax],al
""+DD8A1A: 00 00                          -  add [eax],al
""+DD8A1C: 00 00                          -  add [eax],al
""+DD8A1E: 00 00                          -  add [eax],al
""+DD8A20: 00 00                          -  add [eax],al
""+DD8A22: 00 00                          -  add [eax],al
""+DD8A24: 00 00                          -  add [eax],al
""+DD8A26: 00 00                          -  add [eax],al
""+DD8A28: 00 00                          -  add [eax],al
""+DD8A2A: 00 00                          -  add [eax],al
// ---------- INJECTING HERE ----------
""+DD8A2C: 89 4C 24 04                    -  mov [esp+04],ecx
""+DD8A30: 8B 8D B4 FD FF FF              -  mov ecx,[ebp-0000024C]
// ---------- DONE INJECTING  ----------
""+DD8A36: 89 4C 24 08                    -  mov [esp+08],ecx
""+DD8A3A: 50                             -  push eax
""+DD8A3B: 39 00                          -  cmp [eax],eax
""+DD8A3D: E8 D2 C6 FE 65                 -  call 66DC5114
""+DD8A42: 83 C4 10                       -  add esp,10
""+DD8A45: A1 30 EF 1D 11                 -  mov eax,[111DEF30]
""+DD8A4A: 85 C0                          -  test eax,eax
""+DD8A4C: 7E 0B                          -  jle 00DD8A59
""+DD8A4E: 0F B6 05 A4 EE 1D 11           -  movzx eax,byte ptr [111DEEA4]
""+DD8A55: 85 C0                          -  test eax,eax
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>8</ID>
      <Description>"Address You Want"</Description>
      <ShowAsHex>1</ShowAsHex>
      <VariableType>4 Bytes</VariableType>
      <Address>Address</Address>
    </CheatEntry>
  </CheatEntries>
</CheatTable>
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4696

PostPosted: Sat Nov 30, 2019 5:45 pm    Post subject: Reply with quote

You're overcomplicating it.
Code:
[ENABLE]
aobscan(PLAYERADDRESS,8B 05 ?? ?? ?? ?? 85 C0 7E 0B)
globalalloc(pAddress,4)

pAddress:
  readmem(PLAYERADDRESS+2,4)

[DISABLE]

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Schwertheiliger
How do I cheat?
Reputation: 0

Joined: 10 Nov 2019
Posts: 7

PostPosted: Sat Nov 30, 2019 5:53 pm    Post subject: Reply with quote

I really am questioning my intelligence, thank you haha
Back to top
View user's profile Send private message
DanyDollaro
Master Cheater
Reputation: 3

Joined: 01 Aug 2019
Posts: 334

PostPosted: Sat Nov 30, 2019 5:54 pm    Post subject: Reply with quote

Ouch Shocked! Indeed you are right ParkourPenguin Laughing
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