Function at 0x10003880
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007b775
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x10096018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], edx
mov esi, ecx
mov eax, dword fs:[0x2c]
mov ecx, dword [0x10096b1c]
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x1009a2dc]
mov dword [ebp - 0x10], ecx
cmp eax, dword [ecx + 4]
jle 0x1000390f
push 0x1009a2dc
call fcn.1007a1d6
add esp, 4
cmp dword [0x1009a2dc], 0xffffffff
jne 0x1000390f
mov dword [ebp - 4], 0
call edi
sub eax, dword [0xcc18c84]
mov dword [0x1009a2e0], eax
mov dword [ebp - 4], 0xffffffff
push 0x1009a2dc
call fcn.1007a18c
add esp, 4
cmp byte [0x1009a35b], 0
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [0x10099c88], eax
mov eax, dword [esi + 4]
mov dword [0x10099c8c], eax
je 0x100039c2
cmp byte [0x1009a358], 0
jne 0x100039c2
cmp byte [0x1009a359], 0
jne 0x100039c2
mov eax, dword [0x1009602c]
mov ecx, dword [0x1009a360]
add ecx, 0xc8
cmp ecx, dword [eax + 0x24]
jae 0x100039c2
cmp byte [esi + 0x1a], 0
jne 0x10003965
cmp byte [esi + 0x1b], 0
je 0x100039c2
cmp byte [0xcc1b704], 0
je 0x100039c2
cmp byte [0x1009a35e], 0
jne 0x100039cb
push dword [ebp - 0x10]
mov eax, dword [0x1009a2f4]
mov ecx, 0x1009a2f4
push dword [0x1009a2ec]
mov dword [0x1009a2f8], eax
push dword [0x1009a2e8]
push eax
call fcn.1005a9d0
mov ecx, 0x1009a2e8
mov word [0x1009a359], 0
call fcn.10059bc0
mov byte [0x1009a358], 1
call edi
sub eax, dword [0xcc18c84]
mov dword [0x1009a2e0], eax
mov al, byte [0x1009a35e]
test al, al
je 0x10003a3d
mov ecx, 0x1009a2e8
call fcn.10059de0
cmp eax, 0xc8
jle 0x10003a38
mov ecx, dword [0x1009a2ec]
mov eax, 0x6bca1af3
mov edi, dword [0x1009a2e8]
sub ecx, edi
imul ecx
mov ecx, dword [0x1009a344]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ecx
jbe 0x10003a38
imul edx, ecx, 0x4c
add edx, edi
je 0x10003a38
mov ecx, dword [0x10096028]
mov eax, dword [edx]
mov dword [ecx + 0x1c], eax
mov eax, dword [edx + 4]
mov dword [ecx + 0x20], eax
mov eax, dword [edx + 8]
mov dword [ecx + 0x24], eax
mov dword [ecx + 0x28], 0
mov dword [ecx + 0x2c], 0
mov dword [ecx + 0x30], 0
mov al, byte [0x1009a35e]
cmp byte [0x1009a358], 0
jne 0x10003a57
test al, al
je 0x10003a57
cmp byte [0x1009a356], 0
je 0x10003e77
cmp dword [ebp - 0x14], 0
je 0x10003e77
cmp byte [0x1009a358], 0
jne 0x10003a72
test al, al
je 0x10003e77
mov edi, dword [ebp - 0x10]
mov eax, dword [0x1009a364]
cmp eax, dword [edi + 4]
jle 0x10003abb
push 0x1009a364
call fcn.1007a1d6
add esp, 4
cmp dword [0x1009a364], 0xffffffff
jne 0x10003abb
mov dword [ebp - 4], 1
mov eax, dword [esi + 4]
mov dword [0x1009a368], eax
mov dword [ebp - 4], 0xffffffff
push 0x1009a364
call fcn.1007a18c
add esp, 4
mov eax, dword [0x1009a368]
mov ecx, dword [esi + 4]
movd xmm0, eax
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
cvtdq2ps xmm0, xmm0
subss xmm1, xmm0
andps xmm1, xmmword [0x1008ea20]
comiss xmm1, dword [0x1008e46c]
cmova eax, ecx
cmp dword [0x1009a33c], 0
mov dword [0x1009a368], eax
jne 0x10003b0b
mov byte [0x1009a36c], 0
mov byte [0x1009a36d], 0
mov byte [0x1009a36e], 0
jmp 0x10003b2d
cmp byte [0x1009a36c], 0
jne 0x10003b24
mov ecx, dword [esi]
mov eax, dword [0x10099c80]
cmp eax, dword [ecx]
sete byte [0x1009a36c]
mov al, byte [0x1009a36d]
test al, al
jne 0x10003b7a
cmp byte [0x10099c85], 0
je 0x10003b71
push str.rpg_mp
mov eax, 0x416610
call eax
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0xe8], eax
je 0x10003b68
push str.rpg_sustain_mp
mov eax, 0x416610
call eax
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0xe8], eax
jne 0x10003b71
mov al, 1
mov byte [0x1009a36d], al
jmp 0x10003b94
xor al, al
mov byte [0x1009a36d], al
jmp 0x10003b94
movzx ecx, al
xor edx, edx
mov eax, dword [0x1009602c]
cmp dword [eax + 0x110], 5
cmovne ecx, edx
mov byte [0x1009a36d], cl
mov eax, dword [esi]
mov ecx, dword [esi + 4]
sub ecx, dword [eax + 0x80]
movzx eax, byte [0x1009a35c]
cmp ecx, 0xa
mov ecx, 1
setl byte [0x1009a36e]
cmp byte [0xcc1b704], 0
cmove eax, ecx
mov byte [0x1009a35c], al
mov eax, dword [0x1009a370]
cmp eax, dword [edi + 4]
jle 0x10003c34
push 0x1009a370
call fcn.1007a1d6
add esp, 4
cmp dword [0x1009a370], 0xffffffff
jne 0x10003c34
mov dword [ebp - 4], 2
mov eax, dword [esi]
movss xmm0, dword [eax + 0x108]
movss dword [0x10096b5c], xmm0
movss xmm0, dword [eax + 0x10c]
movss dword [0x10096b60], xmm0
movss xmm0, dword [eax + 0x110]
movss dword [0x10096b64], xmm0
mov dword [ebp - 4], 0xffffffff
push 0x1009a370
call fcn.1007a18c
add esp, 4
mov eax, dword [0x1009a374]
cmp eax, dword [edi + 4]
jle 0x10003c9f
push 0x1009a374
call fcn.1007a1d6
add esp, 4
cmp dword [0x1009a374], 0xffffffff
jne 0x10003c9f
mov dword [ebp - 4], 3
mov eax, dword [esi]
movss xmm0, dword [eax + 0x1c]
movss dword [0x10096b50], xmm0
mov eax, dword [esi]
movss xmm0, dword [eax + 0x20]
movss dword [0x10096b54], xmm0
mov eax, dword [esi]
movss xmm0, dword [eax + 0x24]
movss dword [0x10096b58], xmm0
mov dword [ebp - 4], 0xffffffff
push 0x1009a374
call fcn.1007a18c
add esp, 4
mov edi, dword [esi]
movss xmm1, dword [0x10096b5c]
movss xmm0, dword [0x10096b60]
subss xmm0, dword [edi + 0x10c]
subss xmm1, dword [edi + 0x108]
mulss xmm0, xmm0
mulss xmm1, xmm1
addss xmm0, xmm1
call fcn.10005350
movss xmm1, dword [edi + 0x1c]
movaps xmm2, xmm0
ucomiss xmm1, dword [0x10096b50]
movss dword [ebp - 0x10], xmm2
lahf
test ah, 0x44
jp 0x10003d73
movss xmm0, dword [edi + 0x20]
ucomiss xmm0, dword [0x10096b54]
lahf
test ah, 0x44
jp 0x10003d73
movss xmm0, dword [edi + 0x24]
ucomiss xmm0, dword [0x10096b58]
lahf
test ah, 0x44
jp 0x10003d73
movss xmm0, dword [0x1008e414]
comiss xmm0, xmm2
jbe 0x10003d73
push 0x21
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
je 0x10003d4c
movss xmm0, dword [ebp - 0x10]
sub esp, 8
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
push str.angDist:__.6f_n
push 5
call fcn.10007ca0
add esp, 0x10
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
call edi
mov ecx, dword [0x1009a2e0]
sub eax, dword [0xcc18c84]
add ecx, 0x7d0
cmp ecx, eax
jae 0x10003d9d
mov byte [0x1009a35c], 1
jmp 0x10003d90
movzx eax, byte [0x1009a35c]
xor ecx, ecx
cmp byte [0xcc1b704], cl
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
cmovne eax, ecx
mov byte [0x1009a35c], al
call edi
sub eax, dword [0xcc18c84]
mov dword [0x1009a2e0], eax
mov eax, dword [esi]
mov ecx, 1
movss xmm2, dword [0x1008e4f4]
movss xmm0, dword [eax + 0x1c]
movss dword [0x10096b50], xmm0
mov eax, dword [esi]
movss xmm0, dword [eax + 0x20]
movss dword [0x10096b54], xmm0
mov eax, dword [esi]
movss xmm0, dword [eax + 0x24]
movss dword [0x10096b58], xmm0
mov eax, dword [esi]
mov edx, dword [esi + 4]
movss xmm0, dword [eax + 0x108]
movss dword [0x10096b5c], xmm0
movss xmm0, dword [eax + 0x10c]
movss dword [0x10096b60], xmm0
movss xmm0, dword [eax + 0x110]
mov eax, dword [0x956e94]
test eax, eax
movss dword [0x10096b64], xmm0
cmove eax, ecx
movd xmm1, edx
cvtdq2ps xmm1, xmm1
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm2, xmm0
movd xmm0, dword [0x1009a368]
divss xmm2, dword [0x1008e47c]
cvtdq2ps xmm0, xmm0
addss xmm2, xmm2
addss xmm2, xmm0
comiss xmm1, xmm2
jbe 0x10003e77
cmp byte [0x1009a35c], 0
jne 0x10003e77
sub esp, 0xc
mov dword [0x1009a368], edx
cmp byte [0x1009a35e], 0
mov edx, esi
mov ecx, 0x1009a2e8
je 0x10003e6f
mov ecx, 0x1009a300
call fcn.10003ea0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret