Function at 0x10040a54
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x58
mov eax, dword [0x100b1040]
xor eax, esp
mov dword [esp + 0x54], eax
push esi
push edi
mov edi, edx
mov edx, ecx
mov ecx, dword [0x100b2110]
mov dword [esp + 0x50], edx
test ecx, ecx
je case.0x1004131b.527
lea esi, [ecx + 8]
mov ecx, dword [ecx + 0x74]
mov dword [esp + 0xc], ecx
cmp edi, 0x200
ja 0x10041303
je case.0x10040a4d.160
lea eax, [edi - 7]
cmp eax, 0xfe
ja case.0x1004131b.527
movzx eax, byte [eax + 0x100415a8]
jmp dword [eax*4 + 0x1004158c]
cmp edi, 0x100
je 0x10040a69
mov byte [esp + 0xc], 0
cmp edi, 0x104
jne 0x10040a6e
mov byte [esp + 0xc], 1
cmp dword [ebp + 8], 0x100
jae case.0x1004131b.527
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x11
call edi
shr eax, 0xf
and al, 1
cmp byte [esi + 0x3889], 0
mov byte [esp + 0x10], al
je 0x10040ab8
test al, al
je 0x10040aa5
movss xmm3, dword [0x100ab010]
jmp 0x10040aa8
xorps xmm3, xmm3
push dword [esp + 0x10]
mov ecx, esi
push 0x1000
call fcn.10013bf0
push 0x10
call edi
shr eax, 0xf
and al, 1
cmp byte [esi + 0x3889], 0
mov byte [esp + 0x10], al
je 0x10040aef
test al, al
je 0x10040adc
movss xmm3, dword [0x100ab010]
jmp 0x10040adf
xorps xmm3, xmm3
push dword [esp + 0x10]
mov ecx, esi
push 0x2000
call fcn.10013bf0
push 0x12
call edi
shr eax, 0xf
and al, 1
cmp byte [esi + 0x3889], 0
mov byte [esp + 0x10], al
je 0x10040b26
test al, al
je 0x10040b13
movss xmm3, dword [0x100ab010]
jmp 0x10040b16
xorps xmm3, xmm3
push dword [esp + 0x10]
mov ecx, esi
push 0x4000
call fcn.10013bf0
push 0x5d
call edi
shr eax, 0xf
and al, 1
cmp byte [esi + 0x3889], 0
mov byte [esp + 0x10], al
je 0x10040b5d
test al, al
je 0x10040b4a
movss xmm3, dword [0x100ab010]
jmp 0x10040b4d
xorps xmm3, xmm3
push dword [esp + 0x10]
mov ecx, esi
push 0x8000
call fcn.10013bf0
mov esi, dword [ebp + 8]
cmp esi, 0xd
jne 0x10040b78
mov eax, dword [ebp + 0xc]
shr eax, 0x10
test eax, 0x100
mov eax, 0x10d
cmovne esi, eax
mov ecx, esi
call fcn.10040420
mov edx, eax
mov dword [esp + 0x50], edx
cmp edx, 0x262
jne 0x10040be2
mov cl, byte [esp + 0xc]
test cl, cl
jne 0x10040bea
mov eax, dword [0x100b2110]
add eax, 8
mov dword [esp + 0x10], eax
cmp byte [eax + 0x3889], cl
je 0x10040bc3
movss xmm3, dword [0x100ab010]
mov ecx, eax
push 1
push edx
call fcn.10013bf0
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0xc]
cmp esi, 0x1ff
ja 0x10040bea
mov dword [eax + esi*4 + 0xb0], 0x262
mov dword [eax + 0xa38], esi
jmp 0x10040bea
test edx, edx
je 0x10040c3a
mov cl, byte [esp + 0xc]
mov eax, dword [0x100b2110]
add eax, 8
mov dword [esp + 0x10], eax
cmp byte [eax + 0x3889], 0
je 0x10040c1c
test cl, cl
je 0x10040c0d
movss xmm3, dword [0x100ab010]
jmp 0x10040c10
xorps xmm3, xmm3
push dword [esp + 0xc]
mov ecx, eax
push edx
call fcn.10013bf0
cmp esi, 0x1ff
ja 0x10040c3a
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x50]
mov dword [ecx + esi*4 + 0xb0], eax
mov dword [ecx + eax*4 + 0xb0], esi
cmp esi, 0x10
jne 0x10040d10
push 0xa0
call edi
mov cl, byte [esp + 0xc]
shr eax, 0xf
and al, 1
cmp al, cl
jne 0x10040c9d
mov eax, dword [0x100b2110]
cmp byte [eax + 0x3891], 0
lea esi, [eax + 8]
je 0x10040c89
test cl, cl
je 0x10040c76
movss xmm3, dword [0x100ab010]
jmp 0x10040c79
xorps xmm3, xmm3
push dword [esp + 0xc]
mov ecx, esi
push 0x210
call fcn.10013bf0
mov dword [esi + 0x330], 0x210
mov dword [esi + 0x8f0], 0xa0
push 0xa1
call edi
mov cl, byte [esp + 0xc]
shr eax, 0xf
and al, 1
cmp al, cl
jne case.0x1004131b.527
mov esi, dword [0x100b2110]
cmp byte [esi + 0x3891], 0
je 0x10040ce9
test cl, cl
je 0x10040cd2
movss xmm0, dword [0x100ab010]
jmp 0x10040cd5
xorps xmm0, xmm0
push dword [esp + 0xc]
movaps xmm3, xmm0
lea ecx, [esi + 8]
push 0x214
call fcn.10013bf0
mov dword [esi + 0x33c], 0x214
xor eax, eax
mov dword [esi + 0x908], 0xa1
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
cmp esi, 0x11
jne 0x10040de6
push 0xa2
call edi
mov cl, byte [esp + 0xc]
shr eax, 0xf
and al, 1
cmp al, cl
jne 0x10040d73
mov eax, dword [0x100b2110]
cmp byte [eax + 0x3891], 0
lea esi, [eax + 8]
je 0x10040d5f
test cl, cl
je 0x10040d4c
movss xmm3, dword [0x100ab010]
jmp 0x10040d4f
xorps xmm3, xmm3
push dword [esp + 0xc]
mov ecx, esi
push 0x20f
call fcn.10013bf0
mov dword [esi + 0x338], 0x20f
mov dword [esi + 0x8ec], 0xa2
push 0xa3
call edi
mov cl, byte [esp + 0xc]
shr eax, 0xf
and al, 1
cmp al, cl
jne case.0x1004131b.527
mov esi, dword [0x100b2110]
cmp byte [esi + 0x3891], 0
je 0x10040dbf
test cl, cl
je 0x10040da8
movss xmm0, dword [0x100ab010]
jmp 0x10040dab
xorps xmm0, xmm0
push dword [esp + 0xc]
movaps xmm3, xmm0
lea ecx, [esi + 8]
push 0x213
call fcn.10013bf0
mov dword [esi + 0x344], 0x213
xor eax, eax
mov dword [esi + 0x904], 0xa3
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
cmp esi, 0x12
jne case.0x1004131b.527
push 0xa4
call edi
mov cl, byte [esp + 0xc]
shr eax, 0xf
and al, 1
cmp al, cl
jne 0x10040e49
mov eax, dword [0x100b2110]
cmp byte [eax + 0x3891], 0
lea esi, [eax + 8]
je 0x10040e35
test cl, cl
je 0x10040e22
movss xmm3, dword [0x100ab010]
jmp 0x10040e25
xorps xmm3, xmm3
push dword [esp + 0xc]
mov ecx, esi
push 0x211
call fcn.10013bf0
mov dword [esi + 0x340], 0x211
mov dword [esi + 0x8f4], 0xa4
push 0xa5
call edi
mov cl, byte [esp + 0xc]
shr eax, 0xf
and al, 1
cmp al, cl
jne case.0x1004131b.527
mov esi, dword [0x100b2110]
cmp byte [esi + 0x3891], 0
je 0x10040e95
test cl, cl
je 0x10040e7e
movss xmm0, dword [0x100ab010]
jmp 0x10040e81
xorps xmm0, xmm0
push dword [esp + 0xc]
movaps xmm3, xmm0
lea ecx, [esi + 8]
push 0x215
call fcn.10013bf0
mov dword [esi + 0x34c], 0x215
xor eax, eax
mov dword [esi + 0x90c], 0xa5
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xdf4]
cmp edi, 7
mov dword [esp + 0xc], ecx
sete byte [esp + 0x1b]
mov eax, dword [ecx + 0x3f20]
mov dword [esp + 0x10], eax
lea edx, [eax - 1]
test edx, edx
js 0x10040f06
mov eax, dword [esp + 0xc]
lea ecx, [edx*8]
sub ecx, edx
mov eax, dword [eax + 0x3f28]
lea eax, [eax + ecx*4]
cmp dword [eax], 6
je 0x10040f71
sub eax, 0x1c
sub edx, 1
jns 0x10040ef5
mov ecx, dword [esp + 0xc]
cmp byte [ecx + 0x3890], 0
sete al
mov dl, byte [esp + 0x1b]
cmp al, dl
je case.0x1004131b.527
cmp byte [esi + 0x5f], 0
je 0x10040f2b
cmp edi, 7
jne case.0x1004131b.527
mov eax, dword [ecx + 0x3f3c]
lea esi, [ecx + 0x3f20]
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
mov dword [esp + 0x28], eax
inc eax
mov dword [ecx + 0x3f3c], eax
mov edi, dword [esi + 4]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], 6
mov byte [esp + 0x2c], dl
cmp ecx, edi
jne 0x10040f90
inc ecx
test edi, edi
je 0x10040f7e
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, edi
jmp 0x10040f83
test eax, eax
je 0x10040f02
mov al, byte [eax + 0xc]
mov ecx, dword [esp + 0xc]
jmp 0x10040f10
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.1002e1a0
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x20]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [esi + 8]
movups xmmword [eax + ecx*4], xmm0
xorps xmm0, xmm0
jmp 0x10041183
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, dword [esp + 0xc]
push 4
add esi, 0x24
shr eax, 0x10
push esi
push 0x20001004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne case.0x1004131b.527
mov dword [esi], eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
push edx
call dword [sym.imp.USER32.dll_IsWindowUnicode]
test eax, eax
je 0x100410c3
mov ecx, dword [ebp + 8]
lea eax, [ecx - 1]
cmp eax, 0xfffe
ja case.0x1004131b.527
movzx edi, cx
mov eax, edi
test ax, ax
jne 0x10041022
cmp word [esi + 0x388c], ax
je case.0x1004131b.527
cmp byte [esi + 0x3889], 0
je case.0x1004131b.527
movzx edx, word [esi + 0x388c]
mov ecx, eax
and ecx, 0xfc00
mov dword [esp + 0x10], 0xd800
cmp cx, word [esp + 0x10]
jne 0x10041078
test dx, dx
je 0x1004105e
push 0xfffd
mov ecx, esi
call fcn.10013b30
mov word [esi + 0x388c], di
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
test dx, dx
je 0x100410a5
mov eax, 0xdc00
cmp cx, ax
je 0x10041097
push 0xfffd
mov ecx, esi
call fcn.10013b30
mov eax, edi
jmp 0x1004109c
mov eax, 0xfffd
xor ecx, ecx
mov word [esi + 0x388c], cx
movzx eax, ax
mov ecx, esi
push eax
call fcn.10013b30
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x50]
push 1
push eax
push 1
lea eax, [ebp + 8]
mov dword [esp + 0x5c], 0
push eax
push 1
push dword [edx + 0x24]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movzx edx, word [esp + 0x50]
mov ecx, dword [esi + 0xdf4]
test edx, edx
je case.0x1004131b.527
cmp byte [esi + 0x3889], 0
je case.0x1004131b.527
mov eax, dword [ecx + 0x3f3c]
lea esi, [ecx + 0x3f20]
mov dword [esp + 0x28], eax
xorps xmm0, xmm0
inc eax
movlpd qword [esp + 0x30], xmm0
mov dword [ecx + 0x3f3c], eax
mov ecx, dword [esi]
mov edi, dword [esi + 4]
mov dword [esp + 0x20], 5
mov dword [esp + 0x24], 2
mov dword [esp + 0x2c], edx
cmp ecx, edi
jne 0x10041166
inc ecx
test edi, edi
je 0x10041154
mov eax, edi
cdq
sub eax, edx
sar eax, 1
add eax, edi
jmp 0x10041159
mov eax, 8
cmp eax, ecx
cmovg ecx, eax
push ecx
mov ecx, esi
call fcn.1002e1a0
mov eax, dword [esi]
movups xmm0, xmmword [esp + 0x20]
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [esi + 8]
movups xmmword [eax + ecx*4], xmm0
movq xmm0, qword [esp + 0x30]
movq qword [eax + ecx*4 + 0x10], xmm0
mov dword [eax + ecx*4 + 0x18], 0
inc dword [esi]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
cmp word [ebp + 0xc], 1
jne case.0x1004131b.527
call fcn.1003f940
test al, al
je case.0x1004131b.527
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.USER32.dll_GetMessageExtraInfo]
and eax, 0xffffff80
cmp eax, 0xff515700
jne 0x100411ee
mov dword [esp + 0x14], 2
jmp 0x100411fc
xor ecx, ecx
cmp eax, 0xff515780
sete cl
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0xc]
xor ecx, ecx
mov edx, dword [esp + 0x50]
cmp edi, 0x200
setne cl
inc ecx
mov dword [eax + 4], edx
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
cmp eax, ecx
je 0x10041297
cmp edi, 0x200
mov dword [esp + 0x40], 0x10
mov eax, 2
mov dword [esp + 0x44], 0x80000000
mov ecx, 0x12
mov dword [esp + 0x48], edx
cmovne eax, ecx
mov dword [esp + 0x4c], 0
cmp dword [esp + 0x10], 0
mov dword [esp + 0x24], eax
mov eax, dword [sym.imp.USER32.dll_TrackMouseEvent]
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 0
je 0x10041281
lea ecx, [esp + 0x40]
push ecx
call eax
mov eax, dword [sym.imp.USER32.dll_TrackMouseEvent]
lea ecx, [esp + 0x20]
push ecx
call eax
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x1c]
mov dword [edx + 8], eax
mov edx, dword [esp + 0x50]
mov ecx, dword [ebp + 0xc]
movsx eax, cx
shr ecx, 0x10
mov dword [esp + 0x54], eax
movsx eax, cx
mov dword [esp + 0x58], eax
cmp edi, 0xa0
jne 0x100412c7
lea eax, [esp + 0x54]
push eax
push edx
call dword [sym.imp.USER32.dll_ScreenToClient]
test eax, eax
je case.0x1004131b.527
mov eax, dword [esi + 0xdf4]
mov ecx, dword [esp + 0x14]
mov dword [eax + 0x3f38], ecx
mov ecx, esi
movd xmm2, dword [esp + 0x58]
movd xmm1, dword [esp + 0x54]
cvtdq2ps xmm2, xmm2
cvtdq2ps xmm1, xmm1
call fcn.10013d60
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
lea eax, [edi - 0x201]
cmp eax, 0xa2
ja case.0x1004131b.527
movzx eax, byte [eax + 0x100416c4]
jmp dword [eax*4 + 0x100416a8]
xor eax, eax
cmp edi, 0x2a3
setne al
inc eax
cmp dword [ecx + 8], eax
jne case.0x1004131b.527
cmp dword [ecx + 4], edx
jne 0x10041343
mov dword [ecx + 4], 0
movss xmm1, dword [0x100ab210]
mov dword [ecx + 8], 0
movaps xmm2, xmm1
mov ecx, esi
call fcn.10013d60
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.USER32.dll_GetMessageExtraInfo]
and eax, 0xffffff80
cmp eax, 0xff515700
jne 0x10041389
mov dword [esp + 0x10], 2
jmp 0x10041397
xor ecx, ecx
cmp eax, 0xff515780
sete cl
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], 0
cmp edi, 0x204
je 0x100413af
cmp edi, 0x206
jne 0x100413b7
mov dword [esp + 0x14], 1
cmp edi, 0x207
je 0x100413c7
cmp edi, 0x209
jne 0x100413cf
mov dword [esp + 0x14], 2
cmp edi, 0x20b
je 0x100413df
cmp edi, 0x20d
jne 0x100413f3
mov eax, dword [ebp + 8]
shr eax, 0x10
dec eax
neg eax
sbb eax, eax
neg eax
add eax, 3
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0xc]
cmp dword [edi + 0xc], 0
jne 0x10041411
call dword [sym.imp.USER32.dll_GetCapture]
test eax, eax
jne 0x10041411
push dword [esp + 0x50]
call dword [sym.imp.USER32.dll_SetCapture]
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x14]
bts eax, ecx
mov edx, dword [esp + 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [esi + 0xdf4]
push 1
push ecx
mov ecx, esi
mov dword [eax + 0x3f38], edx
call fcn.10013ed0
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.USER32.dll_GetMessageExtraInfo]
and eax, 0xffffff80
cmp eax, 0xff515700
jne 0x10041465
mov dword [esp + 0x10], 2
jmp 0x10041473
xor edx, edx
cmp eax, 0xff515780
sete dl
mov dword [esp + 0x10], edx
xor ecx, ecx
cmp edi, 0x205
sete cl
mov dword [esp + 0x14], ecx
cmp edi, 0x208
jne 0x10041491
mov ecx, 2
jmp 0x100414a9
cmp edi, 0x20c
jne 0x100414ad
mov ecx, dword [ebp + 8]
shr ecx, 0x10
dec ecx
neg ecx
sbb ecx, ecx
neg ecx
add ecx, 3
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0xc]
btr eax, ecx
mov dword [edx + 0xc], eax
test eax, eax
jne 0x100414d4
call dword [sym.imp.USER32.dll_GetCapture]
cmp eax, dword [esp + 0x50]
jne 0x100414d0
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov ecx, dword [esp + 0x14]
mov eax, dword [esi + 0xdf4]
mov edx, dword [esp + 0x10]
push 0
push ecx
mov ecx, esi
mov dword [eax + 0x3f38], edx
call fcn.10013ed0
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
xorps xmm1, xmm1
shr eax, 0x10
mov ecx, esi
cwde
movd xmm2, eax
cvtdq2ps xmm2, xmm2
divss xmm2, dword [0x100ab158]
call fcn.10013fe0
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
xorps xmm2, xmm2
shr eax, 0x10
mov ecx, esi
cwde
movd xmm1, eax
cvtdq2ps xmm1, xmm1
xorps xmm1, xmmword [0x100ab6e0]
divss xmm1, dword [0x100ab158]
call fcn.10013fe0
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 7
jne case.0x1004131b.527
mov byte [ecx + 0x29], 1
mov ecx, dword [esp + 0x5c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.1007c18b
mov esp, ebp
pop ebp
ret