Function at 0x1000402d4
Capabilities:
Check for time delay via queryperformancecounter
Log keystrokes via polling

Disassembly:
mov rax, rsp
mov byte [rax + 0x10], dl
push rbx
push rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x210
mov rdi, rcx
mov ecx, dword [rcx + 0xd4]
xor r15d, r15d
movaps xmmword [rax - 0x48], xmm6
movaps xmmword [rax - 0x58], xmm7
cmp ecx, r15d
je 0x100040ee9
cmp byte [rdi + 0x4c], r15b
jne 0x100040ee9
mov eax, ecx
lea r14d, [r15 + 1]
lea ebp, [r15 + 2]
shr eax, 8
test r14b, al
je 0x1000404fe
sub ecx, 0x101
je 0x1000404ca
sub ecx, r14d
je 0x100040359
sub ecx, ebp
je 0x1000403e6
sub ecx, 4
je 0x100040359
sub ecx, 8
je 0x100040359
sub ecx, 0x10
je 0x100040359
cmp ecx, 0x20
jne 0x1000404fe
mov rcx, rdi
call fcn.100040170
mov rcx, qword [0x1000b60b8]
call fcn.10004ec64
lea rbx, [rdi + 0x60]
mov esi, 3
mov rcx, qword [rbx]
cmp rcx, r15
je 0x100040387
mov rax, qword [rcx]
mov edx, r14d
call qword [rax + 8]
mov qword [rbx], r15
add rbx, 8
sub rsi, r14
jne 0x100040376
mov rcx, qword [rdi + 0xc8]
cmp rcx, r15
je 0x1000403ac
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rdi + 0xc8], r15
mov rcx, qword [rdi + 0x50]
cmp rcx, r15
je 0x1000403bf
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [rdi + 0x50], r15
mov rcx, rdi
mov byte [rdi + 0x4c], r14b
call fcn.10003f744
cmp al, r15b
je 0x1000403dd
mov edx, 0x1000
mov rcx, rdi
call fcn.100041604
mov byte [rdi + 0x4c], r15b
jmp 0x1000404fe
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x18]
cmp eax, 0x88760868
je 0x100040473
cmp eax, 0x88760869
je 0x10004043e
cmp eax, r15d
je 0x100040413
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x100040ee9
mov rcx, rdi
call fcn.100040170
mov rcx, rdi
call fcn.10003ffec
cmp al, r15b
je 0x100040ee9
mov edx, 0x1000
mov rcx, rdi
call fcn.100041604
jmp 0x100040ee9
lea r9, [0x10001bbe0]
lea r8, [0x10001a610]
mov edx, 0x6a8
mov ecx, ebp
call fcn.100061ef8
mov rcx, rdi
call fcn.100040170
mov rcx, rdi
call fcn.100041240
cmp al, r15b
je 0x100040ee9
jmp 0x10004041b
mov ecx, 0x20
call sub.d3d9.dll_Direct3DCreate9
mov rbx, rax
cmp rax, r15
je 0x100040ee9
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x20]
cmp eax, r15d
jbe 0x1000404bc
lea r8, [rsp + 0xc0]
mov rdx, rbx
mov rcx, rdi
call fcn.10003e6fc
cmp al, r15b
je 0x1000404bc
mov edx, 0x140
mov rcx, rdi
call fcn.100041604
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
jmp 0x100040ee9
call fcn.10003c49c
mov rcx, rdi
call fcn.100040170
mov rcx, rdi
call fcn.100041240
cmp al, r15b
je 0x1000404fe
mov rcx, rdi
call fcn.10003ffec
cmp al, r15b
je 0x1000404fe
mov edx, 0x1000
mov rcx, rdi
call fcn.100041604
mov eax, dword [rdi + 0xd4]
shr eax, 0xc
test r14b, al
je 0x100040ee9
cmp byte [0x1000b60f4], r15b
je 0x10004054d
mov bl, byte [rdi + 0xd2]
mov ecx, 0x75
call qword [sym.imp.USER32.dll_GetKeyState]
mov ecx, 0x1f40
test cx, ax
setne al
cmp bl, al
je 0x10004054d
cmp bl, r15b
mov byte [rdi + 0x14], r14b
mov byte [rdi + 0x58], r14b
sete al
mov byte [rdi + 0xd2], al
cmp byte [rdi + 0x58], r15b
je 0x100040ee9
lea rcx, [rsp + 0x268]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x148]
cmp eax, r15d
mov esi, eax
jge 0x1000405a3
mov ecx, eax
call fcn.10004f1a0
lea r9, [0x10001bc18]
lea r8, [0x10001a610]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov ecx, ebp
mov edx, 0x73b
call fcn.100061ef8
mov rcx, qword [rdi + 0x78]
mov byte [rdi + 0xd3], r14b
mov rax, qword [rcx]
call qword [rax + 8]
mov rcx, qword [rdi + 0x50]
mov byte [rdi + 0xd3], r15b
mov rax, qword [rcx]
mov r8d, r14d
mov edx, 0x16
call qword [rax + 0x1c8]
mov dword [0x1000b5fb4], r15d
cmp byte [rdi + 0x28], r15b
je 0x1000405e6
cmp qword [rdi + 0x98], r15
je 0x1000405ef
cmp byte [rdi + 0xd2], r15b
je 0x10004065b
mov edx, r15d
cmp byte [rdi + 0xd2], r15b
jne 0x1000405fe
mov edx, dword [rdi + 8]
mov rcx, qword [rdi + 0x50]
movss xmm0, dword [0x10002b858]
mov dword [rsp + 0x30], r15d
mov rax, qword [rcx]
movss dword [rsp + 0x28], xmm0
mov dword [rsp + 0x20], edx
mov r9d, r14d
xor r8d, r8d
xor edx, edx
call qword [rax + 0x158]
cmp eax, r15d
mov esi, eax
jge 0x10004065b
mov ecx, eax
call fcn.10004f1a0
lea r9, [0x10001bc58]
lea r8, [0x10001a610]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov ecx, ebp
mov edx, 0x755
call fcn.100061ef8
mov rcx, qword [rdi + 0x98]
xorps xmm7, xmm7
mov byte [rdi + 0xd1], r15b
mov r12d, 6
cmp rcx, r15
je 0x100040b5b
mov rax, qword [rdi + 0x40]
movss xmm6, dword [0x10002b880]
mov r9d, 0x320
mov edx, 0x1f0
mov r8d, edx
movd xmm1, dword [rax + 8]
movd xmm0, dword [rax + 0xc]
cvtdq2ps xmm0, xmm0
cvtdq2ps xmm1, xmm1
divss xmm1, xmm0
movaps xmm0, xmm1
mulss xmm0, dword [0x10002ceb0]
addss xmm0, xmm6
cvttss2si eax, xmm0
cmp eax, r9d
jle 0x1000406d9
movss xmm0, dword [0x10002ceac]
mov eax, r9d
divss xmm0, xmm1
addss xmm0, xmm6
cvttss2si r8d, xmm0
mov dword [rcx + 0x1c4], eax
mov rax, qword [rdi + 0x98]
mov dword [rax + 0x1c8], r8d
mov ecx, dword [rdi + 0xa0]
cmp ecx, r15d
je 0x100040757
sub ecx, r14d
je 0x10004072c
cmp ecx, r14d
jne 0x100040797
mov rax, qword [rdi + 0x98]
mov rcx, qword [rax + 0x1a0]
mov dword [rcx + 4], r15d
mov rax, qword [rdi + 0x98]
mov rcx, qword [rax + 0x1a0]
mov dword [rcx + 8], r15d
jmp 0x100040797
mov rax, qword [rdi + 0x98]
mov rcx, qword [rax + 0x1a0]
mov dword [rcx + 4], r15d
mov rax, qword [rdi + 0x98]
sub edx, dword [rax + 0x1c8]
mov rax, qword [rax + 0x1a0]
mov dword [rax + 8], edx
jmp 0x100040797
mov rdx, qword [rdi + 0x98]
mov ecx, 0x190
mov eax, dword [rdx + 0x1c4]
shr eax, 1
sub ecx, eax
mov rax, qword [rdx + 0x1a0]
mov dword [rax + 4], ecx
mov rdx, qword [rdi + 0x98]
mov ecx, 0xf8
mov eax, dword [rdx + 0x1c8]
shr eax, 1
sub ecx, eax
mov rax, qword [rdx + 0x1a0]
mov dword [rax + 8], ecx
mov rcx, qword [rdi + 0x98]
call fcn.10004c0cc
mov al, byte [rdi + 0xd2]
movss xmm5, dword [0x10002cea8]
movss dword [rsp + 0x40], xmm7
movss dword [rsp + 0x4c], xmm6
neg al
movaps xmm0, xmm7
movaps xmm3, xmm7
sbb ecx, ecx
and ecx, 0x41000000
movss dword [rsp + 0x48], xmm5
movss dword [rsp + 0x64], xmm5
movss dword [rsp + 0x80], xmm5
dec ecx
mov dword [rsp + 0x50], ecx
mov dword [rsp + 0x6c], ecx
mov dword [rsp + 0x88], ecx
movss dword [rsp + 0x9c], xmm5
movss dword [rsp + 0x68], xmm6
movss dword [rsp + 0x84], xmm6
mov dword [rsp + 0xa4], ecx
mov rcx, qword [rdi + 0x40]
movss dword [rsp + 0xa0], xmm6
subss xmm0, xmm6
subss xmm3, xmm6
movd xmm5, dword [rcx + 0xc]
cvtdq2ps xmm5, xmm5
movss dword [rsp + 0x44], xmm5
movd xmm1, dword [rcx + 8]
cvtdq2ps xmm1, xmm1
movss dword [rsp + 0x5c], xmm1
addss xmm1, xmm0
movd xmm4, dword [rcx + 0xc]
movaps xmm0, xmm7
subss xmm0, xmm6
cvtdq2ps xmm4, xmm4
movss dword [rsp + 0x60], xmm4
addss xmm5, xmm0
movd xmm2, dword [rcx + 8]
movss dword [rsp + 0x7c], xmm7
movss dword [rsp + 0x94], xmm7
movss dword [rsp + 0x98], xmm7
cvtdq2ps xmm2, xmm2
movss dword [rsp + 0x78], xmm2
mov eax, dword [rcx + 0xc]
imul eax, dword [rcx + 8]
mov rcx, qword [rdi + 0x50]
movss dword [rsp + 0x5c], xmm1
movss dword [rsp + 0x40], xmm3
movss dword [rsp + 0x94], xmm3
movss dword [rsp + 0x44], xmm5
movaps xmm1, xmm7
add dword [0x1000b5fb4], eax
mov rax, qword [rdi + 0x98]
movss dword [rsp + 0x7c], xmm3
movss dword [rsp + 0x98], xmm3
subss xmm1, xmm6
addss xmm2, xmm1
movaps xmm1, xmm7
movss dword [rsp + 0x78], xmm2
subss xmm1, xmm6
addss xmm4, xmm1
movss dword [rsp + 0x60], xmm4
movss xmm0, dword [rax + 0x1b0]
movss dword [rsp + 0x54], xmm0
movss xmm1, dword [rax + 0x1bc]
movss dword [rsp + 0x58], xmm1
movss xmm0, dword [rax + 0x1b8]
movss dword [rsp + 0x70], xmm0
movss xmm1, dword [rax + 0x1bc]
movss dword [rsp + 0x74], xmm1
movss xmm0, dword [rax + 0x1b8]
movss dword [rsp + 0x8c], xmm0
movss xmm1, dword [rax + 0x1b4]
movss dword [rsp + 0x90], xmm1
movss xmm0, dword [rax + 0x1b0]
movss dword [rsp + 0xa8], xmm0
movss xmm1, dword [rax + 0x1b4]
movss dword [rsp + 0xac], xmm1
mov rax, qword [rcx]
mov edx, 0x144
call qword [rax + 0x2c8]
mov rcx, qword [rdi + 0x50]
cmp byte [rdi + 0xd2], r15b
mov rax, qword [rcx]
mov r8d, r15d
mov edx, 0x1b
setne r8b
call qword [rax + 0x1c8]
mov rcx, qword [rdi + 0x50]
mov ebx, 5
mov rax, qword [rcx]
lea edx, [rbx + 0xe]
mov r8d, ebx
call qword [rax + 0x1c8]
mov rcx, qword [rdi + 0x50]
lea edx, [rbx + 0xf]
mov rax, qword [rcx]
mov r8d, r12d
call qword [rax + 0x1c8]
mov rcx, qword [rdi + 0x50]
mov r9d, ebp
mov rax, qword [rcx]
mov r8d, ebx
xor edx, edx
call qword [rax + 0x228]
mov rcx, qword [rdi + 0x50]
mov r9d, ebp
mov rax, qword [rcx]
mov r8d, r12d
xor edx, edx
call qword [rax + 0x228]
mov rcx, qword [rdi + 0x50]
lea r8d, [rbx + 2]
mov rax, qword [rcx]
mov r9d, ebp
xor edx, edx
call qword [rax + 0x228]
mov rcx, qword [rdi + 0x50]
lea r9d, [rbx - 2]
mov rax, qword [rcx]
mov r8d, r14d
xor edx, edx
call qword [rax + 0x228]
mov rcx, qword [rdi + 0x50]
lea r9d, [rbx - 2]
mov rax, qword [rcx]
mov r8d, ebp
xor edx, edx
call qword [rax + 0x228]
mov al, byte [rdi + 0xd2]
mov rcx, qword [rdi + 0x50]
mov r10, qword [rcx]
neg al
mov r8d, r14d
sbb r9d, r9d
xor edx, edx
neg r9d
add r9d, ebp
call qword [r10 + 0x218]
mov rcx, qword [rdi + 0x50]
mov r9d, ebp
mov rax, qword [rcx]
mov r8d, ebp
xor edx, edx
call qword [rax + 0x218]
mov rcx, qword [rdi + 0x50]
lea r8d, [rbx - 2]
mov rax, qword [rcx]
xor r9d, r9d
xor edx, edx
call qword [rax + 0x218]
mov al, byte [rdi + 0xd2]
mov rcx, qword [rdi + 0x50]
mov r10, qword [rcx]
neg al
lea r8d, [rbx - 1]
sbb r9d, r9d
and r9d, ebp
add r9d, r14d
xor edx, edx
call qword [r10 + 0x218]
mov rcx, qword [rdi + 0x50]
mov r9d, ebp
mov rax, qword [rcx]
mov r8d, ebx
xor edx, edx
call qword [rax + 0x218]
mov rcx, qword [rdi + 0x50]
xor r9d, r9d
mov rax, qword [rcx]
mov r8d, r12d
xor edx, edx
call qword [rax + 0x218]
mov rcx, qword [rdi + 0x50]
mov r9d, r14d
mov rax, qword [rcx]
mov r8d, r14d
mov edx, r14d
call qword [rax + 0x218]
mov rcx, qword [rdi + 0x50]
lea r8d, [rbx - 1]
mov rax, qword [rcx]
mov r9d, r14d
mov edx, r14d
call qword [rax + 0x218]
mov r11, qword [rdi + 0x98]
mov rcx, qword [0x1000b60b8]
mov rax, qword [r11 + 0x1a0]
xor r8d, r8d
mov edx, dword [rax]
call fcn.10004e864
cmp byte [rdi + 0xd1], r15b
jne 0x100040b5b
cmp rax, r15
je 0x100040b29
mov r8, qword [rax + 0x30]
jmp 0x100040b2c
mov r8, r15
mov rcx, qword [rdi + 0x50]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x208]
mov rcx, qword [rdi + 0x50]
lea r9, [rsp + 0x40]
mov rax, qword [rcx]
mov r8d, ebp
mov edx, r12d
mov dword [rsp + 0x20], 0x1c
call qword [rax + 0x298]
lea rbp, [0x1000b3840]
mov ebx, r15d
mov r12, rbp
cmp dword [r12], r15d
jbe 0x100040b7a
mov rcx, qword [rdi + 0x78]
mov edx, ebx
mov rax, qword [rcx]
call qword [rax + 0x58]
add ebx, r14d
add r12, 4
cmp ebx, 6
jb 0x100040b68
mov ebx, r15d
cmp dword [rbp], r15d
jbe 0x100040bc7
mov r14d, r15d
cmp dword [rdi + 0x80], r15d
jbe 0x100040bc1
mov r12, r15
mov rax, qword [rdi + 0x90]
mov edx, ebx
mov rcx, qword [r12 + rax]
mov rax, qword [rcx]
call qword [rax + 0x58]
inc r14d
add r12, 8
cmp r14d, dword [rdi + 0x80]
jb 0x100040b9e
mov r14d, 1
add ebx, r14d
add rbp, 4
cmp ebx, 6
jb 0x100040b89
cmp byte [rdi + 0xd1], r15b
jne 0x100040c17
mov rax, qword [rdi + 0x38]
mov rcx, qword [rax]
mov rax, qword [rcx]
call qword [rax + 0x20]
cmp byte [rdi + 0xd1], r15b
jne 0x100040c17
mov rax, qword [rdi + 0x38]
mov rcx, qword [rax + 8]
mov rax, qword [rcx]
call qword [rax + 0x20]
cmp byte [rdi + 0xd1], r15b
jne 0x100040c17
mov rax, qword [rdi + 0x38]
mov rcx, qword [rax + 0x10]
mov rax, qword [rcx]
call qword [rax + 0x20]
cmp byte [0x1000b5ff0], r15b
je 0x100040c47
mov eax, dword [0x1000b5fb4]
lea r9, [0x10001bc88]
lea r8, [0x10001a610]
mov edx, 0x828
mov ecx, 2
mov dword [rsp + 0x20], eax
call fcn.100061ef8
mov rcx, qword [rdi + 0x50]
mov qword [rsp + 0x250], r15
lea r8, [rsp + 0x250]
mov rax, qword [rcx]
xor edx, edx
call qword [rax + 0x130]
mov rcx, qword [rdi + 0x50]
xor edx, edx
mov rax, qword [rcx]
cmp byte [rdi + 0xd0], r15b
je 0x100040cce
mov r8, qword [rdi + 0xb8]
call qword [rax + 0x128]
mov rcx, qword [rdi + 0x50]
mov dword [rsp + 0x30], r15d
movss dword [rsp + 0x28], xmm7
mov rax, qword [rcx]
mov r9d, r14d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r15d
call qword [rax + 0x158]
mov rcx, qword [rdi + 0x50]
mov r8, qword [rdi + 0xc8]
mov rax, qword [rcx]
mov rdx, qword [rdi + 0xc0]
call qword [rax + 0x100]
mov byte [rdi + 0xd0], r15b
jmp 0x100040d22
mov r8, qword [rdi + 0xc0]
call qword [rax + 0x128]
mov rcx, qword [rdi + 0x50]
mov dword [rsp + 0x30], r15d
movss dword [rsp + 0x28], xmm7
mov rax, qword [rcx]
mov r9d, r14d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r15d
call qword [rax + 0x158]
mov rcx, qword [rdi + 0x50]
mov r8, qword [rdi + 0xc8]
mov rax, qword [rcx]
mov rdx, qword [rdi + 0xb8]
call qword [rax + 0x100]
mov byte [rdi + 0xd0], r14b
mov rcx, qword [rdi + 0x50]
mov r8, qword [rsp + 0x250]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x128]
mov rcx, qword [rsp + 0x250]
mov rax, qword [rcx]
call qword [rax + 0x10]
mov rcx, qword [rdi + 0x50]
mov rax, qword [rcx]
call qword [rax + 0x150]
mov r12, qword [0x1000b60b8]
mov r11, qword [0x1000b5fe8]
mov r15d, dword [r11 + 0xb0]
xor r14d, r14d
cmp dword [r12 + 0x38], r14d
jbe 0x100040dff
xor ebp, ebp
mov rbx, qword [r12 + 0x48]
mov rcx, qword [rbx + rbp]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov rcx, qword [rbx + rbp]
mov edx, r15d
sub edx, dword [rcx + 0x10]
cmp edx, eax
jbe 0x100040ded
mov rax, qword [r12 + 0x48]
mov rcx, qword [rax + rbp]
mov rax, qword [rcx]
call qword [rax + 8]
test al, al
je 0x100040ded
mov rax, qword [r12 + 0x48]
mov rax, qword [rax + rbp]
cmp byte [rax + 0x14], 0
jne 0x100040ded
mov rax, qword [rax + 0x20]
lea r9, [0x10001e828]
lea r8, [0x10001e478]
mov edx, 0x1a3
mov ecx, 4
mov qword [rsp + 0x20], rax
call fcn.100061ef8
mov r11, qword [r12 + 0x48]
mov rcx, qword [r11 + rbp]
mov rax, qword [rcx]
call qword [rax + 0x28]
inc r14d
add rbp, 8
cmp r14d, dword [r12 + 0x38]
jb 0x100040d79
mov bl, byte [rsp + 0x258]
mov byte [rdi + 0x58], 0
test bl, bl
je 0x100040e3f
mov rcx, qword [rdi + 0x50]
and qword [rsp + 0x20], 0
xor r9d, r9d
mov rax, qword [rcx]
xor r8d, r8d
xor edx, edx
call qword [rax + 0x88]
mov esi, eax
cmp eax, 0x88760868
jne 0x100040e3f
mov edx, 0x104
mov rcx, rdi
call fcn.100041604
cmp byte [rdi + 0xd2], 0
je 0x100040eac
lea rcx, [rsp + 0x260]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov r11, qword [rsp + 0x260]
mov r9d, dword [0x1000b5fb4]
pxor xmm2, xmm2
pxor xmm0, xmm0
sub r11, qword [rsp + 0x268]
lea rdx, [0x10001bcb0]
mov ecx, 2
cvtsi2sd xmm0, qword [rsp + 0xb0]
cvtsi2sd xmm2, r11
divsd xmm2, xmm0
movq r8, xmm2
call fcn.1000622b0
test bl, bl
je 0x100040ee3
test esi, esi
jns 0x100040ee3
mov ecx, esi
call fcn.10004f1a0
lea r9, [0x10001bce8]
lea r8, [0x10001a610]
mov qword [rsp + 0x28], rax
mov edx, 0x86c
mov ecx, 2
mov dword [rsp + 0x20], esi
call fcn.100061ef8
jmp 0x100040ee9
inc dword [rdi + 0xb0]
lea r11, [rsp + 0x210]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret