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 


JMP before target address

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

Joined: 23 Apr 2014
Posts: 5

PostPosted: Wed Apr 23, 2014 7:22 pm    Post subject: JMP before target address Reply with quote

Hi all,

I've been trying to teach myself how to use CE and I have a question which I hope I haven't overlooked an answer to in various tutorials.

I've scanned and located a single address which matches the displayed money value, I then use "what writes to this address" and find a single opcode highlighted below 16A0DB57.

Code:
16A0DB50 - EB 00 - jmp 16A0DB52
16A0DB52 - E9 5EFFFFFF - jmp 16A0DAB5
16A0DB57 - 66 0FD6 43 18  - movq [ebx+18],xmm0 <<
16A0DB5C - E9 85FFFFFF - jmp 16A0DAE6
16A0DB61 - F3 0F7E 45 C8  - movq xmm0,[ebp-38]


Question 1:
Now I've nop'd 16A0DB57 and it has no effect on actual money or displayed money so does this mean that my original search address and everything downstream (i.e. results from "what accesses this address") should be disregarded in my search?

Question 2:
Since 16A0DB57 does write the correct money values, my next objective is to find which previous step defines xmm0 and follow the trail correct?.

Now if I look at the opcode previous to 16A0DB57, it is:
Code:
16A0DB52 - E9 5EFFFFFF - jmp 16A0DAB5


Question 3:
Since it's a jump opcode, do I ignore this step and instead look for any instances of a jump to 16A0DB57?

I've assumed yes and did a Search > Find Assembly Code for 16A0DB57 and didn't find any results. Are there additional strategies that I should be looking at to find out how 16A0DB57 is reached?

Thanks in advance!
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Apr 23, 2014 7:38 pm    Post subject: Reply with quote

If you change the value of your money by using the address that you found and it does not work (test by changing the value and then gaining/losing money), then you should not proceed with pointer scanning or injection.

If changing the value actually does work (and not just change the display value, but the actual value), and nop'ing the instruction that writes to your address does not stop the money value from changing, then you can look to see what else is writing to that value by looking at which instructions are still writing to that value after you nop the original instruction. There could be multiple instructions that handle the money value, or, a primary instruction that you are not targeting.

If you have found the correct address, I would recommend trying an instruction that accesses your address as opposed to writes to it...that way, the change is immediate, without relying on some other event for the value to be updated etc.
Back to top
View user's profile Send private message
alamedamow
How do I cheat?
Reputation: 0

Joined: 23 Apr 2014
Posts: 5

PostPosted: Wed Apr 23, 2014 7:54 pm    Post subject: Reply with quote

Thanks for replying METHOS,

++METHOS wrote:
If you change the value of your money by using the address that you found and it does not work (test by changing the value and then gaining/losing money), then you should not proceed with pointer scanning or injection.


Even if this is the only operation which writes to an address which clearly follows the actual amount of money I have at any given time? Wouldn't the steps which ultimately update my searched address have to originate from the actual money address?

I guess the question I should have asked is, regardless of the usefulness of this particular opcode, is there a direct method to backtrack where xmm0 was written prior to the opcode where it is movq'd into my searched address?

Which leads me to my question 3, if the opcode immediately preceeding my opcode of interest is a JMP to another address, is it correct that the only way my opcode of interest is ever reached is if it is called or jumped to from another operation?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Apr 23, 2014 8:22 pm    Post subject: Reply with quote

Either the address is wrong or it isn't. If you say that it works for changing the money value, then you can proceed with injection. If it doesn't work, you are wasting time with this opcode or any other relating to it.

First, find the correct address. If you have found the correct address, I can help you with the injection.

Remember, the value may get written to by different instructions. One instruction may be used to subtract money and another to add. One instruction may be used only for bonuses or some other event. This is why you should:

1. keep the debugger open to see if any other instructions are actually writing to your address.
2. don't even bother with write instructions in the first place (unless you have to)...that way, you can change the value immediately, regardless of what is happening in the game.
Back to top
View user's profile Send private message
alamedamow
How do I cheat?
Reputation: 0

Joined: 23 Apr 2014
Posts: 5

PostPosted: Wed Apr 23, 2014 9:23 pm    Post subject: Reply with quote

My original search address is obviously "wrong" in that it is not the "source" money value. However, this is for a tower defense game and for a full map this address follows my displayed money value exactly for dozens if not hundreds of additions and subtractions due to all available earning/spending possibilities. The above opcode is the only one writing to this searched address.

I'm not looking for help with injection, just finding the "source" money address. When you say it is pointless to proceed from anything other than the true money address; is this because it is impossible or extremely difficult to backtrack the "source" money value from my searched value?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Apr 23, 2014 9:28 pm    Post subject: Reply with quote

I wouldn't say that. It's just not the approach that I would take. It's much easier to just find the value. Besides, you may waste all of that time, only to realize that the instruction isn't even connected to the real address.

If the game is an online game, you may be wasting your time altogether.
Back to top
View user's profile Send private message
alamedamow
How do I cheat?
Reputation: 0

Joined: 23 Apr 2014
Posts: 5

PostPosted: Wed Apr 23, 2014 10:48 pm    Post subject: Reply with quote

This is for Bloons TD 5 on Kongregate. Although the "monkey money" or "green cash" seems to be stored server side, I'm 100% sure the regular cash used on each individual map is client side. This is a fairly old game and it's more to allow me to learn techniques rather than to hack the game.

Let me present this from another angle. For various tutorials, the general steps are, 1) Find an address which matches your money 2) Find what addresses write to this money address 3) Open that address in the disassembler and look at the code preceding the opcode of interest.

It's explained that you look at the preceding code because this is where they process the pertinent data before continuing down the line and hitting your move opcode to push that data in to your original searched address.

Well in this case, there's a jump opcode right before my opcode of interest, so in the "spirit" of step 3, I'm no longer to examine the code before the opcode of interest right? If I want to find the lines of code which processed the money value leading up to my opcode of interest, don't I have to go looking for another jump or call opcode which would lead to my opcode of interest?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Wed Apr 23, 2014 11:16 pm    Post subject: Reply with quote

Online, multiplayer games are prohibited for discussion. Not sure if this game qualifies.

Regarding the instruction that writes to your address...you may have to utilize AOB as the location of the instruction may be changing regularly. Additionally, the only thing that you should have to change is the actual instruction that is writing to your money value (i.e. no need to look above for any conditional jump).

For example:

Code:
movq [ebx+18],xmm0


could simply change to:

Code:
mov [ebx+18],FFFFFFFF


That is only one of many ways to manipulate your cash in this case. Since [ebx+18] holds the value of your money, we can move whatever we want in to it...assuming this instruction is only writing to your money value and nothing else.
Back to top
View user's profile Send private message
alamedamow
How do I cheat?
Reputation: 0

Joined: 23 Apr 2014
Posts: 5

PostPosted: Wed Apr 23, 2014 11:33 pm    Post subject: Reply with quote

It's definitely not multiplayer. People can verify if they wish by looking up bloons td 5 on kongregate.

Yes, if this address were the true storage address of cash it would be easy to freeze or modify the movq. Unfortunately as I stated before, although this particular address always has a double value which matches my current cash, modifying it or freezing it doesn't have any affect on the display or actual cash.

This is why I was trying to find where xmm0 was assigned previous to the movq step. xmm0 is one step closer to the true money storage right?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Apr 24, 2014 1:54 am    Post subject: Reply with quote

alamedamow wrote:
Unfortunately as I stated before, although this particular address always has a double value which matches my current cash, modifying it or freezing it doesn't have any affect on the display or actual cash.
-What do you mean by 'double value'? As I said before, if the value that you have does not work (i.e. "modifying it or freezing it doesn't have any affect on the display or actual cash"), then I don't understand why you are so insistent with proceeding with this particular instruction. Either you're not telling me everything, or you're inept. Either way, I feel like I am wasting my time.
Back to top
View user's profile Send private message
Rydian
Grandmaster Cheater Supreme
Reputation: 31

Joined: 17 Sep 2012
Posts: 1358

PostPosted: Thu Apr 24, 2014 5:14 am    Post subject: Reply with quote

alamedamow wrote:
Unfortunately as I stated before, although this particular address always has a double value which matches my current cash, modifying it or freezing it doesn't have any affect on the display or actual cash.
Then it's the wrong address and you should go back to doing searches to find the right one.

More advanced stuff won't help if the target isn't right to begin with. Trying to work your way off of a display value is like trying to talk to an image of somebody on a TV instead of talking to the actual person. No matter how fancy you talk they cannot hear you.

Search unknown initial and increased/decreased, but if it's Bloons TD5, then chances are it's obfuscated in RAM and your best bet is to edit the SWF yourself or find an edited one.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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