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

Disassembly:
sub esp, 0x124
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x120], eax
cmp dword [esp + 0x154], 0
mov edx, dword [esp + 0x164]
mov eax, dword [esp + 0x158]
mov ecx, dword [esp + 0x160]
push esi
mov esi, dword [esp + 0x130]
push edi
mov edi, dword [esp + 0x164]
mov dword [esp + 0x18], edx
mov dl, byte [esp + 0x130]
mov dword [eax], 1
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x14], ecx
mov byte [ecx], dl
je 0x420351
cmp dword [esi], 0
je 0x42011f
mov edx, dword [esi + 0xc]
mov dword [eax], edx
mov al, byte [esi + 0x10]
mov byte [edi], al
mov dl, byte [esi + 0x11]
xor eax, eax
mov byte [ecx], dl
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jmp 0x420351
mov eax, dword [esp + 0x14c]
mov ecx, dword [esp + 0x138]
mov edx, dword [esp + 0x13c]
mov edi, dword [ecx]
push ebx
push ebp
mov ebp, dword [edx]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x148]
mov ebx, dword [eax]
push 0x90
add edi, 0x100
add ebp, 0x100
sub ebx, 0xffffff80
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x4201af
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
jne 0x4201af
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
mov edx, 0x8000
test dx, ax
jne 0x4201af
mov eax, dword [esp + 0x150]
mov ecx, dword [esp + 0x140]
mov edx, dword [esp + 0x144]
mov edi, dword [ecx]
mov ebp, dword [edx]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x148]
mov ebx, dword [eax]
push 0x12
call dword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x8000
test cx, ax
je 0x420212
push 0xa5
call dword [sym.imp.USER32.dll_GetKeyState]
mov edx, 0x8000
test dx, ax
je 0x420212
mov eax, dword [esp + 0x158]
test eax, eax
je 0x420212
mov ecx, dword [esp + 0x144]
mov edx, dword [esp + 0x148]
mov ebp, dword [ecx]
mov ebx, dword [edx]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x140]
mov edi, dword [eax]
add edi, 0x200
add ebp, 0x200
add ebx, 0x100
mov eax, dword [esp + 0x140]
cmp dword [eax], 0
je 0x42034f
mov ecx, dword [esp + 0x144]
cmp dword [ecx], 0
je 0x42034f
mov edx, dword [esp + 0x148]
cmp dword [edx], 0
je 0x42034f
mov eax, dword [esp + 0x14c]
cmp dword [eax], 0
je 0x42034f
xor eax, eax
mov dword [esp + 0x14], eax
cmp dword [esp + 0x10], eax
jbe 0x42034f
mov ecx, dword [esi + 4]
cmp ecx, dword [ebp + eax*4]
jne 0x420295
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edx, dword [esi + 4]
push eax
push 0
push edx
mov dword [esp + 0x38], eax
call dword [sym.imp.USER32.dll_MapVirtualKeyExW]
mov ecx, dword [esi + 8]
xor ecx, eax
test ecx, 0x1ff
je 0x4202a5
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x10]
jb 0x420262
jmp 0x42034f
mov eax, dword [0x5c5de0]
xor edx, edx
div dword [esp + 0x160]
mov eax, dword [esp + 0x15c]
mov ecx, dword [eax]
movzx eax, byte [edx + ecx]
mov ecx, dword [esp + 0x10]
xor edx, edx
div ecx
mov eax, dword [esp + 0x14]
sub eax, edx
add eax, ecx
xor edx, edx
div ecx
mov ecx, dword [esp + 0x20]
mov eax, dword [edi + edx*4]
mov dword [esi + 4], eax
movzx eax, word [ebx + edx*2]
lea edx, [esp + 0x30]
mov dword [esi + 8], eax
push edx
mov dword [ecx], eax
call fcn.0041fbf0
mov eax, dword [esp + 0x30]
add esp, 4
push eax
mov eax, dword [esi + 8]
push 0
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esi + 4]
lea edx, [esp + 0x3c]
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov edx, dword [esp + 0x24]
mov dword [edx], eax
cmp eax, 2
jne 0x420335
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
mov ecx, eax
shr ecx, 8
mov byte [edx], cl
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
jmp 0x42033f
mov dl, byte [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov byte [eax], dl
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
pop ebp
pop ebx
mov ecx, dword [esp + 0x128]
pop edi
pop esi
xor ecx, esp
mov eax, 1
call fcn.00524d83
add esp, 0x124
ret