Function at 0x404d87
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x58
mov eax, ecx
mov ecx, dword [0x563448]
mov dword [esp + 0xc], eax
push esi
push edi
test ecx, ecx
je case.0x4054f7.527
mov esi, dword [ecx + 0x74]
lea edi, [ecx + 8]
mov dword [esp + 0x18], esi
cmp edx, 0x200
ja 0x4054df
je 0x4053d2
lea eax, [edx - 7]
cmp eax, 0xfe
ja case.0x4054f7.527
movzx eax, byte [eax + 0x4056e8]
jmp dword [eax*4 + 0x4056d0]
cmp edx, 0x100
je 0x404d9c
mov byte [esp + 0x14], 0
cmp edx, 0x104
jne 0x404da1
mov byte [esp + 0x14], 1
mov esi, dword [ebp + 8]
cmp esi, 0x100
jae case.0x4054f7.527
push 0x11
call dword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [edi + 0x37a9], 0
mov byte [esp + 0x18], al
je 0x404deb
test al, al
je 0x404dd8
movss xmm3, dword [0x5578c0]
jmp 0x404ddb
xorps xmm3, xmm3
push dword [esp + 0x18]
mov ecx, edi
push 0x281
call fcn.00408b10
push 0x10
call dword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [edi + 0x37a9], 0
mov byte [esp + 0x18], al
je 0x404e26
test al, al
je 0x404e13
movss xmm3, dword [0x5578c0]
jmp 0x404e16
xorps xmm3, xmm3
push dword [esp + 0x18]
mov ecx, edi
push 0x282
call fcn.00408b10
push 0x12
call dword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [edi + 0x37a9], 0
mov byte [esp + 0x18], al
je 0x404e61
test al, al
je 0x404e4e
movss xmm3, dword [0x5578c0]
jmp 0x404e51
xorps xmm3, xmm3
push dword [esp + 0x18]
mov ecx, edi
push 0x283
call fcn.00408b10
push 0x5d
call dword [sym.imp.USER32.dll_GetKeyState]
shr eax, 0xf
and al, 1
cmp byte [edi + 0x37a9], 0
mov byte [esp + 0x18], al
je 0x404e9c
test al, al
je 0x404e89
movss xmm3, dword [0x5578c0]
jmp 0x404e8c
xorps xmm3, xmm3
push dword [esp + 0x18]
mov ecx, edi
push 0x284
call fcn.00408b10
cmp esi, 0xd
jne 0x404eb4
mov eax, dword [ebp + 0xc]
shr eax, 0x10
test eax, 0x100
mov eax, 0x10d
cmovne esi, eax
mov ecx, esi
call fcn.004047f0
mov edi, eax
test edi, edi
je 0x404f10
mov eax, dword [0x563448]
add eax, 8
mov dword [esp + 0x18], eax
cmp byte [eax + 0x37a9], 0
je 0x404efa
cmp byte [esp + 0x14], 0
je 0x404ee7
movss xmm3, dword [0x5578c0]
jmp 0x404eea
xorps xmm3, xmm3
push dword [esp + 0x14]
mov ecx, eax
push edi
call fcn.00408b10
mov eax, dword [esp + 0x18]
cmp esi, 0x1ff
ja 0x404f10
mov dword [eax + esi*4 + 0xb4], edi
mov dword [eax + edi*4 + 0xb4], esi
cmp esi, 0x10
jne 0x404fe1
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 0xa0
call edi
mov cl, byte [esp + 0x14]
shr eax, 0xf
and al, 1
cmp al, cl
jne 0x404f79
mov eax, dword [0x563448]
cmp byte [eax + 0x37b1], 0
lea esi, [eax + 8]
je 0x404f65
test cl, cl
je 0x404f52
movss xmm3, dword [0x5578c0]
jmp 0x404f55
xorps xmm3, xmm3
push dword [esp + 0x14]
mov ecx, esi
push 0x210
call fcn.00408b10
mov dword [esi + 0x334], 0x210
mov dword [esi + 0x8f4], 0xa0
push 0xa1
call edi
mov cl, byte [esp + 0x14]
shr eax, 0xf
and al, 1
cmp al, cl
jne case.0x4054f7.527
mov esi, dword [0x563448]
cmp byte [esi + 0x37b1], 0
je 0x404fc5
test cl, cl
je 0x404fae
movss xmm0, dword [0x5578c0]
jmp 0x404fb1
xorps xmm0, xmm0
push dword [esp + 0x14]
movaps xmm3, xmm0
lea ecx, [esi + 8]
push 0x214
call fcn.00408b10
mov dword [esi + 0x340], 0x214
xor eax, eax
mov dword [esi + 0x90c], 0xa1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp esi, 0x11
jne 0x4050b2
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 0xa2
call edi
mov cl, byte [esp + 0x14]
shr eax, 0xf
and al, 1
cmp al, cl
jne 0x40504a
mov eax, dword [0x563448]
cmp byte [eax + 0x37b1], 0
lea esi, [eax + 8]
je 0x405036
test cl, cl
je 0x405023
movss xmm3, dword [0x5578c0]
jmp 0x405026
xorps xmm3, xmm3
push dword [esp + 0x14]
mov ecx, esi
push 0x20f
call fcn.00408b10
mov dword [esi + 0x33c], 0x20f
mov dword [esi + 0x8f0], 0xa2
push 0xa3
call edi
mov cl, byte [esp + 0x14]
shr eax, 0xf
and al, 1
cmp al, cl
jne case.0x4054f7.527
mov esi, dword [0x563448]
cmp byte [esi + 0x37b1], 0
je 0x405096
test cl, cl
je 0x40507f
movss xmm0, dword [0x5578c0]
jmp 0x405082
xorps xmm0, xmm0
push dword [esp + 0x14]
movaps xmm3, xmm0
lea ecx, [esi + 8]
push 0x213
call fcn.00408b10
mov dword [esi + 0x348], 0x213
xor eax, eax
mov dword [esi + 0x908], 0xa3
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp esi, 0x12
jne case.0x4054f7.527
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 0xa4
call edi
mov cl, byte [esp + 0x14]
shr eax, 0xf
and al, 1
cmp al, cl
jne 0x40511b
mov eax, dword [0x563448]
cmp byte [eax + 0x37b1], 0
lea esi, [eax + 8]
je 0x405107
test cl, cl
je 0x4050f4
movss xmm3, dword [0x5578c0]
jmp 0x4050f7
xorps xmm3, xmm3
push dword [esp + 0x14]
mov ecx, esi
push 0x211
call fcn.00408b10
mov dword [esi + 0x344], 0x211
mov dword [esi + 0x8f8], 0xa4
push 0xa5
call edi
mov cl, byte [esp + 0x14]
shr eax, 0xf
and al, 1
cmp al, cl
jne case.0x4054f7.527
mov esi, dword [0x563448]
cmp byte [esi + 0x37b1], 0
je 0x405167
test cl, cl
je 0x405150
movss xmm0, dword [0x5578c0]
jmp 0x405153
xorps xmm0, xmm0
push dword [esp + 0x14]
movaps xmm3, xmm0
lea ecx, [esi + 8]
push 0x215
call fcn.00408b10
mov dword [esi + 0x350], 0x215
xor eax, eax
mov dword [esi + 0x910], 0xa5
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ecx + 0x3840]
lea esi, [ecx + 0x383c]
mov ecx, dword [esi]
cmp edx, 7
xorps xmm0, xmm0
movaps xmmword [esp + 0x40], xmm0
sete byte [esp + 0x48]
mov dword [esp + 0x40], 7
cmp ecx, edi
jne 0x4051cf
inc ecx
test edi, edi
je 0x4051bd
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, edi
jmp 0x4051c2
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.00428f60
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x40]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 8]
movups xmmword [eax + ecx*8], xmm0
xorps xmm0, xmm0
movq qword [eax + ecx*8 + 0x10], xmm0
inc dword [esi]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
je case.0x4054f7.527
cmp eax, 0x10000
jae case.0x4054f7.527
movzx edx, ax
mov dword [esp + 0x14], edx
test dx, dx
jne 0x405222
cmp word [edi + 0x37ac], dx
je case.0x4054f7.527
cmp byte [edi + 0x37a9], 0
je case.0x4054f7.527
movzx esi, word [edi + 0x37ac]
mov eax, edx
and eax, 0xfc00
mov dword [esp + 0x18], 0xd800
cmp ax, word [esp + 0x18]
jne 0x4052e3
test si, si
je 0x4052d4
mov eax, dword [ecx + 0x3840]
lea esi, [ecx + 0x383c]
mov ecx, dword [esi]
xorps xmm0, xmm0
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 6
mov dword [esp + 0x24], 2
mov dword [esp + 0x28], 0xfffd
cmp ecx, eax
jne 0x4052b5
inc ecx
test eax, eax
je 0x40529f
cdq
sub eax, edx
sar eax, 1
add eax, dword [esi + 4]
jmp 0x4052a4
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.00428f60
mov edx, dword [esp + 0x14]
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x20]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 8]
movups xmmword [eax + ecx*8], xmm0
movq xmm0, qword [esp + 0x30]
movq qword [eax + ecx*8 + 0x10], xmm0
inc dword [esi]
mov word [edi + 0x37ac], dx
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
movzx edx, dx
mov dword [esp + 0x18], edx
test si, si
je 0x405390
mov esi, 0xdc00
cmp ax, si
je 0x405382
mov eax, dword [ecx + 0x3840]
lea esi, [ecx + 0x383c]
mov ecx, dword [esi]
xorps xmm0, xmm0
movlpd qword [esp + 0x2c], xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x20], 6
mov dword [esp + 0x24], 2
mov dword [esp + 0x28], 0xfffd
cmp ecx, eax
jne 0x405361
inc ecx
test eax, eax
je 0x40534b
cdq
sub eax, edx
sar eax, 1
add eax, dword [esi + 4]
jmp 0x405350
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.00428f60
mov edx, dword [esp + 0x18]
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x20]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 8]
movups xmmword [eax + ecx*8], xmm0
movq xmm0, qword [esp + 0x30]
movq qword [eax + ecx*8 + 0x10], xmm0
inc dword [esi]
jmp 0x405387
mov edx, 0xfffd
xor eax, eax
mov word [edi + 0x37ac], ax
movzx eax, dx
mov ecx, edi
push eax
call fcn.00408a70
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp word [ebp + 0xc], 1
jne case.0x4054f7.527
call fcn.00403930
test al, al
je case.0x4054f7.527
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x26], 1
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp byte [esi + 8], 0
mov dword [esi + 4], eax
jne 0x40540c
mov dword [esp + 0x28], eax
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], 0x10
mov dword [esp + 0x28], 2
mov dword [esp + 0x30], 0
call dword [sym.imp.USER32.dll_TrackMouseEvent]
mov ecx, dword [0x563448]
mov byte [esi + 8], 1
mov eax, dword [ebp + 0xc]
movsx edx, ax
shr eax, 0x10
test dword [edi], 0x400
cwde
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
je 0x405444
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
push edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov ecx, dword [0x563448]
cmp byte [edi + 0x37a9], 0
je case.0x4054f7.527
mov edi, dword [ecx + 0x3840]
lea esi, [ecx + 0x383c]
mov ecx, dword [esi]
xorps xmm0, xmm0
movlpd qword [esp + 0x50], xmm0
movd xmm0, edx
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 1
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x48], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [esp + 0x4c], xmm0
cmp ecx, edi
jne 0x4054b8
inc ecx
test edi, edi
je 0x4054a6
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, edi
jmp 0x4054ab
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.00428f60
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x40]
lea ecx, [eax + eax*2]
mov eax, dword [esi + 8]
movups xmmword [eax + ecx*8], xmm0
movq xmm0, qword [esp + 0x50]
movq qword [eax + ecx*8 + 0x10], xmm0
inc dword [esi]
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [edx - 0x201]
cmp eax, 0xa2
ja case.0x4054f7.527
movzx eax, byte [eax + 0x405804]
jmp dword [eax*4 + 0x4057e8]
mov edx, dword [esp + 0x14]
cmp dword [esi + 4], edx
jne 0x40550e
mov dword [esi + 4], 0
mov byte [esi + 8], 0
cmp byte [edi + 0x37a9], 0
je case.0x4054f7.527
mov edi, dword [ecx + 0x3840]
lea esi, [ecx + 0x383c]
mov ecx, dword [esi]
xorps xmm0, xmm0
movlpd qword [esp + 0x50], xmm0
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 1
mov dword [esp + 0x48], 0xff7fffff
mov dword [esp + 0x4c], 0xff7fffff
cmp ecx, edi
jne 0x4054b8
inc ecx
test edi, edi
je 0x4054a6
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, edi
jmp 0x4054ab
cmp edx, 0x204
je 0x405587
xor esi, esi
cmp edx, 0x206
jne 0x40558c
mov esi, 1
cmp edx, 0x207
je 0x40559c
cmp edx, 0x209
jne 0x4055a1
mov esi, 2
cmp edx, 0x20b
je 0x4055b1
cmp edx, 0x20d
jne 0x4055c1
mov esi, dword [ebp + 8]
shr esi, 0x10
dec esi
neg esi
sbb esi, esi
neg esi
add esi, 3
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0xc], 0
jne 0x4055e4
call dword [sym.imp.USER32.dll_GetCapture]
test eax, eax
jne 0x4055e0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.USER32.dll_SetCapture]
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0xc]
bts eax, esi
push 1
mov dword [ecx + 0xc], eax
mov ecx, edi
push esi
call fcn.00408c70
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
xor ecx, ecx
cmp edx, 0x205
sete cl
mov dword [esp + 0x18], ecx
cmp edx, 0x208
jne 0x40561d
mov ecx, 2
jmp 0x405635
cmp edx, 0x20c
jne 0x405639
mov ecx, dword [ebp + 8]
shr ecx, 0x10
dec ecx
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 3
mov dword [esp + 0x18], ecx
mov eax, dword [esi + 0xc]
btr eax, ecx
mov dword [esi + 0xc], eax
test eax, eax
jne 0x40565c
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, dword [esp + 0x14]
jne 0x405658
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov ecx, dword [esp + 0x18]
push 0
push ecx
mov ecx, edi
call fcn.00408c70
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
xorps xmm1, xmm1
shr eax, 0x10
mov ecx, edi
cwde
movd xmm2, eax
cvtdq2ps xmm2, xmm2
divss xmm2, dword [0x5579ec]
call fcn.00408d20
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
xorps xmm2, xmm2
shr eax, 0x10
mov ecx, edi
cwde
movd xmm1, eax
cvtdq2ps xmm1, xmm1
divss xmm1, dword [0x5579ec]
call fcn.00408d20
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 7
jne case.0x4054f7.527
mov byte [esi + 0x25], 1
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret