Category Archives: Assembler

Easy Code IDE tool for the assembly language .

About Easy Code .
This assembly tool which utilizes a visual component-assisted programming environment for the assembly language.
The Easy Code IDE tool come with graphical user interface (GUI) and object components.
One good feature is integration with MASM32, MASM64, GOASM, JWASM/UASM/ASMC, FASM and PoASM assembler libraries and tools.
You can start your project with Easy Code or Easy Code 64 from bin folder, both available in 32-bit / 64-bit version .
First, when I try to build a FASM 64 example and I got errors from build process.
The setting process is easy and can be done when you start the Easy Code.
You can make settings from menu with:

  • Project – Properties …
  • Tools – Settings …

What’s new in 2.02.0.0002 version ?
Bug Fixes:
1. The Tab control did not appear (it was not shown even being enabled) when creating a new project.
Please read and follow the directions within the ‘AsmC.txt’, ‘Fasm.txt’, ‘Masm.txt’ and ‘UAsm.txt’ files located in the ‘EasyCode’ folder.
Added Features:
1. New ‘netapi32.inc’ and ‘netapi32.lib’ files for 64-bit ASMC, FASM, JWASM, MASM and UASM projects.
2. New ‘crypt32.inc’ and ‘crypt32.lib’ files for 64-bit ASMC, FASM, JWASM, MASM and UASM projects.
Deprecated Features:
None

Posted in All, Assembler, Windows 10. Tagged with , , , , .

Programming with FASM – ComboBox Control – part 001.

Today I start with a simple FASM tutorial about combobox control.
In this tutorial I will show you how to deal with this control.
First you need to create a simple window and then to add it.
The steps are very simple:

  • start program with the format PE GUI 4.0
  • define entry start point to start running ;
  • include library win32a;
  • create two ID’s : one for window form and one for combobox control;
  • create sections for : .code, .idata.text and .rc;
  • create a variable ( named by me szInitText ) to use like string message into .itext area ;
  • fill the .idata and .irc with my source code ( default settings for window and set the dialogitem );
  • create the DialogProc and fill with all is need to make the winodow form;

This source code just create the combobox control without items.

This is the source code of this tutorial:

This is the result :

Posted in All, Assembler, Programming, Windows 10, Windows 7, Windows 8. Tagged with , , , , , , , .

Programming with FASM – test with CPUID .

First you need to take a look at this website.
The CPUID returns processor identification and feature information in the EAX, EBX, ECX, and EDX registers.
What the source code from my example do ?
First I start with the default assembly program .
The next step is to strat with reset xor eax,eax use cpuid.
The result of CPUID will be put into EBX.
Into section ‘.data’ data readable writeable make a structure named out_buffer.
The structure will be fill so you need to EBX, see example:
mov [out_buffer.vendor_ebx],ebx will give us “Genu”.
The next step for test EBX is this example:
test edx,00010000000000000000000000000000b
jz .NoHTT
mov [out_buffer.htt_arch4],’YES ‘
.NoHTT:

The structure of out_buffer is :
db ‘NoHTT’,2,9,’- ‘
.htt_arch4 dd ‘NO ‘
db 9,10

Because I used MessageBox to show us the out_buffer.
The result will be : No or Yes with the size of dd.
The db can define byte variables, as well as arrays of bytes.
Fasm documentation tell us: For example db 1,2,3 will define the three bytes of values 1, 2 and 3 respectively.
The dd has 4 bytes.
The result will be this text (the result is true so the text will be YES): “NoHTT – YES”.
Let’s see one screenshot:

This is the source code:

Posted in All, Assembler, Windows 10, Windows 7, Windows 8. Tagged with , , , , , .

Programming with FASM – Calendar Control.

I have not done a tutorial about the assembler programming language for a while, so today I had a good reason to write this tutorial.
The tutorial focuses on using Calendar Control (MSAA UI Element Reference).

The source code of the window made in fasm is used into this tutorial.
I added the window class name for a month calendar which is defined as SysMonthCal32.
The file if.inc is used for message selection.
When we close the program, a closing dialog is displayed.
To run the Go to today click is displayed but I did not implement execution code.
The IDD_DLG parameter is random and I put the year of my birth to be more fun.
The program contains comments to understand the source code.
For execution, you need to add it to the FASM editor and run it with the F9 key.
You also have the executable version in the Downloads section of the main page menu.

Posted in All, Assembler, Programming, Windows 10, Windows 7, Windows 8. Tagged with , , , , , .

Enables or disables privileges with fasm.

Today I will show you how to enables or disables privileges with fasm.
The Windows 10 come with Authorization and this is the right granted an individual to use the system and the data stored on it.
This is based on the Windows Server and Windows operating systems that control access to resources.
The example is a shutdown application tool make with FASM version 1.71.61.
I used functions from MSDN like: GetCurrentProcess, OpenProcessToken, LookupPrivilegeValue, AdjustTokenPrivileges and CloseHandle.
This functions need to be fill with parameters.
For example the OpenProcessToken function need this parameters:

You can take a look at this function at MSDN website.
The base of assembly file come with include win32ax.inc file.
The ..\include\ let the fasm to get this file and use this functions.
The SE_PRIVILEGE_ENABLED set with 2 make the privilege enabled.
Also the TOKEN_ADJUST_PRIVILEGES is required to enable or disable the privileges in an access token.
This two is used to make the executable application.
Into .data area I put the data need by application – messages to show.
For example if I want to put a string into my application then I will use this:

The title_msg is used by application to take the string tool_shutdown_cmd and 0 is used to end the string into the application.
Also I need the SeShutdownPrivilege parameter required to shut down a local system..
The application will run into loop from .code to enable_privilege.
It start with .code start: show the window with message box make by MessageBox and ask us the option to shutdown or not.
IN this area will run some MSDN functions like: MessageBox, InitiateSystemShutdown and ExitProcess.
When the user will press the Yes button then the application will run the enable_privilege area.
The cmp, jne, jc and jmp is used to take decisions into application.
The invoke is used to invoke can be used to call the procedures through pointers defined in the import tables.
Example of this line:

is equivalent to:

The start: , exit: , fail: , enable_privilege: is used by fasm to know points of application.
The .end start is put to end the program of fasm language.
You have question about the fasm the take a look at fasm manual.

Posted in All, Assembler, Programming, Windows 10. Tagged with , , , , .