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 


help with debugger please - need to replace value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
mordax
Expert Cheater
Reputation: 1

Joined: 16 Apr 2010
Posts: 138

PostPosted: Sun Jan 09, 2011 4:22 pm    Post subject: help with debugger please - need to replace value Reply with quote

hi. its hard to explain, so i just put example what i would like to do.

in game, there is value, that keeps changing. i dont want to freeze it, i want to write my own value there and then keep it frozen.

so i find the value, breakpoint it and find the breakpoint. usually i use Tsearch and its easywrite (asm) to write a script, but im lost here.

cheat engine shows this instruction "fst dword ptr [edi]"
how can i replace this, with my own value ?
in Tsearch i usually did something like "mov dword ptr [eax+8C],0xFFFF"
where FFFF is my value i want it to be, how would it look like with my example ?

i hope its not too much of a mess.
Back to top
View user's profile Send private message
killmanx27
Expert Cheater
Reputation: 1

Joined: 03 Oct 2010
Posts: 130
Location: Canada :D

PostPosted: Sun Jan 09, 2011 11:01 pm    Post subject: Reply with quote

i think the code says [store float at edi] you could try this

Code:
 mov [edi],#100
you can chagne 100 to wat everyyou want.Im sorry if i am wrong im still learning AA you could also freeze the alue then change it to w.e you want it that is wat u mean
_________________
Will is introducing his friend to his family.He goes to uncle phil and says"ALL OF THIS IS MY UNCLE PHIL" *waving around a big circle around uncle phil
Very Happy
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Mon Jan 10, 2011 12:50 am    Post subject: Reply with quote

Yes, it is a float, but if You use #, it will be an integer.

This will give You 100 in float.

Code:
mov [edi],(float)100


Or this:

Code:
mov [edi],42c80000

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
mordax
Expert Cheater
Reputation: 1

Joined: 16 Apr 2010
Posts: 138

PostPosted: Mon Jan 10, 2011 12:22 pm    Post subject: Reply with quote

instant crash, tried all 3 of them, not working.

here's more info.

this is the instruction in cheat engine's memory viewer.
Code:
1012A3B1   D9 17   fst dword ptr [edi]


this is next instruction already, which means that i cant write more than 2 bytes there.
Code:
1012A3B3   5F



this here:
Code:
1012A3B1   D9 17   fst dword ptr [edi]

writes value to an address (value i want to change and where i got to this breakpoint). so i want to change it and tell it to ALWAYS write 55555, no matter what.
my friend told me to use jmp, but i dont know how.

something like
jmp 0x10000
mov [edi],(float)100
jmp 0x1012A3B3

so it jumps to my address, exectues the code and then jumps to next instruction.
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Mon Jan 10, 2011 12:25 pm    Post subject: Reply with quote

Yes, You need to use code injection. As it is done in Step 7 of the Cheat Engine tutorial.
_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
mordax
Expert Cheater
Reputation: 1

Joined: 16 Apr 2010
Posts: 138

PostPosted: Mon Jan 10, 2011 2:12 pm    Post subject: Reply with quote

plz guys, i have wrote trainers before and i know what code injection is and how to do it.
it is no use to me, if i dont know the specifc instruction that i need to inject, but thanks for offering.


nevermind this anyway, it is impossible to make what i tried, because this instruction is used for many other things too, this is why game crashes.

now new question, how do i replace a specifc thing ?
here's example.

Code:
fst dword ptr [edi] at 1012A3B1
is used for 3 things:
health
ammo
armor

how can i make it write 100 ONLY to AMMO and leave health and armor alone ?
i know its not hard, but im just missing something here.

note that this was only example, my case is much more complicated. this breakpoint with this instruction writes to about 20 different addresses. only of them being the one im after.
Back to top
View user's profile Send private message
kemicza
Newbie cheater
Reputation: 0

Joined: 10 Jan 2011
Posts: 11
Location: Belgium

PostPosted: Mon Jan 10, 2011 3:02 pm    Post subject: Reply with quote

First of all if you want to inject something into [edi] make sure that you do it after the fst instruction, because if you do it before fst will "oversave" it again, so nothing will happen basically.

Second; is if it's shared, the first thing you need to look for is an instruction that is NOT shared. You do this by putting a read/write/access breakpoint and analyzing all returned addresses. If you can't find it then you try to analyze the registers (eax,ebx,ecx,edx,etc) by setting a breakpoint at that current instruction. You try to look for a value in a register that will only be the same for a certain value for edi (which is your address/pointer to your health,ammo,etc). For example, if eax is always 1 when your edi is your ammo value, then you can make a code injection to make a "cmp eax,1" etc

Then there's other methods, where you trace back the calls where it came from. Usually health/ammo/etc will be called from a different location (not always tho), so you can set a flag (one byte in memory) from where ammo is called from, then compare it in your actual cave, when your flag value is 1, then you will know ammo was being called, and you can inject anything you want.

A third method is to actually figure out where the value of edi comes from. So you analyze the assembly code and try to understand it. If before you had something like this:
Code:
mov edi, dword ptr [eax*4+ebx]

Now it's possible that eax might be used as some kind of selector. Like 0 for ammo, 1 for health etc, or ebx in that case. So you will need some debugging skills to figure it out. And of course some creativity in your code cave and in general.

There's probably more methods, but these are the one's I use and work most of the time.
Back to top
View user's profile Send private message
mordax
Expert Cheater
Reputation: 1

Joined: 16 Apr 2010
Posts: 138

PostPosted: Mon Jan 10, 2011 3:19 pm    Post subject: Reply with quote

i dont understand it, i need more details.
as said before, i know how memory works. what comes from where and where it goes, but i need details. like WHAT do i click in cheat engine, where do i click ? what i select ?
i know best way is to find source address, where the value comes from, but i dont know how to find it.


Quote:
read/write/access breakpoint and analyzing all returned addresses

for example i dont understand this ! there is no such thing in cheat engine, it uses completely different frases. olly debugger uses "breakpoint, on write" or "breakpoint, on read" and such, but not cheat engine.
i need cheat engine specific guide, like what do i click in cheat engine.


I wasted 3 hours today, trying to figure it out using olly, tsearch and cheat engine.

i added screenshot, here's explanation.

>>1012A3B1 is the breakpoint of my address
17DD4E50 is my address

as seen in the upper right window, it writes to about 20 different addresses. (there will be more if you do more actions in game).

so from this point, how do i go on isolating it and make it write custom value only to 17DD4E50 ?



msn_screenshot_501.jpg
 Description:
 Filesize:  208.04 KB
 Viewed:  16675 Time(s)

msn_screenshot_501.jpg


Back to top
View user's profile Send private message
kemicza
Newbie cheater
Reputation: 0

Joined: 10 Jan 2011
Posts: 11
Location: Belgium

PostPosted: Mon Jan 10, 2011 3:25 pm    Post subject: Reply with quote

Where did you find the address that's currently in your "Memory Viewer": 1012A3B1 ?

EDIT: ah I think I see it. I'm using version 5.6. What version are you, because when I set "Find out what accesses this address", I get another type of window than you.

EDIT: lol you are also using 5.6, it says on the top. Maybe reinstall it or get 6.0?
Back to top
View user's profile Send private message
Geri
Moderator
Reputation: 111

Joined: 05 Feb 2010
Posts: 5636

PostPosted: Mon Jan 10, 2011 3:43 pm    Post subject: Reply with quote

Quote:
for example i dont understand this ! there is no such thing in cheat engine, it uses completely different frases. olly debugger uses "breakpoint, on write" or "breakpoint, on read" and such, but not cheat engine.
i need cheat engine specific guide, like what do i click in cheat engine.


Read the helpfile. Especially for CE 6, it is pretty detailed and You can find all this info in it. Takes about a minute.
And if You know how to use a debugger already, it shouldn't be hard to understand how is the CE debugger working. Basically the same way. Some options have different names but that shouldn't be a problem I guess.

_________________
My trainers can be found here: http://www.szemelyesintegracio.hu/cheats

If you are interested in any of my crappy articles/tutorials about CE and game hacking, you can find them here:
http://www.szemelyesintegracio.hu/cheats/41-game-hacking-articles

Don't request cheats or updates.
Back to top
View user's profile Send private message
Dacnomania
Expert Cheater
Reputation: 1

Joined: 03 Sep 2010
Posts: 124

PostPosted: Tue Jan 11, 2011 4:04 am    Post subject: Reply with quote

If there's a value that keeps changing just put a hot key for pausing the game, then pause it. Razz
Back to top
View user's profile Send private message Send e-mail AIM Address
Labyrnth
Moderator
Reputation: 9

Joined: 28 Nov 2006
Posts: 6285

PostPosted: Tue Jan 18, 2011 5:59 pm    Post subject: Reply with quote

HI YAH KEMI!

mordax, i think you are in allocated memory.
Right Click on first address in lower window and select goto address. The type in 1012A3B1 in the lower memory window.
If you see allocation instead of being inside of a module then you need to find what ,read,write or access's that address before you can move on.

_________________

Back to top
View user's profile Send private message
Psy
Grandmaster Cheater Supreme
Reputation: 1

Joined: 27 Mar 2008
Posts: 1366

PostPosted: Tue Jan 25, 2011 6:03 am    Post subject: Reply with quote

@mordax: That actually looks like java (from the screeny), with the code been dynamically allocated on each load. I think that's what you were getting at Lab? Hey btw, long time Smile If this is the case, you haven't picked a very good game to train at your current understanding. The code spot will move, your injection will effectively break etc..

At any rate, that code spot is heavily shared with other stuff, so i'd suggest you go and look over code-injection tutorials and also those which cover compares. You need to be able to make a distinction between the variable you're trying to hack and all the other crap which is piped through that spot.

As for the breakpoint confusion, allow me to clarify a little bit. There are two different places where you can use a BP. You can place one on DATA, game variables that you have found, IE. health/ammo etc. Or you can BP on CODE, that is game instructions that you have found after your initial debugging.

Now, depending on what debugger it is your using, will determine what actual 'types' of BP you can place and where. For example, Olly will allow you to place memory breakpoints or hardware breakpoints in the memory pane view (generally used initially to find what accesses a given variable), and uses INT3 software BP's for standard BPs in code. Useful when actually reversing and tracing etc. CE has always allowed you to use the same method for finding code (memory access exceptions and debug regs), but I believe it only offers the debug regs (HW BP's) in the latest ver. For BP'ing in the assembler view, again it used to allow both hardware bp's and software bp's (int3's), but I think it's now just the HW bp's in v6.

I'm guessing some of that didn't make sense. This is why you need to read. People can only put so much help up here before it becomes a waste of time. After every post there will be a new question Razz

~Psych
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 468

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

PostPosted: Tue Jan 25, 2011 7:40 am    Post subject: Reply with quote

just to clarify, when you set a breakpoint on data variables it is an hardware breakpoint, but if you set one at the code it depends on the setting you have chosen. If t's set to hardware breakpoints it will use hw breakpoint until they are used up and then asks if you want to use a int3 bp instead. And if you have it set to int3 bp's it will use int3 bp's
_________________
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
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