recode an .exe file?

Good day,
I once received an .exe from a colleague.
As soon as I run the program, I have the option to activate my autoclicker with "f4" or to destroy it with "f8." However, I would like to rebind the "f4" key, and as far as I know, that's only possible if I recode the program, so I'm wondering how and with which tool.

I just found the cpp code,
Can someone explain to me how I can change it and convert it back into an exe file ? https://github.com/itsnotjohn/vepe-clicker-fixed/blob/main/main.cpp

(2 votes)
Loading...

Similar Posts

Subscribe
Notify of
2 Answers
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
CosmiqUser
1 year ago

Hello,

the nice user medmonk has already delivered a very good response.

Nevertheless, I do not want to take it to offer you another faster alternative than solution. You’re talking about “umcoden” and not recompiling. You can easily recode with a HexEditor or a Debugger/Disassembler.

Sure, you can download everything (the source code anyway), pre-load and install the entire framework and the IDE, change/adjust and recompile the code. That’s right.

For my part, I would make this quite different because of such small changes.

If you already have the .exe, open this file in e.g. IDA Pro, Ghidra, x64DBG or OllyDBG. You can navigate to the query and change the hex value of the “button”. You see where this is exactly queried/checked and then simply change the Hex value of the button to the desired value.

I think that goes much faster and you don’t have to load, install, code and recompile that much.

medmonk
1 year ago
  1. Download the repository of GitHub
  2. The main.cpp open in a suitable IDE of your choice
  3. In main_autoclicker_thread Redefined the function of the buttons
  4. Finally recompile the source code
// Hier die gewünschte Taste festlegen
const int TOGGLE_KEY = VK_F4;

void main_autoclicker_thread(void) {
 static bool pressed = false;

 while (!GetAsyncKeyState(VK_F8)) {
  if (GetKeyState(TOGGLE_KEY) & 0x8000 && !pressed){
   pressed = true;
  }
  else if (!(GetKeyState(TOGGLE_KEY) & 0x8000) && pressed){
   pressed = false;
  }
  
  static auto last_tickcount = 0;
  auto tick_count = GetTickCount();

  if (tick_count >= last_tickcount + 1000) {
   last_tickcount = tick_count;
  }
  Sleep(10);
  }
  exit(0);
}

If you have made the desired changes to your program, this “only” must be compiled by a compiler. Be it the MSVC compiler on Windows (e.g. with/in VisualStudio) and alternatively using the GCC (GNU Compiler Collection) on Linux or with Clang under Apples macOS.

– because I just noticed. The entire source code only bursts with errors as there are several undefined parts. I’m not in C++ now, but I still wanted to write you as a hint. Maybe there’s someone who can take a look at it and say more about it than I do.

LG medmonk