Function at 0x10031810
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x10184080]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm0, xmmword [0x101881ac]
push ebx
push esi
push edi
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], ecx
mov byte [0x1018822f], 1
mov byte [ebp - 5], 0
movups xmmword [ebp - 0x24], xmm0
call fcn.1002c2b0
test al, al
je 0x10031859
mov ecx, dword [0x10188228]
push 0xc8
call dword [sym.imp.ScriptHook.dll_protected:_void___thiscall_ScriptThread::Wait_unsigned_int_]
mov ecx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
cmp dword [0x101881f0], ecx
jne 0x10031898
mov eax, dword [ebp - 0x20]
cmp dword [0x101881f4], eax
jne 0x10031898
cmp dword [0x101881f8], esi
jne 0x10031898
mov eax, dword [ebp - 0x18]
cmp dword [0x101881fc], eax
jne 0x10031898
xor eax, eax
mov edx, 0xff
cmp ecx, 0x7f
cmovle eax, edx
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
call fcn.10029e60
cmp byte [0x1018811c], 0
je 0x100318ce
call fcn.100261e0
mov edx, dword [0x10188128]
mov ecx, eax
call fcn.10026000
call fcn.100261e0
mov ecx, eax
call fcn.100260a0
call fcn.1002b250
push dword [ebp - 0x14]
xor cl, cl
call fcn.10029db0
add esp, 4
call fcn.100261e0
xor dl, dl
mov ecx, eax
call fcn.100263b0
mov cl, byte [0x1018823e]
test cl, cl
je 0x10031901
mov al, byte [0x1018822f]
test al, al
je 0x10031940
mov dl, byte [ebp - 0x20]
mov cl, byte [ebp - 0x10]
movss xmm3, dword [0x1017c0bc]
movss xmm2, dword [0x1017c0ec]
movss xmm1, dword [0x1017c104]
movss xmm0, dword [0x1017c10c]
push 0xff
push esi
call fcn.10033490
mov al, byte [0x1018822f]
add esp, 8
mov cl, byte [0x1018823e]
test cl, cl
je 0x10031948
test al, al
je 0x10031986
movss xmm3, dword [0x1017c0a8]
xor dl, dl
movss xmm2, dword [0x1017c0dc]
xor cl, cl
movss xmm1, dword [0x1017c104]
movss xmm0, dword [0x1017c10c]
push 0xff
push 0
call fcn.10033490
mov al, byte [0x1018822f]
add esp, 8
mov cl, byte [0x1018823e]
mov edx, dword [0x101881f4]
mov ebx, dword [0x101881f0]
mov esi, dword [0x101881f8]
mov edi, dword [0x101881fc]
mov dword [ebp - 0xc], edx
test cl, cl
je 0x100319ad
test al, al
je 0x10031a3b
xor ecx, ecx
call fcn.10033150
sub esp, 0xc
call fcn.10032fd0
call fcn.10033090
mov dl, byte [ebp - 0xc]
add esp, 0xc
mov cl, bl
push edi
push esi
call fcn.10032f00
movss xmm1, dword [0x1017c184]
add esp, 8
movss xmm0, dword [0x1017c0e0]
call fcn.10032dc0
xor cl, cl
call fcn.10032e60
mov cl, 1
call fcn.100331f0
mov edx, dword [ebp - 0x28]
movss xmm1, dword [0x1017c0a4]
movss xmm0, dword [0x1017c08c]
call fcn.10032d10
xor cl, cl
call fcn.100331f0
mov ecx, dword [0x101881f4]
mov al, byte [0x1018822f]
mov edi, dword [0x101881fc]
mov esi, dword [0x101881f8]
mov ebx, dword [0x101881f0]
mov dword [ebp - 0xc], ecx
mov cl, byte [0x1018823e]
test cl, cl
je 0x10031a43
test al, al
je 0x10031aab
xor ecx, ecx
call fcn.10033150
sub esp, 0xc
call fcn.10032fd0
call fcn.10033090
mov dl, byte [ebp - 0xc]
add esp, 0xc
mov cl, bl
push edi
push esi
call fcn.10032f00
movss xmm1, dword [0x1017c184]
add esp, 8
movss xmm0, dword [0x1017c0e0]
call fcn.10032dc0
xor cl, cl
call fcn.10032e60
mov cl, 1
call fcn.100331f0
mov edx, dword [ebp - 0x2c]
movss xmm1, dword [0x1017c0c4]
movss xmm0, dword [0x1017c08c]
call fcn.10032d10
xor cl, cl
call fcn.100331f0
mov edi, dword [0x10186aa0]
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
push edi
lea esi, [edi + edi]
call ebx
test ax, ax
jns 0x10031ad6
cmp byte [esi + 0x10187e88], 0
jne 0x10031ad6
mov word [esi + 0x10187e88], 1
jmp 0x10031afe
cmp byte [esi + 0x10187e88], 1
jne 0x10031af0
push edi
call ebx
test ax, ax
js 0x10031af0
mov word [esi + 0x10187e88], 0x100
mov edx, 0xa
call fcn.1002a670
test al, al
je 0x10031b0d
mov ecx, dword [0x10188198]
mov byte [ebp - 5], 1
call fcn.1002a710
mov edi, dword [0x10186aa4]
push edi
lea esi, [edi + edi]
call ebx
test ax, ax
jns 0x10031b32
cmp byte [esi + 0x10187e88], 0
jne 0x10031b32
mov word [esi + 0x10187e88], 1
jmp 0x10031b5e
cmp byte [esi + 0x10187e88], 1
jne 0x10031b4c
push edi
call ebx
test ax, ax
js 0x10031b4c
mov word [esi + 0x10187e88], 0x100
mov edx, 0xb
call fcn.1002a670
test al, al
je 0x10031ce8
mov ecx, dword [0x10188198]
mov byte [ebp - 5], 0
call fcn.1002a710
mov eax, dword [0x101881f4]
mov ebx, dword [0x101881f0]
mov esi, dword [0x101881f8]
mov edi, dword [0x101881fc]
mov dword [ebp - 0xc], eax
mov al, byte [0x1018823e]
test al, al
je 0x10031b9a
mov cl, byte [0x1018822f]
test cl, cl
je 0x10031c0d
xor ecx, ecx
call fcn.10033150
sub esp, 0xc
call fcn.10032fd0
call fcn.10033090
mov dl, byte [ebp - 0xc]
add esp, 0xc
mov cl, bl
push edi
push esi
call fcn.10032f00
movss xmm1, dword [0x1017c184]
add esp, 8
movss xmm0, dword [0x1017c0e0]
call fcn.10032dc0
xor cl, cl
call fcn.10032e60
mov cl, 1
call fcn.100331f0
mov edx, dword [ebp + 8]
movss xmm1, dword [0x1017c134]
movss xmm0, dword [0x1017c0b4]
call fcn.10032d10
xor cl, cl
call fcn.100331f0
mov cl, byte [0x1018822f]
mov al, byte [0x1018823e]
test al, al
je 0x10031c15
test cl, cl
je 0x10031c82
xor ecx, ecx
call fcn.10033150
sub esp, 0xc
call fcn.10032fd0
call fcn.10033090
mov dl, byte [ebp - 0x20]
add esp, 0xc
mov cl, byte [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.10032f00
movss xmm1, dword [0x1017c184]
add esp, 8
movss xmm0, dword [0x1017c0e0]
call fcn.10032dc0
xor cl, cl
call fcn.10032e60
mov cl, 1
call fcn.100331f0
mov edx, dword [ebp + 0xc]
movss xmm1, dword [0x1017c134]
movss xmm0, dword [0x1017c138]
call fcn.10032d10
xor cl, cl
call fcn.100331f0
mov edi, dword [0x10186aa8]
mov ebx, dword [sym.imp.USER32.dll_GetKeyState]
push edi
lea esi, [edi + edi]
call ebx
test ax, ax
jns 0x10031ca6
cmp byte [esi + 0x10187e88], 0
je 0x10031dc7
cmp byte [esi + 0x10187e88], 1
jne 0x10031cc0
push edi
call ebx
test ax, ax
js 0x10031cc0
mov word [esi + 0x10187e88], 0x100
mov edx, 0x10
call fcn.1002a670
test al, al
jne 0x10031dd0
mov ecx, dword [0x10188228]
push 0
call dword [sym.imp.ScriptHook.dll_protected:_void___thiscall_ScriptThread::Wait_unsigned_int_]
mov esi, dword [ebp - 0x1c]
jmp 0x100318a7
cmp byte [ebp - 5], 0
je 0x10031b6d
mov al, byte [0x1018823e]
test al, al
je 0x10031d05
mov cl, byte [0x1018822f]
test cl, cl
je 0x10031d7d
xor ecx, ecx
call fcn.10033150
sub esp, 0xc
call fcn.10032fd0
call fcn.10033090
mov dl, byte [ebp - 0x20]
add esp, 0xc
mov cl, byte [ebp - 0x10]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.10032f00
movss xmm1, dword [0x1017c184]
add esp, 8
movss xmm0, dword [0x1017c0e0]
call fcn.10032dc0
xor cl, cl
call fcn.10032e60
mov cl, 1
call fcn.100331f0
mov edx, dword [ebp + 8]
movss xmm1, dword [0x1017c134]
movss xmm0, dword [0x1017c0b4]
call fcn.10032d10
xor cl, cl
call fcn.100331f0
mov cl, byte [0x1018822f]
mov al, byte [0x1018823e]
mov edx, dword [0x101881f4]
mov ebx, dword [0x101881f0]
mov esi, dword [0x101881f8]
mov edi, dword [0x101881fc]
mov dword [ebp - 0xc], edx
test al, al
je 0x10031da4
test cl, cl
je 0x10031c82
xor ecx, ecx
call fcn.10033150
sub esp, 0xc
call fcn.10032fd0
call fcn.10033090
mov dl, byte [ebp - 0xc]
add esp, 0xc
mov cl, bl
push edi
push esi
jmp 0x10031c38
mov word [esi + 0x10187e88], 1
mov ecx, dword [0x10188198]
call fcn.1002a710
mov ecx, dword [0x10188228]
push 0
call dword [sym.imp.ScriptHook.dll_protected:_void___thiscall_ScriptThread::Wait_unsigned_int_]
push dword [ebp - 0x14]
mov cl, 1
call fcn.10029db0
add esp, 4
call fcn.100261e0
mov dl, 1
mov ecx, eax
call fcn.100263b0
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 5]
xor ecx, ebp
pop edi
pop esi
mov byte [0x1018822f], 0
pop ebx
call fcn.1004ca58
mov esp, ebp
pop ebp
ret