0

If I want to modify a function which has calls to other classes and functions in the application, but I don't want to reverse all of those other classes and leave them as they are, how do I go about creating a function for my proxy dll?

I.e. there is decompiled function like this:

int __thiscall gladius::Game::main(Game *this,int param_1,char **param_2,char **param_3)

{
  initialize(this,param_1,param_2,param_3);
  proxy::gui::GUI::run(*(GUI **)(this + 0x28));
  quit(this);
  return 0;
}

I don't want to change anything in initialize() function or quit() function, but both of them exist in the same class, so I need a stub for them, so that the code compiles?

So, if I write something like:

namespace gladius
{
    public class Game
    {

        static int main(Game game, int a2, char a3, char a4)
        {
            initialize(this, a2, a3, a4);
            gladius::world::World::create();
            quit(this);
            return 0;

        }

How do I reference initialize and quit without introducing them to my dll (so that the original definitions for those functions are used)?

If I were to add call to create() function from the different class (without modifying it), how do I do that as it is not part of my project or shall I reference the entire original exe disassembly?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.