Function at 0x4101a0
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x110
push ebx
push esi
push edi
mov esi, ecx
push ebp
mov ecx, dword [0x54738c]
call fcn.00477550
test eax, eax
jne 0x410543
mov eax, dword [0x54738c]
mov eax, dword [eax + 0x94]
cmp eax, 4
je 0x4101e2
cmp eax, 6
je 0x4101e2
cmp eax, 7
je 0x4101e2
cmp eax, 5
jne 0x410543
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ecx, dword [esi + 0x20]
cmp eax, dword [ecx + 4]
jne 0x410543
xor edi, edi
mov eax, dword [esi + 0x44]
cmp eax, edi
je 0x410543
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov word [esp + 0x12], di
mov eax, dword [0x54738c]
mov dword [esp + 0x1c], edi
nop
mov ecx, dword [eax + 0x98]
mov ebx, dword [eax + 0xc]
cmp ecx, 0x12
jne 0x410350
mov eax, dword [esi + 0x108]
test eax, eax
je 0x4104fb
mov ebp, dword [eax + 0xf8]
test ebp, ebp
je 0x410350
mov al, byte [esp + 0x46]
cmp al, 1
jbe 0x410283
fld dword [ebp + 0x3c]
fsub dword [ebx + 0x8d8]
push edi
sub esp, 4
mov ecx, ebp
sub esp, 4
fstp dword [esp + 4]
fld dword [ebp + 0x38]
fadd dword [ebx + 0x8d8]
fstp dword [esp]
mov eax, dword [ebp]
call dword [eax + 0x34]
fstp st(0)
mov dword [esp + 0x1c], 1
mov al, byte [esp + 0x48]
cmp al, 1
jbe 0x4102c7
fld dword [ebp + 0x3c]
fadd dword [ebx + 0x8d8]
mov eax, dword [esi + 0x108]
push 0
sub esp, 4
sub esp, 4
mov ecx, dword [eax + 0xf8]
fstp dword [esp + 4]
fld dword [ebp + 0x38]
fsub dword [ebx + 0x8d8]
fstp dword [esp]
mov eax, dword [ecx]
call dword [eax + 0x34]
fstp st(0)
mov dword [esp + 0x1c], 1
mov al, byte [esp + 0x45]
cmp al, 1
jbe 0x41030b
fld dword [ebp + 0x3c]
fsub dword [ebx + 0x8d8]
mov eax, dword [esi + 0x108]
push 0
sub esp, 4
sub esp, 4
mov ecx, dword [eax + 0xf8]
fstp dword [esp + 4]
fld dword [ebp + 0x38]
fsub dword [ebx + 0x8d8]
fstp dword [esp]
mov eax, dword [ecx]
call dword [eax + 0x34]
fstp st(0)
mov dword [esp + 0x1c], 1
mov al, byte [esp + 0x47]
cmp al, 1
jbe 0x4104fb
fld dword [ebp + 0x3c]
fadd dword [ebx + 0x8d8]
mov eax, dword [esi + 0x108]
push 0
sub esp, 4
sub esp, 4
mov ecx, dword [eax + 0xf8]
fstp dword [esp + 4]
fld dword [ebp + 0x38]
fadd dword [ebx + 0x8d8]
fstp dword [esp]
mov ebx, dword [ecx]
call dword [ebx + 0x34]
fstp st(0)
jmp 0x4104f3
mov eax, dword [esi + 0x108]
test eax, eax
je 0x4104fb
mov al, byte [esp + 0x45]
cmp al, 1
jbe 0x41036c
mov di, 0xffff
jmp 0x410378
mov al, byte [esp + 0x47]
cmp al, 1
jbe 0x410378
mov di, 1
mov al, byte [esp + 0x46]
cmp al, 1
jbe 0x410389
mov word [esp + 0x12], 0xffff
jmp 0x410398
mov al, byte [esp + 0x48]
cmp al, 1
jbe 0x410398
mov word [esp + 0x12], 1
test di, di
jne 0x4103a9
cmp word [esp + 0x12], 0
je 0x4104fb
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ebp, eax
mov ecx, dword [esi + 0x378]
sub eax, ecx
mov ecx, dword [esi + 0x37c]
test ecx, ecx
jne 0x4103d7
mov dword [esi + 0x37c], 1
mov dword [esp + 0x14], 0x3f800000
jmp 0x4103f3
sub edx, edx
div dword [ebx + 0x8d0]
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 0
fild qword [esp + 0x14]
fstp dword [esp + 0x14]
fld dword [ebx + 0x8d4]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 1
je 0x41040e
mov eax, dword [ebx + 0x8d4]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x4104fb
test di, di
je 0x410435
cmp word [esp + 0x12], 0
je 0x410435
fld dword [esp + 0x14]
fmul dword [0x532a70]
fstp dword [esp + 0x14]
cmp di, 0xffff
jne 0x41045c
mov ecx, dword [esi + 0x108]
sub esp, 4
fld dword [ecx + 0xe0]
fsub dword [esp + 0x18]
fld dword [ecx + 0xdc]
fsub dword [esp + 0x18]
fxch st(1)
jmp 0x410481
cmp di, 1
jne 0x41048f
mov ecx, dword [esi + 0x108]
sub esp, 4
fld dword [ecx + 0xe0]
fadd dword [esp + 0x18]
fld dword [ecx + 0xdc]
fadd dword [esp + 0x18]
fxch st(1)
fstp dword [esp]
sub esp, 4
fstp dword [esp]
call fcn.004ed820
cmp word [esp + 0x12], 0xffff
jne 0x4104b8
mov ecx, dword [esi + 0x108]
sub esp, 4
fld dword [ecx + 0xe0]
fsub dword [esp + 0x18]
fld dword [ecx + 0xdc]
fadd dword [esp + 0x18]
fxch st(1)
jmp 0x4104df
cmp word [esp + 0x12], 1
jne 0x4104ed
mov ecx, dword [esi + 0x108]
sub esp, 4
fld dword [ecx + 0xe0]
fadd dword [esp + 0x18]
fld dword [ecx + 0xdc]
fsub dword [esp + 0x18]
fxch st(1)
fstp dword [esp]
sub esp, 4
fstp dword [esp]
call fcn.004ed820
mov dword [esi + 0x378], ebp
mov dword [esp + 0x1c], 1
test di, di
jne 0x410512
cmp word [esp + 0x12], 0
jne 0x410512
mov dword [esi + 0x37c], 0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x410534
push 1
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x20]
mov ecx, dword [esi + 0x364]
test ecx, ecx
je 0x410534
push 1
mov eax, dword [ecx]
call dword [eax + 0x20]
mov eax, dword [esp + 0x1c]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x110
ret
xor eax, eax
pop ebp
mov dword [esi + 0x37c], 0
pop edi
pop esi
pop ebx
add esp, 0x110
ret