Calling functions?

Posts 1–7 of 7 · Page 1 of 1
Calling functions?
Hey, I was wondering if you could call functions from another program in C++ without using inline ASM. Like if there's any other ways.

For example, I have an address for a function and all the parameters for it. How do I call it without inline ASM? In assembly it would be call 0052A48D or something. Just wondering if you can do that in C++.

Thanks
Quote Originally Posted by Void View Post
Hey, I was wondering if you could call functions from another program in C++ without using inline ASM. Like if there's any other ways.

For example, I have an address for a function and all the parameters for it. How do I call it without inline ASM? In assembly it would be call 0052A48D or something. Just wondering if you can do that in C++.

Thanks
Hmmm i believe you just made me realize the point of function pointers xD.

But wait. Nevermind, cause i can't think of how to utilize function pointers with an address from a different process.

Hmm for example. With that address, if you called it using inline assembly, do you not need to specify which process or executable it's coming from?
Quote Originally Posted by zeco View Post
Hmmm i believe you just made me realize the point of function pointers xD.

But wait. Nevermind, cause i can't think of how to utilize function pointers with an address from a different process.

Hmm for example. With that address, if you called it using inline assembly, do you not need to specify which process or executable it's coming from?
Yeah you would. But with inline ASM I was thinking of DLL injection. Even so, I don't know exactly how to call functions. I think it's something like:

Code:
__asm {
PUSH parameter1
PUSH parameter2
CALL function
}
Making hacks are so confusing.
Quote Originally Posted by Void View Post
Yeah you would. But with inline ASM I was thinking of DLL injection. Even so, I don't know exactly how to call functions. I think it's something like:

Code:
__asm {
PUSH parameter1
PUSH parameter2
CALL function
}
Making hacks are so confusing.
Yeah that's how you call functions. But im curious how you would jmp to another module, actually i think i may know that now.

I wonder how do you load a module in your assembly program?
if the games function is:
Code:
void BULLSHITFUNCTION(int abc, bool def)
{
    //their 1337 code goes here
}
and you know where in the process its stored, use the following from a dll:
Code:
void *pBULLSHITFUNCTION(int abc, int def) = (void*)0xB4DF00D;
then you can call it using
pBULLSHITFUNCTION(123,456);
I think, not sure been a long time since I worked with function pointers
Quote Originally Posted by Hell_Demon View Post
if the games function is:
Code:
void BULLSHITFUNCTION(int abc, bool def)
{
    //their 1337 code goes here
}
and you know where in the process its stored, use the following from a dll:
Code:
void *pBULLSHITFUNCTION(int abc, int def) = (void*)0xB4DF00D;
then you can call it using
pBULLSHITFUNCTION(123,456);
I think, not sure been a long time since I worked with function pointers
Is that using a DLL or can I just make another program to do that?
Quote Originally Posted by Void View Post
Is that using a DLL or can I just make another program to do that?
using a DLL, You could try to use CreateRemoteThread and do everything from there but a dll is easier I think
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us