| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 8:10 am    Post subject: Adding two registered symbols in a cheat table as an address |   |  
				| 
 |  
				| So the short version is: how to use a symbol as an offset for a pointer? 
 See screenshot attached.
 
 How I asked the question initially:
 
  	  | Quote: |  	  | Quite a simple question, but I can't seem to be able to figure it out.
 
 I have a few scripts that register some symbols and fills them with values. Result is simple:
 
 Pointer (address of 0BD60038 aka my own code space) - value of 10210600
 Offset (address of 0BD60040 aka my own code space) - value of 00000040
 
 If I look at the address of those values in my cheat table, it just says "Pointer", the name that I gave the symbol in my script. All this works as expected.
 
 I can do "[Pointer]+40" to get the value of 10210640 that I want. But since the offset might change in my script I'd like to do: "[Pointer]+[Offset]", but cheatengine is unable to solve this into an address. Other things I've tried (unsuccessfully):
 
 [Pointer]+[Offset]
 [[Pointer]+[Offset]]
 [[Pointer]]+[[Offset]]
 ([Pointer]+[Offset])
 ([Pointer])+([Offset])
 Pointer+Offset (this was solvable, but just gave me 0)
 
 Can someone please explain how to do this without me needing to register yet another symbol in my scripts which is just the addition of two symbols that I already have registered?
 
 | 
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 13.86 KB |  
		| Viewed: | 12982 Time(s) |  
		| 
  
 
 |  
 
 Last edited by markheloking on Thu Jan 14, 2016 9:48 am; edited 1 time in total
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| hhhuut Grandmaster Cheater
 
  Reputation: 6 
 Joined: 08 Feb 2015
 Posts: 607
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 8:44 am    Post subject: |   |  
				| 
 |  
				| Instead of "[Pointer]+[Offset]" you could also write "[Pointer]+Offset+0" |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 8:55 am    Post subject: |   |  
				| 
 |  
				| That indeed does work, but that validates as: 
 "[Pointer]+Offset+0"
 meaning
 Value that pointer points to (10210600, itself another pointer) + the address of the offset (0BD60040) + 0
 aka
 10210600 + 0BD60040 + 0 = 1BF70640
 
 So that does not solve my problem since I need to add the value that is stored in the symbol "Offset", not the address of that symbol.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| hhhuut Grandmaster Cheater
 
  Reputation: 6 
 Joined: 08 Feb 2015
 Posts: 607
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 8:57 am    Post subject: |   |  
				| 
 |  
				| Could you probably provide a screenshot? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 8:59 am    Post subject: |   |  
				| 
 |  
				| At the moment I'm in the middle of figuring out a structs contents using that same table, so I'll screenshot in a minute. |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| Zanzer I post too much
 
 ![]() Reputation: 126 
 Joined: 09 Jun 2013
 Posts: 3278
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:01 am    Post subject: |   |  
				| 
 |  
				| With your instruction that sets the value of "offset", simply make it add "pointer" there as well. 
  	  | Code: |  	  | mov [offset],eax push eax
 mov eax,[pointer]
 add [offset],eax
 pop eax
 | 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| hhhuut Grandmaster Cheater
 
  Reputation: 6 
 Joined: 08 Feb 2015
 Posts: 607
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:02 am    Post subject: |   |  
				| 
 |  
				| So you want to follow a pointer with assembler? |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:07 am    Post subject: |   |  
				| 
 |  
				| Well not really. In a piece of assembly code I catch the pointer (because this changes a lot, and catching it this way is waaaay easier plus I don't think there is a toplevel pointer because of the way this game is build). I then put this pointer (in this case the 10210600) in a piece of allocated space, and give that a symbol name and register that symbol. This basically sets me up so that in my own allocated space (address 0BD60038, named Pointer by a registered symbol) the address of this pointer is stored (10210600). 
 I do all this because I want to show the value of 10210600+40 in my table.
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| hhhuut Grandmaster Cheater
 
  Reputation: 6 
 Joined: 08 Feb 2015
 Posts: 607
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:13 am    Post subject: |   |  
				| 
 |  
				| So you want the read the pointer from my attached screenshot in assembler language, did I get that right? 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 3.93 KB |  
		| Viewed: | 13081 Time(s) |  
		| 
  
 
 |  
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:40 am    Post subject: |   |  
				| 
 |  
				| See attached images. 
 If I use [Pointer]+Offset+0 it doesn't resolve btw, but if I use [Pointer]+Offset then it does.
 I don't use the pointer screen from cheatengine, jus tthe "add address manually".
 
 What I Get contains: [Pointer]+Offset
 What I Want contains: [Pointer]+40 (manually entered the offset here so you see what it's supposed to produce as output in the table)
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 12.51 KB |  
		| Viewed: | 13072 Time(s) |  
		| 
  
 
 |  
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 12.45 KB |  
		| Viewed: | 13072 Time(s) |  
		| 
  
 
 |  
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 1.27 KB |  
		| Viewed: | 13072 Time(s) |  
		| 
  
 
 |  
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| hhhuut Grandmaster Cheater
 
  Reputation: 6 
 Joined: 08 Feb 2015
 Posts: 607
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:43 am    Post subject: |   |  
				| 
 |  
				| Well, you try to fill in a pointer into a single address. Click on the checkbos which reads "Pointer" and you're box will look like the one from my screenshot. 
 There you can fill in your Base in the big edit field below and the offset in the small (just as I did).
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 9:43 am    Post subject: |   |  
				| 
 |  
				| If it doesn't resolve you just get to see this in the table. 
 Please note that the actual names for the pointer and offset are different (longer) but end in offset and pointer so you still get what I mean.
 
 CharacterUnlockScreenBasePointer = Pointer
 CurrentSelectedCharOffset = Offset
 
 [EDIT]
 So if I use the pointer screen as you said (which effectively does the same thing, but rather with a GUI), you see the problem: you can't use a symbol as an offset!
 See screenshot attached
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 13.86 KB |  
		| Viewed: | 13067 Time(s) |  
		| 
  
 
 |  
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 1.93 KB |  
		| Viewed: | 13074 Time(s) |  
		| 
  
 
 |  
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| hhhuut Grandmaster Cheater
 
  Reputation: 6 
 Joined: 08 Feb 2015
 Posts: 607
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 10:02 am    Post subject: |   |  
				| 
 |  
				| Hm, then CE isn't capable of that ... But there's a workaround: 
 
  	  | Code: |  	  | alloc(PTR,512) label(invalid)
 label(finalPointer)
 registersymbol(finalPointer)
 
 PTR:
 pushad
 //Follow Pointer
 mov eax,[CharacterUnlockScreenBasePointer]
 test eax,eax
 jz invalid   //jump if invalid pointer
 mov eax,[eax+CurrentSelectedCharOffset]
 test eax,eax
 jz invalid
 mov [finalPointer],eax   //assign address to new symbol
 
 invalid:
 push #50   //50ms timeout
 call sleep
 popad
 jmp PTR
 
 finalPointer:
 dd 00
 
 createthread(PTR)
 | 
 
 assign that code as a seperate script. It reads your pointerpath every 50 miliseconds and assigns the final address to a new symbol, which you can easily insert into the "Add address manually" field ...
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| markheloking Cheater
 
 ![]() Reputation: 2 
 Joined: 21 Nov 2009
 Posts: 35
 
 
 | 
			
				|  Posted: Thu Jan 14, 2016 10:09 am    Post subject: |   |  
				| 
 |  
				| Hmmm... I'm going to steal that code for other purposes (the threading and such, haven't familiarized myself with that stuff yet). It's quite obsolete though as it's literally only 3 rows of extra code in my script (for now). I was just wondering if it was possible to work that magic with multiple offsets and such (especially if I'm trying to do something without scripts). 
 Thank you though.
 
 @dark_byte why isn't it possible to use a symbol as offset or stuff like:
 
 [Pointer]+Offset1+Offset2
 
 Very often you have games and programs using multiple layers of offsets (linked lists or structs would come to mind).
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| mgr.inz.Player I post too much
 
  Reputation: 222 
 Joined: 07 Nov 2008
 Posts: 4438
 Location: W kraju nad Wisla. UTC+01:00
 
 | 
			
				|  Posted: Thu Jan 14, 2016 10:09 am    Post subject: |   |  
				| 
 |  
				| Too bad I didn't read your topic yesterday. 
 
 My response would be: "just use another user symbol"
 _________________
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |