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 


Code injection working for me, not for others

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

Joined: 11 Jan 2016
Posts: 42

PostPosted: Thu Jul 07, 2016 5:38 pm    Post subject: Code injection working for me, not for others Reply with quote

Hello CE Community. I can't figure this one out.

I made a script using AOB Injection to find an address. It works for me but not for a friend. With my help, he can find the address manually. He can edit the value and see results in-game as expected, but the script that should find it doesn't find it. The game is DMC Devil May Cry. The target address controls scene desaturation (black and white). While that may not seem very interesting, it's easy to test that we are close to the interesting stuff like DOF and tonemapping.

I had him follow steps to recreate the script. What he finds is identical. Same injection point and AOB string. It is all straightforward. Manually scanning the AOB string, he finds one result. Clicking "Find out what accesses this address" on the address gives one result. Going to the instruction and clicking "Find out what address this instruction accesses" gives one result -- the original address. Making an AOBscan for the instruction produces exactly what I sent him originally. When he adds the script, makes my edits (to make a symbol for it), creates the pointer (symbol+offset) and activates the script...nothing happens. See here (his screencap).

So, we can verify this address exists for him and value is editable. He found the same AOBscan for it. The same script that works for me just doesn't for him. Anyone have an idea why? I have made a few successful freecam tables. I feel pretty good that this should work and that he is doing everything right.

The table: here.

The code: // edited to make a new symbol, _dof
Code:

[ENABLE]

aobscanmodule(dofAOB,DMC-DevilMayCry.exe,F3 0F 10 97 A8 00 00 00 81)
alloc(newmem,$1000)

label(code)
label(return)

globalalloc(_dof,4) // <--------------added line

newmem:

code:
  mov [_dof],edi // <---------------added line
  movss xmm2,[edi+000000A8]
  jmp return

dofAOB:
  jmp code
  nop
  nop
  nop
return:
registersymbol(dofAOB)

[DISABLE]

dofAOB:
  db F3 0F 10 97 A8 00 00 00

unregistersymbol(dofAOB)
dealloc(newmem)

_________________
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Thu Jul 07, 2016 5:54 pm    Post subject: Reply with quote

I notice all the pointers are pointing at addresses just past 0. If I had to guess, your friend isn't doing whatever is needed in order for the game to run that section of asm. If you just leave the game paused, that asm may never run, and that symbol will stay at its initialized value (0).
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
idk31
Cheater
Reputation: 1

Joined: 11 Jan 2016
Posts: 42

PostPosted: Thu Jul 07, 2016 6:16 pm    Post subject: Reply with quote

ParkourPenguin wrote:
I notice all the pointers are pointing at addresses just past 0.


I don't understand. The offsets are small, yes. Is it because of 000000A8 in this instruction: movss xmm2,[edi+000000A8]? I notice that usually when the offset is +A8 the instruction will be like EDI+A8, but this is EDI+000000A8. I'm doing things as usual. The pointer is symbol+offset. And the offset is only +A8.

How things look with no changes when I run the table.

_________________
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 Jul 07, 2016 6:21 pm    Post subject: Reply with quote

Make sure he activates the script first, before adding/creating the pointer addresses to the table.

If that still doesn't work, then the instruction that he is hooking is not getting accessed, for whatever reason.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Thu Jul 07, 2016 6:26 pm    Post subject: Reply with quote

You are using a code injection to get the base address of something.

A code injection changes the game's code and redirects it to your code.

If the game never runs the code, it will not be executed.

The symbol _dof will not get populated until that code is executed.

Therefore, the game needs to run that code in order for _dof to point to the address you want.

If the game does not run that code, _dof will remain at 0, and will result in the addresses shown in your friend's image. When the game does run that code, _dof is populated with the correct address, which results in the addresses shown in your image.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
STN
I post too much
Reputation: 43

Joined: 09 Nov 2005
Posts: 2676

PostPosted: Thu Jul 07, 2016 11:12 pm    Post subject: Reply with quote

This will help

https://en.wikipedia.org/wiki/Control_flow

_________________
Cheat Requests/Tables- Fearless Cheat Engine
https://fearlessrevolution.com
Back to top
View user's profile Send private message
idk31
Cheater
Reputation: 1

Joined: 11 Jan 2016
Posts: 42

PostPosted: Fri Jul 08, 2016 2:58 am    Post subject: Reply with quote

ParkourPenguin wrote:
If the game does not run that code, _dof will remain at 0, and will result in the addresses shown in your friend's image. When the game does run that code, _dof is populated with the correct address, which results in the addresses shown in your image.



The instruction is firing off several hundred times a second. It's always running. It's part of postprocess rendering. It should instantly populate the address as it does for me. This is the only problem script though. The other scripts work for him. I don't believe I have made an error in my pointers and I deleted my User-defined symbol cache to make sure the script is the thing populating it.

_________________
Back to top
View user's profile Send private message
panraven
Grandmaster Cheater
Reputation: 62

Joined: 01 Oct 2008
Posts: 958

PostPosted: Fri Jul 08, 2016 3:56 am    Post subject: Reply with quote

sorry, useless comment due to careless reading~_~

<--deleted->

_________________
- Retarded.


Last edited by panraven on Fri Jul 08, 2016 12:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Fri Jul 08, 2016 8:52 am    Post subject: Reply with quote

Are you certain it's also running several hundred times a second for him?

If you both have the exact same table (i.e. your friend did not mess with it at all), then the symbol is not being populated for your friend. The only reasonable explanation (I can think of) is that code is not being run for him.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
idk31
Cheater
Reputation: 1

Joined: 11 Jan 2016
Posts: 42

PostPosted: Fri Jul 08, 2016 9:00 am    Post subject: Reply with quote

ParkourPenguin wrote:
Are you certain it's also running several hundred times a second for him?


Yes.

I took him through the steps to recreate the aobscan from scratch. His result was exactly what I sent him. To quote him, "Yes. I see the thing. It's counting up..."

_________________
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Fri Jul 08, 2016 9:21 am    Post subject: Reply with quote

If he can build it himself, but it still wont work, then something is off.
That something is him.

Get a new friend, or ask him to turn himself off and on again to fix all bugs.
He could try his computer too.

I was intrigued until you stated you walked him through the process of making it himself, generated the same code, and he still managed to make the code not work!

In the interests of fixing his problem, have him download the newest CE. Check your CE settings against his.
Make him stand in game where you are standing, looking where you are looking, with game settings exactly as yours, eventually you will figure out what he is doing wrong. Make him describe EVERYTHING. Eventually, you will get an "oh" out of him or you will hit yourself in the face when you realize what he is doing wrong.

I understand your pain, because I too, have a friend like this, and things don't work for him because he is intellectually challenged. I still love him but he just breaks things by being incompetent. His favorite statement when it comes to fixing his problems "you didn't tell me i needed to *turn the computer on*, *start CE*, *open the game*, *connect ce to the process*, *activate the script*, *something insanely simple that anyone with a heartbeat should instinctively know*"
Back to top
View user's profile Send private message
idk31
Cheater
Reputation: 1

Joined: 11 Jan 2016
Posts: 42

PostPosted: Fri Jul 08, 2016 9:36 am    Post subject: Reply with quote

cooleko wrote:

Make him stand in game where you are standing, looking where you are looking, with game settings exactly as yours, eventually you will figure out what he is doing wrong. Make him describe EVERYTHING. Eventually, you will get an "oh" out of him or you will hit yourself in the face when you realize what he is doing wrong.


I would love to go over there and be able to say "Oh! Well HERE'S your problem....", but this is a Steam friend in a different country. Smile Yes. I know that introduces another set of variables... but this is the only problem script. Oh well.

_________________
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Fri Jul 08, 2016 9:41 am    Post subject: Reply with quote

My friend is also too far away for me to be in person, that is why I described my process for remotely fixing his problems. But, I did assume you could skype/talk with him.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4702

PostPosted: Fri Jul 08, 2016 10:15 am    Post subject: Reply with quote

Another thought is that maybe another script is interfering with that one, but I figure both you and your friend have tested that already.

I'll still assert that [_dof] == 0. Tell your friend to activate the script, set a breakpoint at the injection point, step through it, and figure out what's going on.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jul 08, 2016 12:41 pm    Post subject: Reply with quote

++METHOS wrote:
Make sure he activates the script first, before adding/creating the pointer addresses to the table.

If that still doesn't work, then the instruction that he is hooking is not getting accessed, for whatever reason.
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