1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Support us, Your donations help keep the Forum online and allow us to buy more Games.
    Please include Forum Username to help us upgrade your account , You could donate by sending payments to omoewtf@gmail.com directly if donation button doesnt work for you.
    Dismiss Notice

Someone know how to hook and call game functions ?

Discussion in 'Programming Related' started by elodia, May 2, 2016.

  1. elodia

    elodia Active Member

    75
    28
    18
    hi all :)
    i am trying to learn how to hook and call game function that send packet to server (for example in world of warcraft game, in private server :)
    WoW game is encrypting opcodes and then it will send to the server, so programs like WPE PRO will see opcode encrypted. This is why i will need to hook and call some function before it will encrypt it (the codes are not a problem since there is a website with all)

    my only problem is how to start, how to put it together, i know little of C# and C++ , if you guys can help me with some video or any good info about how to start this i will appreciate it, i search 2 weeks and i only learn the things that i just type :)

    i am trying to make program exactly like this :)
     

  2. Mandrakia

    Mandrakia Donor Donor

    13
    6
    53
    Usually for this type of stuff you need to inject some code into the host process, then make a detour on a function that you know is called in the main loop (usually D3D.Render() ) then do some stuff in your own code like call x or y function.

    If you wanna do it in .Net it's possible and the steps look like this.

    - Inject your module in the process memory
    - Load .Net framework into the process memory
    - Hook D3D.Render to call a function in your module.

    Now you have a function that is called each frame of the game. You can create a thread and do your stuff in it or whatever logic you wanna do in your function.

    The nice thing about injecting your .Net module in a process is that you can declare a delegate of whatever game function you want to call and call it .Net style
     
    elodia likes this.
  3. sbseed

    sbseed Member

    17
    1
    3
    your question requires knowledge of what engine you are using, or programming/syntax being used in a given program or game...

    however for pure programming in C++:
    use proper syntax - if statements and call function once certain conditions are met...
    using hooks its different, because it is calling outside of the current file/program for functions...

    if health is < 100, get current;
    then print echo health to UI element health;
    end if;

    or often something similar for C++
    C# or C Sharp is different using less syntax to create calls

    call.function health
    current write element

    or something similar, i am much less familiar with C# so this might not be accurate...


    hooks are like a switchboard, first it gets the attention of the program and tells it were it needs to look for overrides...
    if i understand hooks properly...


    the best way to learn C# is to use microsoft free programming tools and looking at written code and examples...
    there are also a ton of books and other materials you can barrow from libraries as well as information online, you can find some stuff using google search.
    this also helps if you plan to call .dll libraries that already exist within the OS environment, then of course there is usage that you need to understand to use outside addons for engines such as nvidia and radeon functionality...

    for specifics you really do need the books AND the programs involved that you plan on using.
    also, unlike my examples you need to pay close to attention to spelling and keep spelling constant for non-function stuff you have created to be called.
     

Share This Page