Function at 0x51d5f8
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
mov esi, dword [ebp + 8]
mov eax, 0x104
push edi
mov edi, ecx
mov dword [ebp - 4], edi
mov edx, dword [esi + 4]
cmp edx, eax
ja 0x51d786
je 0x51d710
add eax, 0xffffffa1
cmp edx, eax
ja 0x51d663
je 0x51d646
mov eax, edx
sub eax, 0x7b
je 0x51d72a
sub eax, 0x26
je 0x51d646
sub eax, 1
je 0x51d646
dec eax
sub eax, 1
jne 0x51d94d
push dword [esi]
movsx eax, word [esi + 0xe]
movsx ecx, word [esi + 0xc]
push eax
push ecx
push edx
lea ecx, [edi + 0x350]
call fcn.0054cc2e
jmp 0x51d859
mov eax, edx
sub eax, 0xa7
je 0x51d646
sub eax, 1
je 0x51d646
sub eax, 0x58
jne 0x51d94d
push esi
call fcn.0054b4a1
xor edi, edi
test eax, eax
jne 0x51d69c
mov ecx, dword [ebp - 4]
push edi
push dword [esi + 8]
lea ecx, [ecx + 0x350]
call fcn.0054c95e
test eax, eax
jne 0x51d707
cmp dword [esi + 8], 0x1b
jne 0x51d94a
mov eax, dword [ebp - 4]
cmp dword [eax + 0x420], edi
je 0x51d6c0
push eax
lea ecx, [eax + 0x408]
call fcn.00594162
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x318]
test ecx, ecx
je 0x51d6d9
cmp dword [ecx + 8], edi
je 0x51d6d9
cmp dword [ecx + 4], edi
je 0x51d6d9
call fcn.00531c09
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call fcn.00477543
push eax
push 0x6122b0
call fcn.00488d64
pop ecx
pop ecx
test eax, eax
je 0x51d94a
push edi
push edi
push 0x1f
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
inc eax
pop edi
pop esi
leave
ret 4
mov ecx, dword [edi + 0x44c]
test ecx, ecx
je 0x51d72a
push dword [esi + 0xc]
push dword [esi + 8]
push edi
call fcn.005859fe
test eax, eax
jne 0x51d707
call fcn.0049c2bd
xor edi, edi
cmp dword [eax + 0x1a4], edi
jne 0x51d75a
call fcn.0049c2bd
cmp dword [eax + 0x1a0], edi
jne 0x51d75a
call fcn.0049c2bd
mov dword [eax + 0x1a0], 1
call fcn.004d367b
call fcn.004eda23
test eax, eax
je 0x51d76f
cmp dword [esi + 8], 0x12
jne 0x51d76f
push edi
push edi
push 0x10
jmp 0x51d6fe
push edi
mov edi, dword [ebp - 4]
push dword [esi + 8]
lea ecx, [edi + 0x350]
call fcn.0054c95e
jmp 0x51d859
mov eax, 0x205
cmp edx, eax
ja 0x51d95a
je 0x51d7b7
sub edx, 0x105
je 0x51d866
sub edx, 0xfb
je 0x51d822
sub edx, 1
je 0x51d7b7
sub edx, 3
jne 0x51d94d
movsx eax, word [esi + 0xc]
push dword [esi]
mov dword [ebp - 0x14], eax
movsx eax, word [esi + 0xe]
mov dword [ebp - 0x10], eax
call fcn.00477543
mov dword [ebp - 0x18], eax
test eax, eax
je 0x51d7ef
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x51d7ef
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_ClientToScreen]
push dword [esi]
lea ecx, [edi + 0x350]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
push dword [esi + 4]
call fcn.0054cc2e
test eax, eax
jne 0x51d707
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x51d707
jmp 0x51d94d
movsx eax, word [esi + 0xc]
push dword [esi]
mov dword [ebp - 0x1c], eax
movsx eax, word [esi + 0xe]
mov dword [ebp - 0x18], eax
call fcn.00477543
test eax, eax
je 0x51d848
lea ecx, [ebp - 0x1c]
push ecx
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_ClientToScreen]
push dword [ebp - 0x18]
lea ecx, [edi + 0x350]
push dword [ebp - 0x1c]
call fcn.0054d285
test eax, eax
jne 0x51d707
jmp 0x51d94d
mov ecx, dword [edi + 0x44c]
test ecx, ecx
je 0x51d884
push dword [esi + 0xc]
push dword [esi + 8]
push edi
call fcn.00585b37
test eax, eax
jne 0x51d707
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
cwde
push 0x10
mov dword [ebp - 0x10], eax
call dword [sym.imp.USER32.dll_GetKeyState]
push dword [edi + 0x20]
cwde
mov dword [ebp - 0x18], eax
call sub.IMM32.dll_ImmGetContext
xor edi, edi
mov dword [ebp - 8], eax
test eax, eax
je 0x51d8c3
push eax
call sub.IMM32.dll_ImmGetOpenStatus
test eax, eax
mov eax, dword [ebp - 8]
je 0x51d8c3
mov dword [ebp - 0xc], 1
jmp 0x51d8cc
mov ecx, edi
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x51d8db
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x20]
call sub.IMM32.dll_ImmReleaseContext
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
cmp dword [eax + 0x3fc], edi
je 0x51d93d
cmp dword [esi + 8], 0x12
je 0x51d905
cmp dword [esi + 8], 0x79
jne 0x51d93d
mov eax, 0x8000
test dword [ebp - 0x10], eax
jne 0x51d93d
test dword [ebp - 0x18], eax
jne 0x51d93d
test ecx, ecx
jne 0x51d93d
call dword [sym.imp.USER32.dll_GetFocus]
push eax
call fcn.00477543
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x3fc]
cmp edx, eax
je 0x51d933
cmp dword [esi + 8], 0x12
je 0x51d931
test dword [esi + 0xc], 0x20000000
jne 0x51d707
mov ecx, edx
call fcn.0047cc8d
jmp 0x51d707
call fcn.004eda23
test eax, eax
jne 0x51d707
mov edi, dword [ebp - 4]
push esi
mov ecx, edi
call fcn.005753e0
jmp 0x51d70a
sub edx, 0x207
je 0x51d7b7
sub edx, 1
je 0x51d7b7
dec edx
sub edx, 1
jne 0x51d94d
push dword [esi + 0xc]
lea ecx, [edi + 0x350]
push dword [esi + 8]
call fcn.0054d37d
jmp 0x51d859