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 


Need some help dissecting code structures
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Mon Nov 18, 2013 3:49 pm    Post subject: Need some help dissecting code structures Reply with quote

Hey I'm fairly new to the whole code structure dissection so I'd like to ask some questions for example what's the best way to find rate of fire and reload speed? So far I know how to find the ammo in clips, find what writes to it and with that find the base offset of everything and then dissect it's code structure. I know that rate of fire should be a value that starts from 0 and instantly increases to a very large number and that reload speed should be something that starts with 0 and when you start reloading it jumps to a high number and quickly goes down as you reload. I used both COD Ghosts and BF4 to try this. In COD Ghosts I found NOTHING! Literally the only changing values when I dissected the code structure were my ammo and grenades, everything else stood while even when I was firing my weapon or reloading. As for BF4 I found 1 suspicious looking value that changed kind of life a rate of fire should, but when I froze it, the whole game froze and unfreezing it made the game go back to normal as if nothing happened. Can someone help me? I don't know what I'm doing wrong. I thought that in COD Ghosts it would've worked best as I followed Geri's tutorial on the first COD MW. Also another thing is that in the code dissection I didn't find any Dword values, only 4 bytes, floats and pointers. Can anybody help me figure this out?

On a side note, does anybody know how I can split shared codes? For example this - mov [eax+0C],ecx - is supposed to be for infinite money so I re-shape it into this - mov [eax+0C],#999999 - and in turn, I do have infinite money but this same code ALSO affects any kind of ammo and other stuff. How do I separate it from the shared code so that it ONLY changes the money value and the other codes are also separated so that I can make separate options for them in my trainers? So far I know it's got something to do with code dissection and finding the base offset for the player structure. I know how that I find what writes it and then click on more information and for example it's EAX and lower down I see the address of said EAX. After that I click on add address manually, put in the EAX and then I think I've got the base address, after which I browse the memory region, dissect code/structure, and I don't know what to do after that. Correct me if I'm doing anything wrong so far but I don't know how to continue after that. Can anyone help me with this as well?
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 1:19 am    Post subject: Reply with quote

Anyone? For the record, I know I can find rate of fire and reload speed by searching for it directly with CE, but people say that it's easier to do it by dissecting the base code structure of the weapon. Also, I'm not sure if this matters, but I'm using CE 6.3
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 891

PostPosted: Tue Nov 19, 2013 5:03 am    Post subject: Re: Need some help dissecting code structures Reply with quote

kik4444 wrote:
I know that rate of fire should be a value that starts from 0 and instantly increases to a very large number and that reload speed should be something that starts with 0 and when you start reloading it jumps to a high number and quickly goes down as you reload.

How do you know this? I can't authoritatively say one way or another, but it sounds like an unsafe assumption to me. If I had to guess, I would guess that the numbers don't change while firing, but only when affected by a buff or perk or whatever.

kik4444 wrote:
the code dissection I didn't find any Dword values, only 4 bytes, floats and pointers.
What's the difference between dword and 4 bytes?

kik4444 wrote:
How do I separate it from the shared code so that it ONLY changes ...
You've just got to either identify some invariant (eg, in the simplest case the value of some register may always be one thing for money and something different for ammo) or compare the address being acted upon to one you've identified and stored away elsewhere. If you already have an infinite ammo script that gets triggered whenever you fire, then you can save your ammo address and check against it later.

Really, the dissecting tool is just a handy way to have multiple annotated memory views available at once. It is a very useful tool, but it's not going to automatically hack games for you. A good example use case in your situation might be in trying to find reload speeds: you might not be able to do a typical search for reload speeds because you have to exit the level to change your loadout and when you return all the values are in different places. However, you know how to find the base of the active weapon class from your ammo hacks. So, you start to map out the weapon class with the dissect tool and look for changes with respect to loadout.
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 6:09 am    Post subject: Reply with quote

On Assassin's creed 4 the code for money, ammo and ship resources is shared so I tried to split it by dissecting the base address of the ammo and comparing eax+04, which was 11 for ammo and 1 for money, after which I made to script to jump to exit (je exit) where I wrote a script that should make the ammo infinite, while leaving the money alone. The code which writes to ammo and money was (I think) mov [eax+0C],ecx and mov al,01.
So in the exit part (where the code should jump to, if eax+04 is 11) I wrote mov [eax+0C],#999999, but after activating that option, nothing changes. What am I doing wrong?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Nov 19, 2013 11:21 am    Post subject: Reply with quote

Paste your script here.
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 12:01 pm    Post subject: Reply with quote

I think it'd be better if I just showed you everything. I'm fairly new to splitting up codes like this (just found out yesterday night) and I'm sure something is wrong here but I just don't know what yet. Also I want to say that using this method on the last step of the CE tutorial, making it exactly like this, makes the enemy team's health waste normally, but attacking my team causes their health to jump somewhere to 6.23423342389747234 and after a few more attacks it gives me "Invalid floating point operation".


script.png
 Description:
 Filesize:  283.48 KB
 Viewed:  24238 Time(s)

script.png


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

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Nov 19, 2013 12:08 pm    Post subject: Reply with quote

Code:
ammo:
mov ecx,#999
mov [eax+0C],ecx
mov al,01
jmp returnhere
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 12:11 pm    Post subject: Reply with quote

What about nopping? Do you know where I can learn more about it and if it's required in any of this?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Nov 19, 2013 12:16 pm    Post subject: Reply with quote

NOP means 'no operation'. If you want to NOP something, just leave it out. For example, if you want to NOP ammo value changing:

Code:
ammo:
mov al,01
jmp returnhere
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 12:25 pm    Post subject: Reply with quote

Ok so I did it like this and nothing happened


script.png
 Description:
 Filesize:  145.37 KB
 Viewed:  24207 Time(s)

script.png


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

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Nov 19, 2013 1:19 pm    Post subject: This post has 1 review(s) Reply with quote

Because you need to fix your compare. You need to write 29 in hex format. Right-click on offset 002C in your structure table, and select 'change element'. Click the 'Hexadecimal' box. Now, compare that value in your script.
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 1:52 pm    Post subject: Reply with quote

THX, It finally works! Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy Very Happy How do I rep+ you?
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Nov 19, 2013 2:23 pm    Post subject: Reply with quote

Glad it's working.

+rep with yellow thumb under avatar.
Back to top
View user's profile Send private message
kik4444
Expert Cheater
Reputation: 0

Joined: 07 Sep 2013
Posts: 120
Location: Bulgaria

PostPosted: Tue Nov 19, 2013 2:32 pm    Post subject: Reply with quote

Maybe my acc isn't old enough or something, cause I don't see any thumbs below your avatar, look -


rep bug or what.jpg
 Description:
 Filesize:  198.67 KB
 Viewed:  24126 Time(s)

rep bug or what.jpg


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

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Tue Nov 19, 2013 2:53 pm    Post subject: Reply with quote

Yes, your permissions are restricted.
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
Goto page 1, 2  Next
Page 1 of 2

 
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