Results 1 to 7 of 7
  1. #1
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow

    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

  2. #2
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by Davidm44 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?

  3. #3
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    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.

  4. #4
    zeco's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Canada
    Posts
    683
    Reputation
    12
    Thanks
    78
    My Mood
    Cynical
    Quote Originally Posted by Davidm44 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?

  5. #5
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    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
    Ah we-a blaze the fyah, make it bun dem!

  6. #6
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    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?

  7. #7
    Hell_Demon's Avatar
    Join Date
    Mar 2008
    Gender
    male
    Location
    I love causing havoc
    Posts
    3,976
    Reputation
    343
    Thanks
    4,320
    My Mood
    Cheeky
    Quote Originally Posted by Davidm44 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
    Ah we-a blaze the fyah, make it bun dem!

Similar Threads

  1. [REQUEST] Call Inject function [Solved]
    By jajarem64 in forum Visual Basic Programming
    Replies: 3
    Last Post: 01-24-2011, 08:34 AM
  2. [Tutorial(C++)]How to call functions within another process
    By radnomguywfq3 in forum Programming Tutorials
    Replies: 4
    Last Post: 07-08-2008, 07:33 PM
  3. Call of Duty2
    By wyld707 in forum General Game Hacking
    Replies: 4
    Last Post: 05-21-2006, 03:32 PM
  4. They Call it "The Internet"
    By Dave84311 in forum General
    Replies: 14
    Last Post: 05-17-2006, 09:21 PM
  5. someone at warrock is calling everyone to this site
    By ak-47 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 02-10-2006, 12:35 PM

Tags for this Thread