Function at 0x504ef8
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x604180]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x2c]
push ebx
mov ebx, dword [ebp + 0x20]
push esi
and dword [eax], 0
xor esi, esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], esi
cmp dword [edi + 8], esi
jle 0x504f3f
push esi
mov ecx, edi
call fcn.0044d772
cmp dword [eax], ebx
je 0x504f52
inc esi
mov dword [ebp - 0x28], esi
cmp esi, dword [edi + 8]
jl 0x504f2a
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00559f3e
leave
ret 0x28
test esi, esi
js 0x504f3f
push 0x5bce48
mov ecx, ebx
call fcn.0042b498
xor ebx, ebx
mov dword [ebp - 0x38], eax
cmp dword [ebp + 8], 9
jne 0x5050e5
or dword [ebp - 0x30], 0xffffffff
push 0x10
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jns 0x50502e
lea ebx, [esi - 1]
test ebx, ebx
jns 0x504fa5
cmp dword [ebp + 0x24], 0
jne 0x505388
cmp dword [ebp + 0x28], 0
jne 0x50537a
mov ebx, dword [edi + 8]
dec ebx
cmp ebx, esi
je 0x504f3f
cmp dword [ebp - 0x38], 0
je 0x504fc7
push ebx
mov ecx, edi
call fcn.0044d772
push 0x5bce48
mov ecx, dword [eax]
call fcn.0042b498
test eax, eax
jne 0x50501d
push ebx
mov ecx, edi
call fcn.0044d772
mov edi, dword [eax]
mov eax, dword [edi]
mov esi, dword [eax + 0x11c]
mov ecx, esi
call dword [0x5a4a38]
mov ecx, edi
call esi
test eax, eax
je 0x505017
mov ecx, dword [ebp - 0x2c]
push ebx
call fcn.0044d772
lea edi, [ebp - 0x14]
mov esi, dword [eax]
lea eax, [ebp - 0x14]
push eax
lea esi, [esi + 0x74]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.USER32.dll_IsRectEmpty]
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
test eax, eax
jne 0x50501d
mov dword [ebp - 0x30], ebx
jmp 0x50501d
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
dec ebx
test eax, eax
js 0x504f89
jmp 0x5050d4
lea ebx, [esi + 1]
cmp ebx, dword [edi + 8]
jl 0x50504c
cmp dword [ebp + 0x28], 0
jne 0x50536c
cmp dword [ebp + 0x24], 0
jne 0x50535e
xor ebx, ebx
cmp ebx, esi
je 0x504f3f
cmp dword [ebp - 0x38], 0
je 0x505072
push ebx
mov ecx, edi
call fcn.0044d772
push 0x5bce48
mov ecx, dword [eax]
call fcn.0042b498
test eax, eax
jne 0x5050c8
push ebx
mov ecx, edi
call fcn.0044d772
mov edi, dword [eax]
mov eax, dword [edi]
mov esi, dword [eax + 0x11c]
mov ecx, esi
call dword [0x5a4a38]
mov ecx, edi
call esi
test eax, eax
je 0x5050c2
mov ecx, dword [ebp - 0x2c]
push ebx
call fcn.0044d772
lea edi, [ebp - 0x14]
mov esi, dword [eax]
lea eax, [ebp - 0x14]
push eax
lea esi, [esi + 0x74]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call dword [sym.imp.USER32.dll_IsRectEmpty]
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
test eax, eax
jne 0x5050c8
mov dword [ebp - 0x30], ebx
jmp 0x5050c8
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
inc ebx
test eax, eax
js 0x505031
push eax
mov ecx, edi
call fcn.0044d772
mov ebx, dword [eax]
mov eax, ebx
jmp 0x504f41
mov edi, dword [ebp - 0x30]
mov eax, dword [edi]
mov esi, dword [eax + 0x160]
mov ecx, esi
call dword [0x5a4a38]
mov ecx, edi
call esi
test eax, eax
jne 0x504f3f
mov eax, dword [ebp + 8]
lea esi, [edi + 0x74]
lea edi, [ebp - 0x48]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub eax, 0x25
je 0x505204
sub eax, 1
je 0x50512d
sub eax, 1
je 0x505204
sub eax, 1
jne 0x5050de
mov eax, dword [ebp - 0x48]
add eax, dword [ebp - 0x40]
cdq
sub eax, edx
mov edx, eax
sar edx, 1
cmp dword [ebp + 8], 0x28
mov dword [ebp - 0x28], edx
jne 0x505149
mov esi, dword [ebp - 0x3c]
inc esi
jmp 0x50514d
mov esi, dword [ebp - 0x44]
dec esi
xor eax, eax
mov dword [ebp - 0x38], esi
cmp dword [ebp + 8], 0x28
mov ecx, edx
mov dword [ebp - 0x30], ecx
setne al
dec eax
and eax, 0xa
add eax, 0xfffffffb
mov dword [ebp - 0x34], eax
mov edi, eax
mov eax, esi
mov dword [ebp - 0x34], esi
cmp ecx, dword [ebp + 0x10]
jge 0x505181
cmp edx, dword [ebp + 0x18]
jg 0x5050de
test ebx, ebx
jne 0x5051eb
mov esi, dword [ebp - 0x2c]
push esi
push eax
push ecx
call fcn.00504eb7
mov ebx, eax
test ebx, ebx
jne 0x5051a4
push esi
push dword [ebp - 0x34]
push dword [ebp - 0x28]
call fcn.00504eb7
mov ebx, eax
test ebx, ebx
je 0x5051c1
mov eax, dword [ebx]
mov esi, dword [eax + 0x11c]
mov ecx, esi
call dword [0x5a4a38]
mov ecx, ebx
call esi
mov esi, dword [ebp - 0x2c]
neg eax
sbb eax, eax
and ebx, eax
mov eax, dword [ebp - 0x34]
add eax, edi
cmp dword [ebp + 8], 0x28
mov dword [ebp - 0x34], eax
jne 0x5051d6
cmp eax, dword [ebp + 0x1c]
jg 0x5051e2
jmp 0x5051db
cmp eax, dword [ebp + 0x14]
jl 0x5051e2
mov ecx, dword [ebp - 0x30]
test ebx, ebx
je 0x505184
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x38]
sub ecx, 5
add edx, 5
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], edx
test ebx, ebx
je 0x50516a
jmp 0x5050de
cmp dword [ebp + 8], 0x27
mov esi, dword [ebp - 0x40]
mov edx, dword [ebp - 0x48]
lea eax, [esi + 1]
je 0x505216
lea eax, [edx - 6]
mov edi, dword [ebp - 0x2c]
xor ecx, ecx
cmp dword [ebp + 8], 0x27
mov dword [ebp - 0x28], eax
setne cl
dec ecx
and ecx, 0xa
add ecx, 0xfffffffb
mov dword [ebp - 0x4c], ecx
cmp dword [ebp + 8], 0x27
jne 0x505253
cmp eax, dword [ebp + 0x18]
jle 0x505272
cmp dword [ebp + 0x28], 0
jne 0x50536c
cmp dword [ebp + 0x24], 0
jne 0x50535e
mov eax, dword [ebp + 0x10]
jmp 0x50526f
cmp eax, dword [ebp + 0x10]
jge 0x505272
cmp dword [ebp + 0x24], 0
jne 0x505388
cmp dword [ebp + 0x28], 0
jne 0x50537a
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x28], eax
cmp eax, edx
jl 0x50527e
cmp eax, esi
jle 0x5050de
mov ecx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
add eax, 5
mov dword [ebp - 0x20], ecx
mov ecx, esi
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x18], eax
call fcn.004cf710
test eax, eax
jne 0x5052c2
mov eax, dword [esi]
mov esi, dword [eax + 0x144]
mov ecx, esi
call dword [0x5a4a38]
mov ecx, dword [ebp - 0x30]
call esi
test eax, eax
je 0x5052db
mov eax, dword [ebp - 0x18]
jmp 0x5052c5
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x20]
push 0xfffffffffffffffd
pop ecx
cdq
idiv ecx
push eax
push 0
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_InflateRect]
xor ecx, ecx
mov eax, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x2c], ecx
cmp dword [edi + 8], ecx
jle 0x505342
push eax
mov ecx, edi
call fcn.0044d772
mov eax, dword [eax]
mov dword [ebp - 0x38], eax
mov eax, dword [eax]
mov esi, dword [eax + 0x11c]
mov ecx, esi
call dword [0x5a4a38]
mov ecx, dword [ebp - 0x38]
call esi
test eax, eax
je 0x505332
mov esi, dword [ebp - 0x38]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x74]
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.USER32.dll_IntersectRect]
test eax, eax
jne 0x505340
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp eax, dword [edi + 8]
jl 0x5052f3
jmp 0x505342
mov ebx, esi
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x4c]
mov dword [ebp - 0x28], eax
test ebx, ebx
jne 0x5050de
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x40]
jmp 0x50522f
mov eax, dword [ebp - 0x34]
mov dword [eax], 0xfffffffe
jmp 0x504f3f
mov eax, dword [ebp - 0x34]
mov dword [eax], 1
jmp 0x504f3f
mov eax, dword [ebp - 0x34]
mov dword [eax], 2
jmp 0x504f3f
mov eax, dword [ebp - 0x34]
or dword [eax], 0xffffffff
jmp 0x504f3f