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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bd560
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x4f8008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x24], esi
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
movzx eax, al
push eax
movzx eax, di
push eax
push str.Try_insert_a_char_event:_char___d__release___d
push dword [esi + 8]
call fcn.00405550
add esp, 0x10
cmp byte [esi], 0
jne 0x46f06d
cmp byte [esi + 1], 0
mov byte [ebp - 0x16], 0
je 0x46f071
mov byte [ebp - 0x16], 1
mov dword [ebp - 4], 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x46f389
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push str.Current_keyboard_layout___x
push dword [esi + 8]
mov dword [ebp - 0x20], eax
call fcn.00405550
add esp, 0xc
mov ecx, esi
push dword [ebp - 0x20]
push edi
call fcn.0046f3e0
movzx eax, ax
mov dword [ebp - 0x1c], eax
movzx eax, ax
cwde
push eax
push str.The_virtual_code_scan_result___d
push dword [esi + 8]
call fcn.00405550
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
cmp di, 0x41
jb 0x46f0e3
cmp di, 0x5a
jbe 0x46f0ec
lea eax, [edi - 0x61]
cmp ax, 0x19
ja 0x46f103
cmp byte [esi], 0
je 0x46f103
cmp byte [esi + 1], 0
jne 0x46f103
cmp byte [esi + 3], 0
jne 0x46f103
mov byte [ebp + 0xb], 1
jmp 0x46f108
xor al, al
mov byte [ebp + 0xb], al
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
push edi
movzx eax, cx
push eax
push 1
push 0x14
mov dword [ebp - 0x24], eax
call fcn.0046f820
push edi
push dword [ebp - 0x24]
mov byte [ebp - 0x12], al
push 0x80
push 0x10
call fcn.0046f820
mov edi, dword [ebp - 0x1c]
mov byte [ebp - 0x16], al
movzx eax, di
mov ecx, eax
sar ecx, 8
push 0x14
and cl, 1
je 0x46f1a8
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
call edi
test al, 1
je 0x46f1ba
push 0x14
call edi
mov edi, dword [ebp - 0x1c]
test al, 1
je 0x46f164
cmp byte [ebp - 0x12], 0
jne 0x46f1bd
mov cl, byte [ebp + 0xb]
xor al, al
mov edx, dword [ebp + 0xc]
mov byte [ebp - 0x15], al
mov byte [ebp + 0xb], 0
test al, al
jne 0x46f18d
cmp byte [esi + 3], al
je 0x46f18d
test dl, dl
jne 0x46f18d
test cl, cl
jne 0x46f18d
mov byte [ebp - 0x11], 1
cmp byte [ebp - 0x16], cl
je 0x46f191
mov byte [ebp - 0x11], 0
movzx eax, di
test eax, 0x200
je 0x46f1db
cmp byte [esi], 0
jne 0x46f1db
test dl, dl
jne 0x46f1db
mov ch, 1
jmp 0x46f1dd
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x46f164
cmp byte [ebp - 0x12], 0
jne 0x46f164
jmp 0x46f1bd
mov edi, dword [ebp - 0x1c]
cmp byte [esi + 3], 0
mov al, 1
mov edx, dword [ebp + 0xc]
mov cl, byte [ebp + 0xb]
mov byte [ebp - 0x15], al
jne 0x46f16f
test dl, dl
jne 0x46f16f
test cl, cl
jne 0x46f16f
mov byte [ebp + 0xb], al
jmp 0x46f18d
xor ch, ch
mov byte [ebp - 0x14], ch
test eax, 0x400
je 0x46f1f5
cmp byte [esi + 1], 0
jne 0x46f1f5
test dl, dl
jne 0x46f1f5
mov al, 1
jmp 0x46f1f7
xor al, al
mov byte [ebp - 0x13], al
test ch, ch
jne 0x46f202
test al, al
je 0x46f215
cmp byte [esi], 0
jne 0x46f2f8
cmp byte [esi + 1], 0
jne 0x46f2f8
movzx eax, al
push eax
movzx eax, ch
push eax
movzx eax, byte [ebp - 0x11]
push eax
movzx eax, byte [ebp + 0xb]
push eax
movzx eax, byte [ebp - 0x15]
push eax
movzx eax, byte [ebp - 0x16]
push eax
movzx eax, byte [ebp - 0x12]
push eax
movzx eax, cl
push eax
push str.Variable_states_before_generate_key_events_to_get_the_char:_controlSym___d__resistantToCaps___d__invariantToShift___d__shiftedKey___d__shiftPressNeeded___d__shiftUpNeeded___d__ctrlPressNeeded___d__altPressNeeded___d_
push dword [esi + 8]
call fcn.00405550
add esp, 0x28
cmp byte [ebp - 0x14], 0
je 0x46f25d
push 0
push 0
push 0x11
mov ecx, esi
call fcn.0046eca0
cmp byte [ebp - 0x13], 0
je 0x46f270
push 0
push 0
push 0x12
mov ecx, esi
call fcn.0046eca0
cmp byte [ebp + 0xb], 0
je 0x46f27c
push 0
push 0
jmp 0x46f286
cmp byte [ebp - 0x11], 0
je 0x46f28f
push 0
push 1
push 0x10
mov ecx, esi
call fcn.0046eca0
mov eax, dword [ebp + 0xc]
mov ecx, esi
push 0
push eax
push dword [ebp - 0x24]
call fcn.0046eca0
cmp byte [ebp + 0xb], 0
je 0x46f2ab
push 0
push 1
jmp 0x46f2b5
cmp byte [ebp - 0x11], 0
je 0x46f2be
push 0
push 0
push 0x10
mov ecx, esi
call fcn.0046eca0
cmp byte [ebp - 0x13], 0
je 0x46f2d1
push 0
push 1
push 0x12
mov ecx, esi
call fcn.0046eca0
cmp byte [ebp - 0x14], 0
je 0x46f2e4
push 0
push 1
push 0x11
mov ecx, esi
call fcn.0046eca0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str.Received_a_control_combination_that_we_doesnt_know_how_it_can_be_made
push dword [esi + 8]
call fcn.00405460
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x38]
push str.Cant_insert_key_event_because_a_window_is_losing_activation
push eax
call fcn.00404c10
add esp, 8
lea eax, [ebp - 0x38]
push 0x4f5fa0
push eax
call fcn.00498498
push str.Cant_insert_the_char_by_an_unicode_symbol_because_a_modifier_is_pressed
push dword [esi + 8]
call fcn.00405490
add esp, 8
push 0
push 0
call fcn.00498498
lea ecx, [ebp - 0x7c]
call fcn.0041ba20
push 0x4f60cc
lea eax, [ebp - 0x7c]
push eax
call fcn.00498498
int3