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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee4
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp eax, 0xbd00
je 0x4c7d2e
mov edx, dword [ebp - 4]
cmp eax, 0xbd04
jne 0x4c7d3d
mov eax, dword [ebp - 4]
cmp word [eax + 4], 0x1b
jne 0x4c7d3d
call fcn.005304e8
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp eax, 0xbd00
je 0x4c7d53
mov edx, dword [ebp - 4]
cmp eax, 0xbd04
jne 0x4c7d83
mov eax, dword [ebp - 0x18]
mov bl, byte [eax + 0x308]
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x308], 0
je 0x4c7d72
mov eax, dword [ebp - 4]
cmp word [eax + 4], 0x10
je 0x4c7d76
xor eax, eax
jmp 0x4c7d78
mov al, 1
mov edx, dword [ebp - 0x18]
mov byte [edx + 0x308], al
jmp 0x4c7d85
xor ebx, ebx
mov eax, dword [ebp - 0x18]
cmp word [eax + 0x32a], 0
je 0x4c7da6
mov ecx, esi
mov edx, dword [ebp - 4]
mov edi, dword [ebp - 0x18]
mov eax, dword [edi + 0x32c]
call dword [edi + 0x328]
cmp byte [esi], 0
jne 0x4c7fa0
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x340], 0
je 0x4c7dce
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x304]
call fcn.004056a4
mov dword [ebp - 0x10], eax
jmp 0x4c7dd3
xor eax, eax
mov dword [ebp - 0x10], eax
test bl, bl
jne 0x4c7fa0
cmp dword [ebp - 0x10], 0
jne 0x4c7e19
mov eax, dword [ebp - 0x18]
cmp byte [eax + 0x338], 0
je 0x4c7fa0
mov eax, dword [ebp - 0x18]
mov esi, dword [eax + 0x208]
test esi, esi
je 0x4c7e19
cmp byte [esi + 0x47], 0
je 0x4c7e19
mov eax, esi
mov edx, dword [0x4944a0]
call fcn.00403204
test al, al
jne 0x4c7fa0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp eax, 0xbd00
je 0x4c7e3d
mov edx, dword [ebp - 4]
cmp eax, 0xbd01
je 0x4c7e3d
mov edx, dword [ebp - 4]
cmp eax, 0xbd04
jne 0x4c7fa0
mov eax, dword [ebp - 4]
cmp dword [eax], 0xbd00
jne 0x4c7e61
mov eax, dword [ebp - 4]
cmp word [eax + 4], 3
jne 0x4c7e61
mov eax, dword [ebp - 0x18]
mov byte [eax + 0x338], 0
jmp 0x4c7fa0
mov dword [ebp - 0x14], 0x3b
jmp 0x4c7e6d
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0x57
jg 0x4c7e89
mov eax, dword [0x5a7954]
mov edx, dword [ebp - 0x14]
mov ax, word [eax + edx*2 - 0x76]
mov edx, dword [ebp - 4]
cmp ax, word [edx + 4]
jne 0x4c7e6a
cmp dword [ebp - 0x14], 0x57
jle 0x4c7e93
xor ebx, ebx
jmp 0x4c7e96
mov ebx, dword [ebp - 0x14]
test ebx, ebx
je 0x4c7ebd
push ebp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00431438
mov edx, eax
and dl, byte [0x4c7fa8]
xor ecx, ecx
mov eax, ebx
call fcn.004c7bf8
pop ecx
jmp 0x4c7fa0
lea eax, [ebp - 0x11b]
push eax
call sub.user32.dll_GetKeyboardState
test eax, eax
je 0x4c7fa0
push 0
call sub.user32.dll_GetKeyboardLayout
push eax
push 0
lea eax, [ebp - 0x1b]
push eax
lea eax, [ebp - 0x11b]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 4]
push eax
call sub.user32.dll_ToAsciiEx
add eax, 0x7fffffff
sub eax, 0x7fffffff
jb 0x4c7f6d
dec eax
je 0x4c7f11
dec eax
je 0x4c7f32
jmp 0x4c7fa0
push ebp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00431438
mov edx, eax
and dl, byte [0x4c7fa8]
mov cl, byte [ebp - 0x1b]
xor eax, eax
call fcn.004c7bf8
pop ecx
jmp 0x4c7fa0
cmp byte [ebp - 0x1a], 0
jne 0x4c7f4c
push ebp
mov cl, byte [ebp - 0x1b]
mov dl, byte [0x4c7fac]
xor eax, eax
call fcn.004c7bf8
pop ecx
jmp 0x4c7fa0
push ebp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
call fcn.00431438
mov edx, eax
and dl, byte [0x4c7fa8]
mov cl, byte [ebp - 0x1a]
xor eax, eax
call fcn.004c7bf8
pop ecx
jmp 0x4c7fa0
mov eax, dword [ebp - 0x18]
mov byte [eax + 0x308], 1
push 0
call sub.user32.dll_GetKeyboardLayout
push eax
push 0
lea eax, [ebp - 0x1b]
push eax
lea eax, [ebp - 0x11b]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
push eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 4]
push eax
call sub.user32.dll_ToAsciiEx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret