-3

I'm not used to c or c++ or AHK. My problem is the following:

There exists a tool called "TI Helper", which is composed of 1 EXE and several text files. This EXE enables you to press "CTR+SPACE" in TM1 application, which will popup a (right-click kind of menu) based on the text files...

I opened the EXE with notepad and we can see the code... Can i simply re-use or modify this code? WHat should i keep in mind?

nvoigt
  • 75,013
  • 26
  • 93
  • 142
Xavelite
  • 11
  • 1
  • 3
    What exactly do you see when you open .exe with notepad? – Killzone Kid Mar 14 '18 at 10:46
  • 2
    You have to have assembly skills to change the file. After it was compiled, it doesn't really matter that it was written in C++. – HolyBlackCat Mar 14 '18 at 10:47
  • 1
    @HolyBlackCat He says "we can see the code" -- whatever that means. Also, he would not see assembler code, he would see binary gibberish, so "assembly skills" would be insufficient. The headline already makes no sense. – Mörre Mar 14 '18 at 10:49
  • Possible duplicate of [Is there a C++ decompiler?](https://stackoverflow.com/questions/205059/is-there-a-c-decompiler) – Benjamin James Drury Mar 14 '18 at 10:49
  • 1
    Worse than what @HolyBlackCat says. Not only do you need to know assembler, you need to bit-fiddle the instruction bytes. – Paul Ogilvie Mar 14 '18 at 10:49
  • 4
    What makes you think it's c/c++? – UKMonkey Mar 14 '18 at 10:50
  • 3
    Is the EXE actually a Windows PE format binary executable, containing metadata + x86 machine code? If so, it's unlikely you can do anything useful with *notepad*. Use a hex editor to hack binary files like a normal person, preferably one with an x86 assembler / disassembler built in. – Peter Cordes Mar 14 '18 at 10:51
  • 1
    *"Can i **simply** re-use or modify this code?"* - no, takes some serious skill, and some serious amount of time involved, it's often simpler to rewrite the software from scratch in some high level language (especially if there exist open source sw which technically is similar enough to be bend for your purpose), if you want some bigger modification. If you want just to remove some option or modify some string... then patching the binary is feasible, but still requires some considerable skill+makes little sense, just download the source, and modify that, any **good** SW has source available. – Ped7g Mar 14 '18 at 10:59
  • Did you try recompiling the code? What errors did you get? – Shark Mar 14 '18 at 11:18
  • I suspect that doesn't have an executable, but an autohotkey script – bolov Mar 14 '18 at 11:19

2 Answers2

3

This has nothing to do with C, C++ or assembly and you have neither decompiled, nor can you recompile the executable.

TIHelper is an open source AHK (autohotkey scripting language) file. As a script file, it is not compiled into unreadable machine gibberish, but instead interpreted in it's human readable form.

You are free to make changes to that AHK file and run with those changes.

Link to the source code archive of TIHelper

nvoigt
  • 75,013
  • 26
  • 93
  • 142
0

First of all - will any exe file modifications violate or comply software licensing terms?

If it is allowed, you should know the format of exe file, better if assembler language too.

Generally, modifying data segment in exe file (e.g. 13 characters "File created" to "Result is OK" - watching that total number of exe file bytes will not change) could eventually result only in changes in displayed text. Modifying binary code (code segment of exe file) requires understading what "mov ax,60" is, what could it cause and could give expected result ONLY if machine (assembler) code is fully understood.

Peter
  • 11
  • 3