Function at 0x40d520
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x44
mov eax, dword [0x4b64d8]
push ebx
push ebp
push esi
mov edx, dword [eax]
push edi
test edx, edx
mov esi, ecx
sete byte [esp + 0x13]
call fcn.0044b2b0
test eax, eax
jne 0x40df26
mov eax, dword [0x49e7c8]
test eax, eax
jne 0x40df26
mov ecx, dword [0x4b64d8]
mov edx, dword [ecx]
shr edx, 0x1b
test dl, 1
jne 0x40df26
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x40d573
mov dword [esi + 0x2c], 0x49f7e8
mov al, byte [0x4b60f4]
test al, al
je 0x40d5a8
cmp dword [esi], 2
jne 0x40d59b
cmp word [0x4bf1a0], 5
jne 0x40d59b
mov ecx, dword [0x4bf19c]
mov edx, 6
call fcn.00424b40
call fcn.00428cb0
test al, al
je 0x40df53
mov al, byte [esi + 0x44]
test al, al
je 0x40d701
call dword [0x49e630]
push 1
mov ecx, 0x49e570
call fcn.004127c0
mov dword [esi], 0
call fcn.0044b350
mov eax, dword [esi + 0x2c]
lea edi, [esi + 8]
add eax, 8
sub esp, 0xc
mov ecx, dword [eax]
mov dword [esp + 0x24], ecx
mov ecx, edi
mov edx, dword [eax + 4]
mov dword [esp + 0x28], edx
mov edx, dword [ecx]
mov eax, dword [eax + 8]
mov dword [esp + 0x3c], edx
fld dword [esp + 0x3c]
fsub dword [esp + 0x24]
mov dword [esp + 0x2c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x40], eax
mov edx, esp
mov ecx, dword [ecx + 8]
fstp dword [esp + 0x48]
fld dword [esp + 0x40]
fsub dword [esp + 0x28]
mov eax, dword [esp + 0x48]
mov dword [esp + 0x44], ecx
mov dword [edx], eax
fstp dword [esp + 0x4c]
fld dword [esp + 0x44]
fsub dword [0x491434]
mov ecx, dword [esp + 0x4c]
mov dword [edx + 4], ecx
lea ecx, [esp + 0x54]
push ecx
fstp dword [esp + 0x54]
mov eax, dword [esp + 0x54]
mov dword [edx + 8], eax
call fcn.0044f1c0
mov edx, eax
mov ebx, edi
push 0x41200000
mov eax, dword [edx]
sub esp, 0xc
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
mov ebx, esp
mov dword [ebx], eax
lea eax, [esp + 0x58]
push eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], edx
call fcn.0044ebc0
mov ecx, dword [eax]
mov dword [esp + 0x3c], ecx
mov ecx, edi
fld dword [esp + 0x3c]
fadd dword [esp + 0x18]
mov edx, dword [eax + 4]
mov dword [esp + 0x40], edx
mov eax, dword [eax + 8]
fstp dword [esp + 0x30]
fld dword [esp + 0x40]
fadd dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x44], eax
mov dword [ecx], edx
fstp dword [esp + 0x34]
fld dword [esp + 0x44]
fadd dword [0x491434]
mov eax, dword [esp + 0x34]
mov dword [ecx + 4], eax
fstp dword [esp + 0x38]
mov edx, dword [esp + 0x38]
mov dword [ecx + 8], edx
mov al, byte [0x4b60f4]
mov byte [0x4b62f0], 1
test al, al
je 0x40d6f5
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov edi, dword [edi + 8]
mov dword [0x4b66e8], eax
mov dword [0x4b66ec], ecx
mov dword [0x4b66f0], edi
mov byte [esi + 0x44], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov eax, dword [0x51d9ac]
test eax, eax
je 0x40d71c
call fcn.0044e4a0
test eax, eax
mov dword [esi + 4], eax
jle 0x40d71c
mov dword [esi], 0
mov bl, byte [esi + 0x45]
test bl, bl
je 0x40d72a
mov eax, dword [0x49d584]
jmp 0x40d735
fld dword [0x4b656c]
call fcn.0044eaa0
mov ecx, dword [esi + 0x2c]
mov dword [esp + 0x14], eax
add ecx, 8
test bl, bl
mov edx, dword [ecx]
mov dword [esp + 0x30], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x34], eax
lea eax, [esi + 8]
mov ecx, dword [ecx + 8]
mov edx, dword [eax]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
fld dword [esp + 0x3c]
fsub dword [esp + 0x30]
mov ecx, dword [eax + 4]
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 8]
fstp dword [esp + 0x18]
fld dword [esp + 0x40]
fsub dword [esp + 0x34]
mov dword [esp + 0x44], edx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x24], ecx
fstp dword [esp + 0x1c]
fld dword [esp + 0x44]
fsub dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x28], edx
fstp dword [esp + 0x20]
fild dword [esi + 4]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x2c], edi
fmul dword [0x49151c]
fadd dword [0x491518]
je 0x40d7d2
fcom dword [0x491514]
fnstsw ax
test ah, 1
jne 0x40d7d2
fstp st(0)
mov dword [esp + 0x18], 0x41cc0000
jmp 0x40d7d6
fstp dword [esp + 0x18]
mov eax, dword [esp + 0x18]
push eax
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
lea ecx, [esp + 0x58]
push ecx
mov dword [eax + 4], edx
mov dword [eax + 8], edi
call fcn.0044ebc0
mov edx, eax
lea edi, [esi + 0x20]
mov ebx, edi
mov eax, dword [edx]
mov dword [esp + 0x30], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x34], ecx
mov edx, dword [edx + 8]
mov dword [ebx], eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x38], edx
mov dword [ebx + 4], ecx
add eax, 8
mov dword [ebx + 8], edx
mov ecx, dword [eax]
mov dword [esp + 0x3c], ecx
mov ecx, edi
fld dword [esp + 0x3c]
fsub dword [esp + 0x30]
mov edx, dword [eax + 4]
mov dword [esp + 0x40], edx
mov eax, dword [eax + 8]
fstp dword [esp + 0x48]
fld dword [esp + 0x40]
fsub dword [esp + 0x34]
mov edx, dword [esp + 0x48]
mov dword [esp + 0x44], eax
mov dword [ecx], edx
fstp dword [esp + 0x4c]
fld dword [esp + 0x44]
fsub dword [esp + 0x38]
mov eax, dword [esp + 0x4c]
mov dword [ecx + 4], eax
push ecx
fstp dword [esp + 0x54]
fld dword [esp + 0x1c]
fadd dword [0x491510]
mov edx, dword [esp + 0x54]
sub esp, 0xc
mov dword [ecx + 8], edx
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, esp
fstp dword [esp + 0xc]
mov dword [eax], ecx
mov ecx, dword [esp + 0x3c]
mov dword [eax + 4], edx
lea edx, [esp + 0x58]
push edx
mov dword [eax + 8], ecx
call fcn.0044ebc0
mov edx, eax
mov eax, dword [edx]
mov dword [esp + 0x3c], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x40], ecx
mov edx, dword [edx + 8]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x28], ecx
add eax, 8
mov dword [esp + 0x2c], edx
mov dword [esp + 0x44], edx
mov ecx, dword [eax]
mov dword [esp + 0x48], ecx
mov edx, dword [eax + 4]
fld dword [esp + 0x48]
mov eax, dword [eax + 8]
mov dword [esp + 0x4c], edx
fsub dword [esp + 0x3c]
mov dword [esp + 0x50], eax
fstp dword [esp + 0x30]
fld dword [esp + 0x4c]
fsub dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
lea eax, [esi + 0x14]
mov dword [esi + 0x14], ecx
fstp dword [esp + 0x34]
fld dword [esp + 0x50]
fsub dword [esp + 0x44]
mov edx, dword [esp + 0x34]
mov dword [eax + 4], edx
fstp dword [esp + 0x38]
mov ecx, dword [esp + 0x38]
mov dword [eax + 8], ecx
mov al, byte [0x4b60f4]
test al, al
mov eax, dword [0x49e5a4]
jne 0x40d937
mov eax, dword [eax*4 + 0x49cec8]
test eax, eax
je 0x40d95b
test byte [eax], 2
jne 0x40d9cf
jmp 0x40d95b
mov edx, dword [0x4bf19c]
mov ecx, dword [0x4bf1a4]
cmp edx, ecx
jne 0x40d9cf
mov eax, dword [eax*4 + 0x49cec8]
test eax, eax
je 0x40d95b
test byte [eax], 2
jne 0x40d9cf
mov al, byte [0x4b64d3]
mov ebx, dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ebp, dword [sym.imp.USER32.dll_GetKeyState]
test al, al
je 0x40d999
push 0x10
call ebx
test ah, 0x80
jne 0x40d999
push 0x10
call ebp
test ah, 0x80
jne 0x40d999
push 0x11
call ebx
test ah, 0x80
jne 0x40d999
push 0x11
call ebp
test ah, 0x80
mov byte [esp + 0x12], 1
je 0x40d99e
mov byte [esp + 0x12], 0
mov al, byte [0x4b64d2]
test al, al
je 0x40d9d4
push 0x10
call ebx
test ah, 0x80
jne 0x40d9d4
push 0x10
call ebp
test ah, 0x80
jne 0x40d9d4
push 0x11
call ebx
test ah, 0x80
jne 0x40d9d4
push 0x11
call ebp
test ah, 0x80
jne 0x40d9d4
mov cl, 1
jmp 0x40d9d6
mov byte [esp + 0x12], 0
xor cl, cl
mov al, byte [esi + 0x45]
test al, al
mov al, byte [esp + 0x12]
je 0x40d9ed
test al, al
jne 0x40d9e9
test cl, cl
je 0x40d9ed
mov bl, 1
jmp 0x40d9ef
xor bl, bl
test al, al
jne 0x40d9f7
test cl, cl
je 0x40da0d
mov dl, byte [0x4b6570]
test dl, dl
jne 0x40da0d
mov dl, byte [esp + 0x13]
test dl, dl
je 0x40da0d
mov byte [esi + 0x45], 1
mov dl, byte [esi + 0x45]
test dl, dl
mov edx, dword [0x49d58c]
je 0x40da48
test al, al
mov eax, dword [0x49d584]
je 0x40da2c
lea ebp, [eax + 5]
mov dword [esp + 0x14], ebp
jmp 0x40da30
mov ebp, dword [esp + 0x14]
test cl, cl
je 0x40da4c
lea ebp, [eax - 5]
cmp ebp, edx
mov dword [esp + 0x14], ebp
jg 0x40da4c
lea ebp, [edx + 2]
mov dword [esp + 0x14], ebp
jmp 0x40da4c
mov ebp, dword [esp + 0x14]
mov al, byte [0x4b6570]
test al, al
je 0x40da74
mov al, byte [esp + 0x13]
test al, al
je 0x40da7c
mov al, byte [0x4953b4]
test al, al
je 0x40da7c
xor ebx, ebx
cmp edx, ebx
jne 0x40da7e
mov byte [0x4953b4], bl
jmp 0x40da7e
test bl, bl
je 0x40de36
xor ebx, ebx
mov eax, dword [0x4b64d8]
mov eax, dword [eax]
cmp eax, ebx
je 0x40da91
test al, 0x10
je 0x40de38
mov al, byte [0x4b60f4]
test al, al
je 0x40daad
mov ecx, dword [0x4bf1a4]
mov eax, dword [0x4bf19c]
cmp ecx, eax
jne 0x40de38
mov eax, dword [0x49e5a4]
mov eax, dword [eax*4 + 0x49cec8]
cmp eax, ebx
je 0x40dac6
test byte [eax], 2
jne 0x40de38
mov dword [esi], ebx
mov eax, dword [0x49d588]
cmp eax, ebx
jne 0x40dae0
mov cl, byte [esp + 0x13]
test cl, cl
je 0x40dae0
mov eax, ebp
mov dword [0x49d588], eax
mov cl, byte [0x4953b4]
test cl, cl
jne 0x40db0f
mov ecx, ebp
sub ecx, eax
cmp ecx, 0x14
jl 0x40de87
mov ecx, 0x49e570
mov byte [0x4953b4], 1
mov dword [0x49d58c], eax
call fcn.00410d60
jmp 0x40db1d
cmp dword [0x49d58c], ebx
jne 0x40db1d
mov dword [0x49d58c], ebp
mov al, byte [0x4953b4]
test al, al
je 0x40de87
mov ecx, dword [0x49d58c]
mov edx, ebp
sub edx, ecx
mov dword [esi + 4], edx
mov eax, dword [0x49d584]
cmp ebp, eax
jg 0x40de26
fild dword [esp + 0x14]
mov eax, dword [0x51c08c]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
mov eax, dword [0x49d580]
fisub dword [0x49d584]
mov ecx, 0x64
push 0x3f800000
sub esp, 0xc
fild qword [esp + 0x28]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ebx
mov eax, dword [0x49d574]
fisub dword [esp + 0x28]
inc eax
fdivp st(1)
fstp dword [eax*4 + 0x49d58c]
cdq
idiv ecx
mov dword [0x49d574], edx
mov edx, dword [esi + 0x2c]
add edx, 8
mov eax, dword [edx]
mov dword [esp + 0x4c], eax
lea eax, [esi + 8]
mov ecx, dword [edx + 4]
mov dword [esp + 0x50], ecx
mov ecx, dword [eax]
mov edx, dword [edx + 8]
mov dword [esp + 0x58], ecx
fld dword [esp + 0x58]
fsub dword [esp + 0x4c]
mov dword [esp + 0x54], edx
mov edx, dword [eax + 4]
mov dword [esp + 0x5c], edx
mov ecx, esp
mov eax, dword [eax + 8]
fstp dword [esp + 0x40]
fld dword [esp + 0x5c]
fsub dword [esp + 0x50]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x60], eax
mov dword [ecx], edx
fstp dword [esp + 0x44]
fld dword [esp + 0x60]
fsub dword [esp + 0x54]
mov eax, dword [esp + 0x44]
mov dword [ecx + 4], eax
lea eax, [esp + 0x58]
push eax
fstp dword [esp + 0x4c]
mov edx, dword [esp + 0x4c]
mov dword [ecx + 8], edx
call fcn.0044ebc0
mov edx, eax
mov eax, dword [edx]
mov dword [esp + 0x3c], eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x40], ecx
mov edx, dword [edx + 8]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x2c]
mov dword [esp + 0x28], ecx
add eax, 8
mov dword [esp + 0x2c], edx
mov dword [esp + 0x44], edx
mov ecx, dword [eax]
mov dword [esp + 0x48], ecx
fld dword [esp + 0x48]
fsub dword [esp + 0x3c]
mov edx, dword [eax + 4]
mov dword [esp + 0x4c], edx
mov eax, dword [eax + 8]
fstp dword [esp + 0x18]
fld dword [esp + 0x4c]
fsub dword [esp + 0x40]
mov dword [esp + 0x50], eax
fstp dword [esp + 0x1c]
fld dword [esp + 0x50]
fsub dword [esp + 0x44]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov ecx, dword [edi]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x28], edx
fstp dword [esp + 0x20]
fld dword [esp + 0x18]
fsub dword [esp + 0x48]
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x20]
fld dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x4c], edx
fsub dword [esp + 0x4c]
fld dword [esp + 0x20]
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 8]
mov edx, dword [esi + 0x18]
mov dword [esp + 0x50], eax
fsub dword [esp + 0x50]
fld dword [esp + 0x18]
mov eax, dword [esi + 0x1c]
mov dword [esp + 0x48], ecx
fsub dword [esp + 0x48]
fld dword [esp + 0x1c]
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], eax
fsub dword [esp + 0x4c]
fld dword [esp + 0x20]
fsub dword [esp + 0x50]
fmul st(3)
fxch st(1)
fmul st(4)
faddp st(1)
fxch st(1)
fmul st(4)
faddp st(1)
fcomp qword [0x4914c0]
fstp st(0)
fnstsw ax
fstp st(0)
test ah, 1
fstp st(0)
je 0x40de87
mov ecx, dword [0x49d574]
fld dword [0x49144c]
cmp ecx, ebx
jle 0x40dd1d
mov eax, 0x49d590
fadd dword [eax]
add eax, 4
dec ecx
jne 0x40dd15
fild dword [0x49d574]
mov dword [0x49d574], ebx
mov ecx, dword [esi + 0x2c]
add ecx, 8
fdivr st(1)
mov edx, dword [ecx]
mov dword [esp + 0x3c], edx
mov edx, dword [esi + 8]
mov eax, dword [ecx + 4]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [ecx + 8]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x44], ecx
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x50], ecx
fchs
fstp dword [esp + 0x18]
mov edx, dword [esp + 0x18]
fstp st(0)
fld dword [esp + 0x48]
fsub dword [esp + 0x3c]
push edx
sub esp, 0xc
mov eax, esp
fstp dword [esp + 0x40]
fld dword [esp + 0x5c]
fsub dword [esp + 0x50]
mov ecx, dword [esp + 0x40]
mov dword [eax], ecx
fstp dword [esp + 0x44]
fld dword [esp + 0x60]
fsub dword [esp + 0x54]
mov edx, dword [esp + 0x44]
mov dword [eax + 4], edx
lea edx, [esp + 0x58]
push edx
fstp dword [esp + 0x4c]
mov ecx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
call fcn.0044ebc0
mov edx, eax
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov edx, dword [edx + 8]
mov dword [esp + 0x24], eax
mov eax, dword [0x4b607c]
mov dword [esp + 0x28], ecx
mov ecx, dword [0x4b6078]
push eax
push ecx
lea ecx, [esp + 0x2c]
mov dword [esp + 0x34], edx
call fcn.0044e2c0
mov edx, dword [0x4b607c]
mov eax, dword [0x4b6078]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x30]
sub esp, 0xc
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x40]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x2c]
push eax
mov dword [ecx + 8], edx
mov ecx, esi
call fcn.0040d230
call fcn.0040f920
call dword [0x49e62c]
mov dword [0x49d58c], ebx
mov dword [esi + 4], ebx
call fcn.0044b350
jmp 0x40de87
cmp dword [0x49d574], ebx
je 0x40de87
mov dword [0x49d574], ebx
jmp 0x40de87
xor ebx, ebx
cmp dword [0x49d574], ebx
jne 0x40de5a
cmp edx, ebx
jne 0x40de5a
cmp dword [esi + 4], ebx
jne 0x40de5a
mov al, byte [0x4953b4]
test al, al
je 0x40de5a
cmp dword [0x49d588], ebx
je 0x40de87
mov al, byte [esi + 0x45]
test al, al
jne 0x40de87
mov dword [0x49d58c], ebx
mov dword [esi + 4], ebx
mov ecx, 0x49e570
mov dword [0x49d574], ebx
mov dword [0x49d588], ebx
mov byte [0x4953b4], 1
call fcn.00410d70
mov al, byte [0x4b6054]
test al, al
je 0x40de94
cmp dword [esi], ebx
jne 0x40de9b
mov ecx, esi
call fcn.0040c3f0
mov ecx, dword [0x4957d8]
mov edx, dword [0x4957dc]
mov eax, dword [0x4957e0]
mov dword [0x4958c0], ecx
mov ecx, dword [0x4b64d8]
mov dword [0x4958c4], edx
mov dword [0x4958c8], eax
mov edx, dword [ecx]
shr edx, 0x18
test dl, 1
je 0x40dedb
mov al, byte [0x4b6570]
mov byte [esp + 0x18], 2
test al, al
je 0x40dee0
mov byte [esp + 0x18], 0
mov al, byte [0x4b6054]
test al, al
je 0x40df0e
mov eax, dword [esp + 0x18]
mov ecx, dword [0x4b604c]
mov edx, dword [0x4b6048]
push 1
push eax
push ebx
push 0x3f800000
push ecx
push edx
mov ecx, 0x4b6040
call fcn.00407f60
mov eax, dword [0x51c08c]
mov dword [0x49d584], ebp
mov dword [0x49d580], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
mov al, byte [0x4b6054]
test al, al
je 0x40df53
mov dl, 1
mov ecx, 0x4b6040
call fcn.0040ed70
push 1
push 0xffffffffffffffff
or edx, 0xffffffff
mov ecx, 0x4b6040
call fcn.0044c7a0
mov byte [0x4b6054], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret