Function at 0x10066180
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov bh, bh
mov bh, bh
test ah, ah
xor esi, esi
xchg ebx, eax
xchg ebx, eax
mov eax, dword [esp + 0x54]
cmp eax, 0xffffffff
mov ecx, dword [esp + 0x58]
jne 0x100661b1
cmp ecx, 0xffffffff
jne 0x100661b1
lea eax, [esp + 0x18]
push eax
call fcn.10064f50
test ah, ah
jmp 0x100661bd
mov dword [esp + 0x18], eax
mov eax, eax
mov dword [esp + 0x1c], ecx
push ebx
pop ebx
mov ecx, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov edx, edx
add ecx, dword [esp + 0x48]
mov dword [esp + 0x20], ecx
mov dh, dh
add ebx, dword [esp + 0x4c]
mov dword [esp + 0x24], ebx
test ecx, ecx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x54], edx
xchg ebx, eax
xchg ebx, eax
mov ebp, dword [esp + 0x1c]
test esi, esi
sub ecx, dword [esp + 0x18]
mov eax, ebx
sub eax, dword [esp + 0x1c]
mov edx, ecx
imul edx, ecx
mov ecx, eax
imul ecx, eax
add edx, ecx
mov dword [esp + 0x48], edx
fild dword [esp + 0x48]
call fcn.10105ec0
fst qword [esp + 0x28]
test esi, esi
fld qword [0x10165790]
mov edi, dword [esp + 0x44]
fcom st(1)
fnstsw ax
test ah, 5
jp 0x10066384
mov edx, ebx
sub edx, dword [esp + 0x1c]
mov dword [esp + 0x48], edx
fild dword [esp + 0x48]
fdiv st(2)
fstp qword [esp + 0x38]
mov ch, ch
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x18]
mov dword [esp + 0x48], eax
fild dword [esp + 0x48]
fdiv st(2)
fstp qword [esp + 0x30]
test eax, 0x5b2b
mov dword [esp + 0x48], 0x5a
push ebx
pop ebx
fcom st(1)
fnstsw ax
test ah, 5
jp 0x10066384
fld qword [esp + 0x30]
fmul st(1)
fiadd dword [esp + 0x18]
call fcn.10105730
mov dword [esp + 0x10], eax
mov ch, ch
fmul qword [esp + 0x38]
fiadd dword [esp + 0x1c]
call fcn.10105730
mov dword [esp + 0x14], eax
nop
mov ebx, eax
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0x54]
sub ebx, ebp
mov dword [esp + 0x54], eax
mov dword [esp + 0x4c], 3
test bl, bl
cmp dword [esp + 0x50], 0
je 0x100662c5
mov dword [esp + 0x4c], 4
push ecx
pop ecx
test eax, eax
mov byte [esi + edi], 8
jne 0x100662d1
test ebx, ebx
je 0x10066325
mov ebp, dword [sym.imp.USER32.dll_GetAsyncKeyState]
fstp st(0)
push 1
call ebp
test ax, ax
je 0x100662e8
or byte [esi + edi], 1
test ebx, ebx
push 2
call ebp
test ax, ax
je 0x100662f7
or byte [esi + edi], 2
push edx
pop edx
push 4
call ebp
test ax, ax
je 0x10066306
or byte [esi + edi], 4
test edx, edx
cmp dword [esp + 0x54], 0
jge 0x10066313
or byte [esi + edi], 0x10
push eax
pop eax
test ebx, ebx
fld qword [esp + 0x28]
mov eax, dword [esp + 0x54]
jle 0x10066325
or byte [esi + edi], 0x20
test bl, bl
mov byte [esi + edi + 1], al
mov dl, dl
mov eax, dword [esp + 0x50]
neg bl
cmp eax, 2
mov byte [esi + edi + 2], bl
jne 0x10066343
mov byte [esi + edi + 3], 0
test cl, cl
jmp 0x10066352
cmp eax, 1
jne 0x10066352
mov byte [esi + edi + 3], 0
test eax, 0x48e1
add esi, dword [esp + 0x4c]
mov ecx, ecx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x54], ecx
test bl, bl
mov ebp, dword [esp + 0x14]
mov dh, dh
add dword [esp + 0x48], 0x5a
test ebx, ebx
fild dword [esp + 0x48]
fcom st(1)
fnstsw ax
test ah, 5
jnp 0x10066273
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
fstp st(0)
sub eax, dword [esp + 0x54]
fstp st(0)
mov dword [esp + 0x54], eax
jne 0x100663a0
mov edx, ebx
sub edx, ebp
je 0x1006644a
sub ebx, ebp
mov dword [esp + 0x48], 3
test bl, bl
cmp dword [esp + 0x50], 0
je 0x100663bd
mov dword [esp + 0x48], 4
push ecx
pop ecx
test eax, eax
mov byte [esi + edi], 8
jne 0x100663c9
test ebx, ebx
je 0x10066417
mov ebp, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 1
call ebp
test ax, ax
je 0x100663de
or byte [esi + edi], 1
test ebx, ebx
push 2
call ebp
test ax, ax
je 0x100663ed
or byte [esi + edi], 2
push edx
pop edx
push 4
call ebp
test ax, ax
je 0x100663fc
or byte [esi + edi], 4
test edx, edx
cmp dword [esp + 0x54], 0
jge 0x10066409
or byte [esi + edi], 0x10
push eax
pop eax
test ebx, ebx
mov eax, dword [esp + 0x54]
jle 0x10066417
or byte [esi + edi], 0x20
test bl, bl
mov byte [esi + edi + 1], al
mov dl, dl
mov eax, dword [esp + 0x50]
neg bl
cmp eax, 2
mov byte [esi + edi + 2], bl
jne 0x10066435
mov byte [esi + edi + 3], 0
test cl, cl
jmp 0x10066444
cmp eax, 1
jne 0x10066444
mov byte [esi + edi + 3], 0
test eax, 0x48e1
add esi, dword [esp + 0x48]
mov ebx, ebx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret