Which compiler are you using? I was just wanting to test this application so downloaded
x86_64-w64-mingw32-gcc-4.9.2.exe
MCode Tutorial (Compiled Code in AHK)
Re: MCode Tutorial (Compiled Code in AHK)
I use an assembly compiler for all tasks I'm doing in MCode.
Its not quite comfortable but useable.
Its not quite comfortable but useable.
Recommends AHK Studio
Re: MCode Tutorial (Compiled Code in AHK)
are you sure VirtualProtect is only needed on AHKx64?nnnik wrote: ↑30 Sep 2013, 12:003. an MCode Function:
I use this one:Code: Select all
MCode(mcode) { static e := {1:4, 2:1}, c := (A_PtrSize=8) ? "x64" : "x86" if (!regexmatch(mcode, "^([0-9]+),(" c ":|.*?," c ":)([^,]+)", m)) return if (!DllCall("crypt32\CryptStringToBinary", "str", m3, "uint", 0, "uint", e[m1], "ptr", 0, "uint*", s, "ptr", 0, "ptr", 0)) return p := DllCall("GlobalAlloc", "uint", 0, "ptr", s, "ptr") if (c="x64") DllCall("VirtualProtect", "ptr", p, "ptr", s, "uint", 0x40, "uint*", op) if (DllCall("crypt32\CryptStringToBinary", "str", m3, "uint", 0, "uint", e[m1], "ptr", p, "uint*", s, "ptr", 0, "ptr", 0)) return p DllCall("GlobalFree", "ptr", p) }
Re: MCode Tutorial (Compiled Code in AHK)
Hi all,
I am a bit new to MCODE, but I have managed to install compiler TDM-GCC-64\bin\gcc.exe and was able to generate MCODE. However, I have been searching for at least couple hours but can't find a way to set compiler to generate MCODE encoding in hexadecimal vs base64(the default). The function is writeen in C.
Any help is appreciated, thank you.
I am a bit new to MCODE, but I have managed to install compiler TDM-GCC-64\bin\gcc.exe and was able to generate MCODE. However, I have been searching for at least couple hours but can't find a way to set compiler to generate MCODE encoding in hexadecimal vs base64(the default). The function is writeen in C.
Any help is appreciated, thank you.
Re: MCode Tutorial (Compiled Code in AHK)
Someone helped me.. thank you..
You have to change it under "Settings" here
:
"Laszlo Style" for Hex
"Bentschi Style" for Base64
You have to change it under "Settings" here

"Laszlo Style" for Hex
"Bentschi Style" for Base64
Re: MCode Tutorial (Compiled Code in AHK)
Which compiler did you use? Also why do you want to use Hex instead of base64?
Recommends AHK Studio
-
- Posts: 726
- Joined: 30 Sep 2017, 03:59
- Facebook: marius.sucan
- GitHub: mariussucan
- Location: Romania
- Contact:
Re: MCode Tutorial (Compiled Code in AHK)
What does 1 or 2 stand for before x64/x86? I've seen machine codes using these. For example, in this one : " 2,x86:aipYww==,x64:uCoAAADD ".
Thank you.
Thank you.
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: MCode Tutorial (Compiled Code in AHK)
its stupid way of passing CRYPT_STRING_HEX(1) / CRYPT_STRING_BASE64(2) to CryptStringToBinary(), depending on whose mcode functions ure using
-
- Posts: 726
- Joined: 30 Sep 2017, 03:59
- Facebook: marius.sucan
- GitHub: mariussucan
- Location: Romania
- Contact:
Re: MCode Tutorial (Compiled Code in AHK)
Thank you.... So, if it's bentschi mode /edition , it's in base 64, right ?
-------------------------
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
KeyPress OSD v4: GitHub or forum. (presentation video)
Quick Picto Viewer: GitHub or forum.
AHK GDI+ expanded / compilation library (on GitHub)
My home page.
Re: MCode Tutorial (Compiled Code in AHK)
i dont know what betchis looks like
in the one 3 posts above me, yes.
in the one 3 posts above me, yes.
just follow the code
- joedf
- Posts: 7835
- Joined: 29 Sep 2013, 17:08
- Facebook: J0EDF
- Google: +joedf
- GitHub: joedf
- Location: Canada
- Contact:
Re: MCode Tutorial (Compiled Code in AHK)
Yes, base64. 






Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Who is online
Users browsing this forum: No registered users and 10 guests