0

I am trying to modify the main function for a specific decompiled .exe. More specifically, I want to remove the reference to GUI from that .exe file, so that GUI doesn't get initialised on the startup and also make a call to a different function, which normally gets called from the subsequent GUI dialog.

Example:

__int64 __fastcall gladius::Game::main(gladius::Game *this, int a2, char **a3, char **a4)
{
  gladius::Game *v4; // rbx@1

  v4 = this;
  gladius::Game::initialize(this, a2, a3, a4);
  proxy::gui::GUI::run(*((proxy::gui::GUI **)v4 + 5));
  gladius::Game::quit(v4);
  return 0i64;
}

called from the entry point to this program:

int main(int param_1,char **param_2,char **param_3)

{
  int iVar1;
  Game local_68 [96];
  
  gladius::Game::Game(local_68);
  iVar1 = gladius::Game::main(local_68,param_1,param_2,param_3);
  gladius::Game::~Game(local_68);
  return iVar1;
}

I want to change this to something like this:


__int64 __fastcall gladius::Game::main(gladius::Game *this, int a2, char **a3, char **a4)
{
  gladius::Game *v4; // rbx@1

  v4 = this;
  gladius::Game::initialize(a2, a3, a4);
  gladius::world::World::create();
  gladius::Game::quit(v4);
  return 0i64;
}

Will call to the gladius::Game::main be possible from say proxy DLL in this case? Or as it is a main function it won't be called properly?

2
  • 1
    This code doesn't look C# to me. Jul 12 at 20:48
  • 1
    You are correct. Changed the header.
    – Irbis77
    Jul 13 at 17:28

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.