Function at 0x51b370
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
sub esp, 0xc
push ebx
push ecx
push edx
push esi
push edi
mov bl, 0
mov eax, 0
cmp byte [0x78dc9c], 0
jne 0x51b38f
mov byte [0x78dc9c], 1
cmp byte [0x78dca0], 0
jne 0x51b39f
mov byte [0x78dca0], 1
cmp byte [0x78dca4], 0
jne 0x51b3af
mov byte [0x78dca4], 1
cmp byte [0x78dca8], 0
jne 0x51b3bf
mov byte [0x78dca8], 1
mov ecx, 0x78dc78
lea edi, [esp + 0x1c]
mov eax, edi
mov dword [eax], ecx
mov eax, dword [eax]
lea eax, [eax]
push eax
call sub.KERNEL32.dll_EnterCriticalSection
cmp dword [0x569468], 0
je 0x51b411
call fcn.0051b6ac
mov dword [0x56946c], eax
mov dword [0x569470], 0
mov dword [0x569474], 0
mov dword [0x569468], 0
mov dword [0x569478], 0
call fcn.0051bc18
and eax, 0x700
mov dword [0x56947c], 1
mov edx, eax
mov ecx, dword [0x56946c]
and ecx, 0x700
xor edx, ecx
mov dword [esp + 0x18], edx
cmp edx, 0
je 0x51b462
mov esi, edx
mov ecx, edx
neg ecx
and esi, ecx
mov dword [esp + 0x14], esi
mov ecx, dword [0x569480]
cmp esi, ecx
jae 0x51b462
not esi
mov edx, dword [esp + 0x18]
and edx, esi
mov dword [esp + 0x18], edx
jmp 0x51b439
cmp edx, 0
je 0x51b589
mov ecx, eax
mov edx, dword [esp + 0x14]
and ecx, edx
cmp ecx, 0
sete bh
movzx esi, bh
cmp edx, 0x400
jne 0x51b4dd
cmp esi, 0
je 0x51b4b2
mov ecx, dword [0x569478]
and ecx, 0x400
cmp ecx, 0
je 0x51b49c
mov bl, 0x38
and eax, 0x200
cmp eax, 0
jne 0x51b4ce
mov dword [0x569474], 1
jmp 0x51b4ce
push 0xa5
call sub.USER32.dll_GetKeyState
cmp ax, 0
jge 0x51b4ce
mov bl, 0x38
or dword [0x569478], 0x400
mov dword [0x569484], 0x12
jmp 0x51b575
cmp edx, 0x200
jne 0x51b52f
cmp esi, 0
je 0x51b507
mov eax, dword [0x569478]
and eax, 0x200
cmp eax, 0
je 0x51b4fb
mov bl, 0x1d
mov dword [0x569474], 0
jmp 0x51b523
push 0xa3
call sub.USER32.dll_GetKeyState
cmp ax, 0
jge 0x51b523
mov bl, 0x1d
or dword [0x569478], 0x200
mov dword [0x569484], 0x11
jmp 0x51b575
cmp edx, 0x100
jne 0x51b575
cmp esi, 0
je 0x51b54f
mov eax, dword [0x569478]
and eax, 0x100
cmp eax, 0
je 0x51b56b
mov bl, 0x36
jmp 0x51b56b
push 0xa1
call sub.USER32.dll_GetKeyState
cmp ax, 0
jge 0x51b56b
mov bl, 0x36
or dword [0x569478], 0x100
mov dword [0x569484], 0x10
mov eax, dword [esp + 0x14]
mov dword [0x569480], eax
mov dword [0x569488], esi
jmp 0x51b61e
mov dword [0x569480], 0
cmp dword [0x569464], 0
jne 0x51b5c4
mov dword [0x56947c], 0
mov dword [0x569478], 0
mov ebx, 0
mov eax, dword [edi]
lea eax, [eax]
push eax
call sub.KERNEL32.dll_LeaveCriticalSection
jmp 0x51b69f
mov ecx, dword [0x56946c]
and ecx, 0xff
mov dword [0x569484], ecx
cmp dword [0x569470], 0
je 0x51b5f5
mov dword [0x569470], 0
call fcn.0051b6ac
mov dword [0x56946c], eax
jmp 0x51b614
mov dword [0x569470], 1
and eax, 0x600
cmp eax, 0x400
sete al
movzx eax, al
mov dword [0x569474], eax
mov eax, dword [0x569470]
mov dword [0x569488], eax
cmp dword [0x569484], 0
je 0x51b669
cmp dword [0x569488], 0
je 0x51b637
mov esi, 0
jmp 0x51b63c
mov esi, 2
cmp bl, 0
jne 0x51b652
push 0
push dword [0x569484]
call sub.USER32.dll_MapVirtualKeyA
mov bl, al
jmp 0x51b655
or esi, 1
push 0
push esi
movzx eax, bl
push eax
movzx eax, byte [0x569484]
push eax
call sub.USER32.dll_keybd_event
cmp dword [0x569484], 0
jne 0x51b690
mov dword [0x56947c], 0
mov dword [0x569478], 0
mov dword [0x569480], 0
mov ebx, 1
mov eax, dword [edi]
lea eax, [eax]
push eax
call sub.KERNEL32.dll_LeaveCriticalSection
mov eax, ebx
pop edi
pop esi
pop edx
pop ecx
pop ebx
add esp, 0xc
ret