Function at 0x404610
Capabilities:
Hide graphical window
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push esi
push edi
mov edi, dword [esp + 0x34]
mov eax, dword [edi + 4]
mov esi, dword [edi + 8]
cmp eax, 0x102
ja 0x404c5c
je 0x404c3b
sub eax, 0x100
je 0x40467b
dec eax
jne case.0x40473e.17
mov eax, dword [0x40da70]
cmp eax, 8
ja case.0x40473e.17
jmp dword [eax*4 + 0x404d70]
call fcn.00404460
cmp eax, 0x32cc
je case.0x40473e.17
cmp esi, 0xd
jne case.0x40473e.17
mov dword [edi + 8], 0x20
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret
cmp esi, 9
jne 0x404715
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
test ax, ax
mov eax, dword [0x40da70]
jge 0x4046ca
cmp eax, 2
jne 0x4046c3
call fcn.00404460
sub eax, 0x32c8
je 0x4046f8
sub eax, esi
jne 0x4046c3
push 0x32cc
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
mov esi, 0x25
jmp 0x404715
cmp eax, 2
jne 0x404710
call fcn.00404460
sub eax, 0x32cc
je 0x4046f8
sub eax, 5
jne 0x404710
push 0x32c8
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32d1
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
mov esi, 0x27
mov eax, dword [0x40da70]
cmp eax, 8
ja case.0x40473e.17
jmp dword [eax*4 + 0x404d94]
lea eax, [esi - 0xd]
cmp eax, 0x1b
ja case.0x40473e.17
xor ecx, ecx
mov cl, byte [eax + 0x404dcc]
jmp dword [ecx*4 + 0x404db8]
call fcn.00404460
sub eax, 0x32ca
je 0x4047a9
sub eax, 0x1d
je case.0x4049a2.13006
dec eax
jne case.0x40473e.17
push 0x32e7
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
sub eax, 0x32ca
je 0x404761
sub eax, 0x1d
je 0x4047a9
dec eax
jne case.0x40473e.17
push 0x32ca
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32e8
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
lea eax, [esi - 0xd]
cmp eax, 0x1b
ja case.0x40473e.17
xor ecx, ecx
mov cl, byte [eax + 0x404e04]
jmp dword [ecx*4 + 0x404de8]
mov eax, dword [0x40c0d0]
inc eax
cmp eax, 3
mov dword [0x40c0d0], eax
jle 0x4047f6
mov dword [0x40c0d0], 0
call fcn.00409b10
pop edi
mov eax, 1
pop esi
add esp, 0x28
ret
mov eax, dword [0x40c0d0]
dec eax
mov dword [0x40c0d0], eax
jns 0x40481d
mov dword [0x40c0d0], 3
call fcn.00409b10
pop edi
mov eax, 1
pop esi
add esp, 0x28
ret
mov eax, dword [0x40c0d0]
cmp eax, 3
ja case.default.0x40483b
jmp dword [eax*4 + 0x404e20]
mov eax, dword [0x40c128]
test eax, eax
je 0x404c30
push 3
call fcn.004095a0
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
mov eax, dword [0x40c128]
test eax, eax
jne 0x404c30
call fcn.004042f0
test eax, eax
je 0x404c30
push 2
call fcn.004095a0
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
mov eax, dword [0x40c128]
test eax, eax
jne 0x404c30
push 8
call fcn.004095a0
add esp, 4
call fcn.004042f0
test eax, eax
jne 0x404c30
push 1
call fcn.004095a0
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
lea eax, [esi - 0xd]
cmp eax, 0x1b
ja case.0x40473e.17
xor ecx, ecx
mov cl, byte [eax + 0x404e44]
jmp dword [ecx*4 + 0x404e30]
call fcn.00404460
sub eax, 0x32c8
je case.0x4049a2.13006
dec eax
je case.0x4049a2.13001
dec eax
jne case.0x40473e.17
push 0x32c9
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
sub eax, 0x32c8
je 0x404947
dec eax
je case.0x4049a2.13006
dec eax
jne case.0x40473e.17
push 0x32c8
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32c9
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
lea eax, [esi - 0xd]
cmp eax, 0x1b
ja case.0x40473e.17
xor ecx, ecx
mov cl, byte [eax + 0x404e78]
jmp dword [ecx*4 + 0x404e60]
push 0x32ce
call fcn.00404510
mov ecx, dword [0x40dabc]
add esp, 4
mov dword [edi], ecx
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret
call fcn.00404460
add eax, 0xffffcd38
cmp eax, 6
ja case.0x40473e.17
jmp dword [eax*4 + 0x404e94]
push 0x32ca
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32ce
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
add eax, 0xffffcd38
cmp eax, 6
ja case.0x40473e.17
jmp dword [eax*4 + 0x404eb0]
push 0x32c8
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
cmp eax, 0x32ce
jne case.0x40473e.13
push 0x32c9
call fcn.00404510
mov edx, dword [0x40daa8]
add esp, 4
mov dword [edi], edx
mov dword [edi + 8], 0x20
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret
lea eax, [esi - 0xd]
cmp eax, 0x1b
ja case.0x40473e.17
xor ecx, ecx
mov cl, byte [eax + 0x404ee8]
jmp dword [ecx*4 + 0x404ecc]
call fcn.00404460
cmp eax, 0x32d1
je case.0x40473e.17
push 0x32cc
call fcn.00404510
mov ecx, dword [0x40dab4]
add esp, 4
mov dword [edi], ecx
xor eax, eax
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
add eax, 0xffffcd38
cmp eax, 0xa
ja case.0x40473e.17
jmp dword [eax*4 + 0x404f04]
push 0x32d2
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32cc
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
add eax, 0xffffcd38
cmp eax, 0xa
ja case.0x40473e.17
jmp dword [eax*4 + 0x404f30]
push 0x32c8
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32c9
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
push 0x32ca
call fcn.00404510
add esp, 4
mov eax, 1
pop edi
pop esi
add esp, 0x28
ret
call fcn.00404460
cmp eax, 0x32cc
je 0x404b46
mov dword [edi + 8], 0x20
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret
mov edx, dword [0x40dab4]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
push 2
push 0xffffffffffffffff
push 0x100c
push edx
call edi
cmp eax, 3
jae case.0x40473e.17
mov esi, dword [0x40c124]
lea ecx, [eax + eax*2]
shl ecx, 2
push ebx
mov dl, byte [ecx + esi + 5]
test dl, dl
sete dl
mov byte [ecx + esi + 5], dl
mov dword [esp + 0x10], eax
mov eax, dword [0x40c124]
mov dword [esp + 0xc], 2
mov dword [esp + 0x14], 0
xor edx, edx
mov bl, byte [ecx + eax + 5]
test bl, bl
setne dl
mov dword [esp + 0x28], edx
mov dl, byte [ecx + eax + 6]
test dl, dl
pop ebx
je 0x404bb7
add dword [esp + 0x24], 2
mov ecx, dword [0x40dab4]
lea eax, [esp + 8]
push eax
push 0
push 0x1006
push ecx
call edi
call fcn.00404320
pop edi
xor eax, eax
pop esi
add esp, 0x28
ret
cmp esi, 0xd
je case.0x40473e.13
cmp esi, 0x1b
jne case.0x40473e.17
pop edi
mov dword [0x40db58], 1
xor eax, eax
pop esi
add esp, 0x28
ret
cmp esi, 0xd
je case.0x40473e.13
cmp esi, 0x1b
jne case.0x40473e.17
mov edx, dword [0x40da54]
push 0
push edx
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x40da54]
push 0
push 0
push 0x10
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
mov eax, 1
pop esi
add esp, 0x28
ret
cmp dword [0x40da70], 3
jne case.0x40473e.17
cmp esi, 0xd
jne case.0x40473e.17
pop edi
mov eax, 1
pop esi
add esp, 0x28
ret
sub eax, 0x201
je 0x404c6c
sub eax, 2
jne case.0x40473e.17
cmp dword [0x40da70], 1
jne case.0x40473e.17
mov eax, dword [0x40da60]
test eax, eax
jl case.0x40473e.17
cmp eax, 0x260
jge case.0x40473e.17
mov eax, dword [0x40da64]
cmp eax, 0xb0
jl case.0x40473e.17
cmp eax, 0x178
jge case.0x40473e.17
cmp eax, 0xe2
jge 0x404cd2
mov eax, dword [0x40c128]
test eax, eax
je case.0x40473e.17
push 3
call fcn.004095a0
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x28
ret
cmp eax, 0x114
jge 0x404d05
mov eax, dword [0x40c128]
test eax, eax
jne case.0x40473e.17
call fcn.004042f0
test eax, eax
je case.0x40473e.17
push 2
call fcn.004095a0
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x28
ret
cmp eax, 0x146
jge case.0x40483b.3
mov eax, dword [0x40c128]
test eax, eax
jne case.0x40473e.17
push 8
call fcn.004095a0
add esp, 4
call fcn.004042f0
test eax, eax
jne case.0x40473e.17
push 1
call fcn.004095a0
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x28
ret
mov ecx, dword [0x40da54]
push 0
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [0x40da54]
push 0
push 0
push 0x10
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
mov eax, 1
pop esi
add esp, 0x28
ret