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] Calling an "inprogram" function with an inj

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
kittonkicker
I post too much
Reputation: 1

Joined: 19 Apr 2006
Posts: 2171

PostPosted: Sun Aug 19, 2007 5:18 am    Post subject: [HELP] Calling an "inprogram" function with an inj Reply with quote

EDIT: Title should read: [HELP] Calling an "inprogram" function with an injected DLL.

Ok, I know of a few function locations in a game I play (move, use skill, start quest, use item, gethp/mp, etc), but I'm not sure how exactly I'd go about calling them.

The GetHP/GetMP are simple to call, because they don't take any parameters (they just return an integer value), so I can simply typedef them in, and then do
Code:
int HP = GetHP();
.

But anything which takes any parameters, I always get access violations when I try to call them.

I understand some sort of register preparation is needed before it'll work, but would anyone care to explain how I can acheive this? Is it best to set a BP on the function, and then trace back through the stack and find out which parameters are used/registers it uses?
Back to top
View user's profile Send private message
Robotex
Master Cheater
Reputation: 0

Joined: 05 Sep 2006
Posts: 378
Location: The pizza country!

PostPosted: Sun Aug 19, 2007 6:39 am    Post subject: Reply with quote

if they are class methods you have to use inline assembly

example

class test
{
public:
void func1(int);
}

test testinst;

you have to get testinst and then

__asm
{
push myint
mov ecx, testinst
call func1
}

_________________

ASM/C++ Coder
Project Speranza lead developer
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sun Aug 19, 2007 8:18 am    Post subject: Reply with quote

Read up on Calling Conventions, http://www.codeproject.com/cpp/calling_conventions_demystified.asp

Then check the code for there functions, and figure out what the calling convention is. Then prototype the functions with the proper macro.

~nog_lorp

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
kittonkicker
I post too much
Reputation: 1

Joined: 19 Apr 2006
Posts: 2171

PostPosted: Sun Aug 19, 2007 9:31 am    Post subject: Reply with quote

Aww thanks nog!! I was looking for something just like that!

Hopefully I'll be able to get it to work now ^_^.
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sun Aug 19, 2007 9:40 am    Post subject: Reply with quote

Very Happy
What game are you doing this with? This reminds me of botting for RuneScape - so easy because you can use the Java methods in the game for everything (once you find them).

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
kittonkicker
I post too much
Reputation: 1

Joined: 19 Apr 2006
Posts: 2171

PostPosted: Sun Aug 19, 2007 3:03 pm    Post subject: Reply with quote

It's for FlyFF.

When nForce released his trainer ages ago, I was able to decrypt the .offs files he used (which contained addresses/pointers his trainer used), and update them.
Back to top
View user's profile Send private message
ups2000ups
I post too much
Reputation: 0

Joined: 31 Jul 2006
Posts: 2471

PostPosted: Mon Aug 20, 2007 10:48 am    Post subject: Reply with quote

kittonkicker wrote:
It's for FlyFF.

When nForce released his trainer ages ago, I was able to decrypt the .offs files he used (which contained addresses/pointers his trainer used), and update them.


do you know if Nforce making new stuff now ? (for any games)

_________________
dont complain about my english...
1*1 = 2?
Back to top
View user's profile Send private message
kittonkicker
I post too much
Reputation: 1

Joined: 19 Apr 2006
Posts: 2171

PostPosted: Mon Aug 20, 2007 11:50 am    Post subject: Reply with quote

I doubt it.

He's been threatened with two lawsuits now I think! It's not worth the risk for him.
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 programming 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