Function at 0x41fe30
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
sub esp, 0x11c
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x118], eax
mov eax, dword [esp + 0x120]
cmp dword [eax], 0
mov ecx, dword [esp + 0x124]
mov edx, dword [esp + 0x150]
mov dword [esp + 0x14], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
je 0x420076
cmp dword [esp + 0x14c], 0
je 0x420076
push ebx
push ebp
push esi
push edi
test ecx, ecx
je 0x420072
mov eax, dword [esp + 0x138]
mov ebx, dword [eax]
test ebx, ebx
je 0x420072
mov ecx, dword [esp + 0x13c]
mov eax, dword [ecx]
test eax, eax
je 0x420072
mov edx, dword [esp + 0x140]
mov ebp, dword [edx]
test ebp, ebp
je 0x420072
mov ecx, dword [esp + 0x144]
cmp dword [ecx], 0
je 0x420072
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
mov esi, dword [esp + 0x14c]
add eax, 0x100
push 0x90
add ebx, 0x100
mov dword [esp + 0x18], eax
sub ebp, 0xffffff80
call edi
test al, 1
je 0x41ff37
push 0x10
call edi
mov edx, 0x8000
test dx, ax
jne 0x41ff37
push 0x11
call edi
mov ecx, 0x8000
test cx, ax
jne 0x41ff37
mov edx, dword [esp + 0x138]
mov eax, dword [esp + 0x13c]
mov ebx, dword [edx]
mov ecx, dword [eax]
mov edx, dword [esp + 0x140]
mov esi, dword [esp + 0x148]
mov ebp, dword [edx]
mov dword [esp + 0x14], ecx
push 0x12
call edi
mov ecx, 0x8000
test cx, ax
je 0x41ff93
push 0xa5
call edi
mov edx, 0x8000
test dx, ax
je 0x41ff93
mov eax, dword [esp + 0x150]
test eax, eax
je 0x41ff93
mov ecx, dword [esp + 0x13c]
mov edx, dword [esp + 0x140]
mov ebp, dword [edx]
mov esi, eax
mov eax, dword [esp + 0x138]
mov ebx, dword [eax]
mov eax, dword [ecx]
add eax, 0x200
add ebx, 0x200
mov dword [esp + 0x14], eax
add ebp, 0x100
xor eax, eax
mov dword [esp + 0x10], eax
test esi, esi
jbe 0x420072
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x14]
cmp edx, dword [ecx + eax*4]
jne 0x41ffde
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edx, dword [esp + 0x18]
mov edi, eax
mov eax, dword [edx]
push edi
push 0
push eax
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
xor edx, eax
test edx, 0x1ff
je 0x41ffec
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, esi
jb 0x41ffa1
jmp 0x420072
mov eax, dword [0x5c5de0]
xor edx, edx
div dword [esp + 0x158]
mov eax, dword [esp + 0x154]
mov ecx, dword [eax]
movzx eax, byte [edx + ecx]
xor edx, edx
div esi
mov eax, dword [esp + 0x10]
sub eax, edx
add eax, esi
xor edx, edx
div esi
mov esi, dword [esp + 0x18]
mov eax, dword [ebx + edx*4]
mov ebx, dword [esp + 0x1c]
mov dword [esi], eax
movzx ecx, word [ebp + edx*2]
lea edx, [esp + 0x28]
push edx
mov dword [ebx], ecx
call fcn.0041fbf0
mov edx, dword [ebx]
add esp, 4
push edi
push 0
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi]
lea ecx, [esp + 0x34]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov ecx, dword [esp + 0x24]
mov dword [ecx + 0xc], eax
cmp eax, 2
jne 0x42006b
mov eax, dword [esp + 0x20]
mov edx, eax
shr edx, 8
mov byte [ecx + 0x10], dl
jmp 0x42006f
mov al, byte [esp + 0x20]
mov byte [ecx + 0x11], al
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x118]
xor ecx, esp
mov eax, 1
call fcn.00524d83
add esp, 0x11c
ret