Function at 0x180004410
Capabilities:
Log keystrokes via polling

Disassembly:
push rsi
sub rsp, 0x40
cmp byte [0x180045da1], 0
mov rsi, rcx
jne 0x1800044ec
xor edx, edx
lea rcx, str.LWJGL
call qword [sym.imp.USER32.dll_FindWindowA]
mov qword [0x180045da8], rax
test rax, rax
jne 0x18000446d
xor edx, edx
lea rcx, str.GLFW30
call qword [sym.imp.USER32.dll_FindWindowA]
mov qword [0x180045da8], rax
test rax, rax
jne 0x18000446d
lea rcx, str.____Failed_to_get_window_handle_n
call fcn.180004010
jmp 0x18000468a
lea r8, [0x180004070]
mov edx, 0xfffffffc
mov rcx, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
mov qword [0x180045db0], rax
call fcn.180030790
lea rcx, str.opengl32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.wglSwapBuffers
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x180045d78], rax
test rax, rax
jne 0x1800044c8
lea rcx, str.____Failed_to_get_wglSwapBuffers_address_n
call fcn.180004010
jmp 0x18000468a
lea r8, [0x180045d80]
mov rcx, rax
lea rdx, [0x180004110]
call fcn.1800308c0
xor ecx, ecx
call fcn.180030da0
mov byte [0x180045da1], 1
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
jne 0x18000468a
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x60], rbp
movabs rbp, 0x4e94914f0000
mov qword [rsp + 0x68], rdi
mov qword [rsp + 0x38], r12
movabs r12, 0x7fffffffffffffff
mov qword [rsp + 0x30], r13
movabs r13, 0x7ffffffffe8287bf
mov qword [rsp + 0x28], r14
movabs r14, 0x431bde82d7b634db
mov qword [rsp + 0x20], r15
movabs r15, 0xb2f4fc0794908cf3
lea rcx, [rsp + 0x58]
call fcn.180004330
mov rax, qword [rsp + 0x58]
lea rdi, [rax + 0x17d7840]
cmp rax, r13
jl 0x180004573
mov rdi, r12
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
mov rcx, rax
cmp rbx, 0x989680
jne 0x180004594
imul rax, rcx, 0x64
jmp 0x180004605
cmp rbx, 0x16e3600
jne 0x1800045e7
mov rax, r15
imul rcx
lea r8, [rcx + rdx]
sar r8, 0x18
mov rax, r8
shr rax, 0x3f
add r8, rax
imul rax, r8, 0x16e3600
sub rcx, rax
mov rax, r15
imul rcx, rcx, 0x3b9aca00
imul rcx
lea rax, [rcx + rdx]
sar rax, 0x18
mov rcx, rax
shr rcx, 0x3f
add rax, rcx
imul rcx, r8, 0x3b9aca00
jmp 0x180004602
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
cqo
idiv rbx
imul rcx, rcx, 0x3b9aca00
add rax, rcx
cmp rax, rdi
jge 0x180004653
mov rcx, rdi
sub rcx, rax
cmp rcx, rbp
jl 0x180004624
mov ecx, 0x5265c00
call sub.KERNEL32.dll_Sleep
jmp 0x180004573
mov rax, r14
imul rcx
sar rdx, 0x12
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul rax, rdx, 0xf4240
cmp rax, rcx
jge 0x180004647
inc rdx
mov ecx, edx
call sub.KERNEL32.dll_Sleep
jmp 0x180004573
mov ecx, 0x23
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test ax, ax
je 0x180004555
mov r15, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
mov r13, qword [rsp + 0x30]
mov r12, qword [rsp + 0x38]
mov rdi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x50]
cmp byte [0x180045da1], 0
je 0x1800046c1
mov r8, qword [0x180045db0]
mov edx, 0xfffffffc
mov rcx, qword [0x180045da8]
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
xor ecx, ecx
call fcn.180030de0
xor ecx, ecx
call fcn.180030ca0
mov byte [0x180045da1], 0
mov rcx, rsi
add rsp, 0x40
pop rsi
jmp qword [sym.imp.KERNEL32.dll_FreeLibrary]