Armored Autohotkey executable builder
0.9.5b
INTRO USAGE OPTIONS INTERFACE RESOURCES VERSIONINFO EXECUTION OUTRO
PURPOSE INSTALLATION CONTENTS UPDATES



Basic Introduction

HotkeyCamo is a freeware closed source Autohotkey executable build wrapper written in PureBasic 4.

At last build was 2838 lines long (most of which is the bloody gui :0) and comprised entirely of standard pb4 functions and api calls.

It requires only the files found in the compiler directory of the Ahk distributable to function, no 3rd party tools.


PURPOSE

To wrap around the process of converting an AutoHotkey script into an executable with Ahk2Exe and provide additional  features such as::

Countermeasures in brief

An  AutoHotkey stubby consists of the header which is the core Interpreter,  to which is attached  a compressed and encoded archive structured binary overlay at the tail of the file.

When the stubby executes it  crossreferences values and data sequences stored at its core with those in its payload  to locate - identify and prepare itself for the next steps of acquiring the data.

These values and data sequences are exactly the targets that a decompiler uses (Like the Ahk interpreter) to detect and deconstruct  this archive structured binary overlay.

HotkeyCamo by default maps and patches certain key data sequences in both Ahk2Exe and the interpreter stub at build time and scrambles them identically with values generated to confuse a decompiler but not the Interpreter in final executable form.

Although there is a decompiler distributed with Ahk, the actual methods implemented here go beyond that and  are aimed at 3rd party decompilers that do not follow the standard rules of engagement. (like passwords or no decompile switches) ;)

However I must point out that what it is doing is just camouflage (hence the name) rather than full blown protection and  is to be considered lightweight armor against n00bs or b1unts from interrogating your binary and not much else!

In the event that these methods get  countered (very likely), or are just not required you can disable them  by adding the ~np commandline option when executing HkC.

INSTALLATION

It is not essential but you will get the most out of this tool if you add it  to one of two locations in your existing AutoHotkey install directory:

1.  In a directory of its own,
[..]
    AutoHotkey.exe
    [Include]
    [Compiler]
    [x:\Program Files\AutoHotkey\HotkeyCamo\]
        HkC.exe

The default path to the build files used will be the compiler directory above HotkeyCamo's own.

All macro's for relative files and paths will work and the actual build directory (HkC's dir) will not interfere with how the modified builder  finds includes and its other relative file paths

HotkeyCamo will copy upx from the compiler directory to its own directory.

2. Within the compiler subdirectory,
[..]
    AutoHotkey.exe
    [Include]
    [x:\Program Files\AutoHotkey\Compiler\]
        Ahk2Exe.exe
        AutoHotkeySC.bin
        HkC.exe
        Upx.exe

The default build file paths will be those in the same directory as HotkeyCamo.

The modified build files location is the same as your original so again no impact to how includes and other realtive paths are located, plus upx should already exist  so  will not be searched for.

If like me you do not have a standard install location for AutoHotkey just remember that  the build files can exist either in HkC's directory or in a directory named compiler above HkC's current path.

When the above does not apply alternate paths to the two primary build files must be specified using the hkc_a2e and hkc_bin options.

Upx will also be searched for in the directory path of the file specified through the hkc_a2e option

Ahk2Exe.exe  - No custom builds, only supported official builds.

AutoHotkeySC.bin  - Only supported official builds 
or most recent build of AutoHotkey_L.
(Not the 20 kb smaller interpreters that are available. )

Upx.exe - Is required by HkC so it can unpack Ahk2Exe for many other elements to proceed, also it is required if you want to pack the output with upx for size reduction..


*  None of the original build files are directly modified in any way, alternately named copies are created and deleted by HkC in its own directory during the build process *

CONTENTS

Files found in the  release archive:
HkC.exe - Main program.
HkC.chm - Offline compiled html document.
HkC -  Command shell based nfo format quick reference. (used by HkC if it has a console subsystem)

[EG] very basic examples  (Yes these are really bad, I am an utter n00b with ahk, no time to write better ones yet)
Mcecs.ahk - A script that contains embedded HkC options.
Ascfg.ahk - The same script without the embedded options.
Quicklaunch.bat - Example of the save as quicklaunch.bat gui menu option. (modified for release)
Quicklaunch.ahk - Example of the save as quicklaunch.ahk gui menu option. (modified for release)
Build.cfg -  Contains the HkC build options for Ascfg.ahk.
DefBinRes.cfg -  A sample cfg template which contains the resource and version info values that are found in AutoHotkeySC.bin.
[RES] directory contains files used in the above examples.

UPDATES

General
Gui
Config