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 


Getting addresses from an ASM...

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Apr 04, 2013 12:33 am    Post subject: Getting addresses from an ASM... Reply with quote

How can I get the address of
Code:
mov eax,[ecx+40]

(see picture below)

And then compare it with registered symbol?
Im using Breakpoints.

Code:
if (getAddress(ECX+0x40)) == value then
--do what I want...

but did not work..

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Thu Apr 04, 2013 3:55 am    Post subject: Reply with quote

Is value an integer or a string representing a ceaddress?
If integer then just do "if (ECX+0x40) == value then"

If it is a string formatted as a ceaddress then first convert value to an integer
tonumber("0x"..value)

(Comparing strings is not a good idea because char case gets in the way)

_________________
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
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Thu Apr 04, 2013 5:55 am    Post subject: Reply with quote

Well that did not work.
Did this, Like if Damage ones get triggered, It skipping it like it does not equal.
And ECX+40 = address of value.
Like if Address of value is 0x3784E1DC, so the Address of (ECX+0x40) is also 0x3784E1DC

I do not compare between strings.
And comparing between values does not really help, because if(readInteger(ECX+0x40)==100) it printing the Success for the value if damage part.
BUT printing the FAIL part Ammo and Fire rate.

Or there any better alternatives?
Code:
function debugger_onBreakpoint()
 if (ECX+0x40) == value then -- Damage
  debug_removeBreakpoint(value)
--    if(readInteger(ECX+0x40)==100) then --Not required anymore.. because if ecx+40 equals to Value address, then I don't need to check the value anymore.
     registerSymbol("ValueEIPaddress", EIP)
     print("Success (value)")
     else
      print("Failed(value)")
--    end
  end

 if (ECX+0x30) == Ammo then -- Ammo
   debug_removeBreakpoint(Ammo)
--    if(readInteger(ECX+0x30)==30) then -- Same about here..
       registerSymbol("AmmoEIPaddress", EIP)
       print("Success (Ammo)")
     else
       print("Failed(Ammo)")
--    end
  end

 if (ECX+0x20) == Rate then --Fire rate..
   debug_removeBreakpoint(R)
--    if(readInteger(ECX+0x20)==5000) then -- Same about here..
       registerSymbol("RateEIPaddress", EIP)
       print("Success (Rate )")
     else
       print("Failed(Rate )")
--    end
  end

  debug_continueFromBreakpoint(co_run)
end

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Mohsen
Advanced Cheater
Reputation: 1

Joined: 04 Apr 2013
Posts: 69
Location: PE

PostPosted: Fri Apr 05, 2013 12:48 am    Post subject: What did not work exactly ? Reply with quote

What did not work exactly !?
Your AA code and trainer related or Cheat Engine functions ?

EDIT: BTW your code is really ugly and inefficient..
Never try attach debugger to your game.exe in your real trainer.
You could simply do a hook plus code injection and use cmp eax, YOUR_VAL + je Yes_Its
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri Apr 05, 2013 3:46 am    Post subject: Reply with quote

I cannot find its assembly, 25+ results are given each time I scan for it.
I use aobscan to find the ammo (using wildcards).
Then attaching debugger to it, and to 4 bytes and checking what accessing it.

And this one did not work
Code:
 if (ECX+0x40) == value then -- Damage

I want to compare between ecx+0x40 address to 'value' address.

I'm checking what access to 3 addresses at the same time *.

P.S
I cannot use address, because its a browser based.
No static addresses, ever.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Mohsen
Advanced Cheater
Reputation: 1

Joined: 04 Apr 2013
Posts: 69
Location: PE

PostPosted: Fri Apr 05, 2013 4:01 am    Post subject: Reply with quote

No matter if it's browser based or not.
The browser or any emulator has pointer to that variable. That's why CPU can read and modify it in your ram.

The pointer you are looking for might be similar to this :
[Browser.exe+Pages]->Page[GamePage]->[GameData+Ammo]

Give me URL and I might do this for you when I'm free.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri Apr 05, 2013 4:16 am    Post subject: Reply with quote

Dude..
Im telling you, YOU CANNOT use pointer for FLASH games.
Seriously,
If you're so genius, I want you to make a pointer for a simple game (kongregate.com), that will work ALWAYS.
And work for me too.

I spent few months ago, hours over hours trying to find pointers.
reached the conclusion that its not possible.
No matter how much levels and etc.
It just don't work (after you restarted browser, thats the main target, or started a new flash processor).

I asked for help with getting the address of assembly instruction,
I did not ask how to do it "right", because theres no right way that I know.
I asked if there any alternatives to check if the addresses are equal.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Mohsen
Advanced Cheater
Reputation: 1

Joined: 04 Apr 2013
Posts: 69
Location: PE

PostPosted: Fri Apr 05, 2013 4:20 am    Post subject: Reply with quote

You CAN use pointer for flash games.
Anyway just tried to help. Sorry if you didn't want it and good luck with it Smile
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri Apr 05, 2013 4:24 am    Post subject: Reply with quote

Mohsen wrote:
You CAN use pointer for flash games.
Anyway just tried to help. Sorry if you didn't want it and good luck with it Smile

Instead of telling me what to do,
You can show me a live example.

Right now, without any "proof" that its possible, I still believe its not.

And when I meant pointer, I meant a pointer that don't relay on X processor. (When I make trainers, I make them to work with multiply browsers, e.g FlashPlayerPlugin, Opera, plugin-container etc.)

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
Mohsen
Advanced Cheater
Reputation: 1

Joined: 04 Apr 2013
Posts: 69
Location: PE

PostPosted: Fri Apr 05, 2013 4:30 am    Post subject: Reply with quote

Man your posts are quite rude to me.
I'm here to help and I made posts on your topic because you just asked ' Or there any better alternatives? '

Beside I don't need to prove anything to you, once again I'm telling you give me URL so I can make a example.

Also 'plugin-container' either 'FlashPlayerPlugin' is NOT called a browser.
Back to top
View user's profile Send private message
daspamer
Grandmaster Cheater Supreme
Reputation: 54

Joined: 13 Sep 2011
Posts: 1588

PostPosted: Fri Apr 05, 2013 4:46 am    Post subject: Reply with quote

Mohsen wrote:
Man your posts are quite rude to me.
I'm here to help and I made posts on your topic because you just asked ' Or there any better alternatives? '

Beside I don't need to prove anything to you, once again I'm telling you give me URL so I can make a example.

Also 'plugin-container' either 'FlashPlayerPlugin' is NOT called a browser.

The game I play is browser game (when i said browser game I meant a game that can be played in your browser, not an text-based, a flash game that can be played in your browser, and not download able).
The browser I use which is firefox, has a child processor that are run under FlashPlayerPlugin and Plugin-container.exe .
FlashPlayerPlugin, mostly used in all kind of os operation system (some* of XP, vista, win 7 and 8 ).
And Plugin-container.exe is used in some of XP, or Unity3D games.

Now the game I play is a Flash game, and I don't want to name its name, because rules (PM and I will tell you why, if you want to know).

Didn't really wanted to be rude, I just didn't like it that post,
Like really, I know that my CPU can read it, but its can be different between CPU X and CPU Y.
And when I hack games, I don't do it for self-use, I do it for for all members who seeking to do the same without having much of work to do it, and each member and member that wants to use it, has a different CPU, a different browser, a different operation system, so its not easy.

I rather to use aobscan+breakpoints, because it working 99.9% of the time without issues, when the game wasn't updated.
And it most likely not to be changed.

Assembly aobscan is something I use commonly, and its what I use when I make scripts, but in this case, theres to much results, so Its not possible to track down the right address.

_________________
I'm rusty and getting older, help me re-learn lua.
Back to top
View user's profile Send private message Visit poster's website
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