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 


registersymbol size

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
TheByteSize
Advanced Cheater
Reputation: 0

Joined: 06 Aug 2015
Posts: 62

PostPosted: Tue Sep 08, 2015 5:25 pm    Post subject: registersymbol size Reply with quote

I'm trying to store an address into a registersymbol. But as default, symbol can only accept up to 8 digits, how can I increase that size?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Tue Sep 08, 2015 5:48 pm    Post subject: Reply with quote

Why do you think symbols can only accept 8 digits ?
It works fine with 64-bit addresses

_________________
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
TheByteSize
Advanced Cheater
Reputation: 0

Joined: 06 Aug 2015
Posts: 62

PostPosted: Tue Sep 08, 2015 5:58 pm    Post subject: Reply with quote

Dark Byte wrote:
Why do you think symbols can only accept 8 digits ?
It works fine with 64-bit addresses


I tried to store the address from RAX into baseAdr(symbol) and when I reuse the symbol as pointer, it's missing leading 1 digit.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Tue Sep 08, 2015 6:03 pm    Post subject: Reply with quote

Post the code in question and we can let you know where you went wrong.
mov [baseAdr],rax
Should've worked just fine.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Tue Sep 08, 2015 6:16 pm    Post subject: Reply with quote

Is baseAdr located within 2GB of the assembler code that accesses it? (are you properly using the 3th parameter of alloc ? )

if not, then you'll have to deal with the possibility that the distance can be bigger

in which case you'll have to code like this:
Code:

push rbx
mov rbx,baseAdr
mov [rbx],rax
pop rbx

_________________
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
TheByteSize
Advanced Cheater
Reputation: 0

Joined: 06 Aug 2015
Posts: 62

PostPosted: Tue Sep 08, 2015 6:35 pm    Post subject: Reply with quote

EAX has 142AC9C88
but GMP has 42AC9C88 (8 digits only) Sad
Code:

aobscanmodule(MoneyReadAOB,mgsvtpp.exe,8B 00 89 86 F4 12 00 00) // should be unique
registersymbol(MoneyReadAOB)
alloc(newmem,2048,"mgsvtpp.exe"+3CDE7C3)

label(code)
label(return)
label(GMP)
registersymbol(GMP)

newmem:
  mov [GMP],eax
code:
  mov eax,[rax]
  mov [rsi+000012F4],eax
  jmp return
GMP:
  dd 0
MoneyReadAOB:
  jmp newmem
  nop
  nop
  nop
return:

[DISABLE]

MoneyReadAOB:
  db 8B 00 89 86 F4 12 00 00
unregistersymbol(GMP)
unregistersymbol(MoneyReadAOB)
dealloc(newmem)
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Tue Sep 08, 2015 6:41 pm    Post subject: Reply with quote

EAX can not contain 142AC9C88 as EAX is a 32-bit register
RAX (which is 64-bit) does contain 142AC9C88, but EAX will contain 42AC9C88


so use:
Code:

mov [GMP],rax


and replace
Code:

GMP:
  dd 0

with
Code:

GMP:
  dq 0

Just in case you ever decide to add code or other variables after it

Or better yet, replace label(GMP) with
Code:

alloc(GMP,8,"mgsvtpp.exe"+3CDE7C3)

_________________
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
TheByteSize
Advanced Cheater
Reputation: 0

Joined: 06 Aug 2015
Posts: 62

PostPosted: Tue Sep 08, 2015 6:55 pm    Post subject: Reply with quote

RAX is what I needed instead of EAX.

Thanks for pointing out EAX is 32 bit only.

Code works as intended now.

Twisted Evil
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