Function at 0x140001290
Capabilities:
Log keystrokes via polling

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xc0
movaps xmmword [rax - 0x38], xmm6
movaps xmmword [rax - 0x48], xmm7
mov rax, qword [0x140046010]
xor rax, rsp
mov qword [rbp + 7], rax
mov r14, rcx
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rbx, 0x989680
jne 0x1400012ea
imul rbx, rax, 0x64
jmp 0x140001306
cqo
idiv rbx
imul rcx, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
cqo
idiv rbx
lea rbx, [rax + rcx]
mov byte [rbp - 0x21], 1
xor r15b, r15b
xor r13d, r13d
lea r12d, [r13 + 1]
movss xmm6, dword [0x14003ffe0]
movss xmm7, dword [0x14003fec0]
mov esi, 0xffffffff
cmp byte [r14 + 0x18], 0
je 0x1400017a1
mov rax, qword [r14 + 0x28]
mov rdx, qword [rax + 8]
sub rdx, qword [rax]
sar rdx, 3
mov eax, dword [r14 + 0x3c]
imul eax, dword [r14 + 0x38]
cmp edx, eax
jge 0x140001355
cmp edx, 1
jge 0x1400013a0
mov rcx, qword [r14 + 0x30]
xor r9d, r9d
lea r8, str.Game_Over
mov rcx, qword [rcx + 0x18]
cmp edx, eax
lea rdx, str.Congratulations__you_win_
jge 0x140001379
lea rdx, str.Snake_died__you_lose_
call qword [sym.imp.USER32.dll_MessageBoxW]
mov r15b, 1
mov dword [rbp - 0x41], 0xa
mov dword [rbp - 0x3d], 0xa
mov rax, qword [rbp - 0x41]
mov qword [r14 + 0x38], rax
mov rcx, r14
call fcn.140002fd0
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rdi, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rdi, 0x989680
jne 0x1400013be
imul rax, rax, 0x64
jmp 0x1400013d9
cqo
idiv rdi
imul rcx, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
cqo
idiv rdi
add rax, rcx
sub rax, rbx
xorps xmm0, xmm0
cvtsi2ss xmm0, rax
divss xmm0, xmm6
comiss xmm0, xmm7
jbe 0x1400017a1
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rbx, 0x989680
jne 0x14000140f
imul rbx, rax, 0x64
jmp 0x14000142b
cqo
idiv rbx
imul rcx, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
cqo
idiv rbx
lea rbx, [rax + rcx]
inc dword [r14 + 0x20]
mov eax, dword [r14 + 0x20]
cmp eax, 0x19
jge 0x140001444
test eax, eax
js 0x140001444
jne 0x1400017a1
jmp 0x140001448
mov dword [r14 + 0x20], r13d
mov rdi, qword [r14 + 0x28]
mov qword [rbp - 0x49], r13
mov ecx, 0x77
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x140001500
mov ecx, 0x57
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x140001500
mov ecx, 0x61
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x1400014f1
mov ecx, 0x41
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x1400014f1
mov ecx, 0x73
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x1400014e5
mov ecx, 0x53
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x1400014e5
mov ecx, 0x64
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x1400014d6
mov ecx, 0x44
call qword [sym.imp.USER32.dll_GetAsyncKeyState]
test al, 1
jne 0x1400014d6
mov rax, qword [rdi + 0x20]
jmp 0x140001511
mov eax, r12d
cmp dword [rdi + 0x20], 0
cmovl eax, esi
mov dword [rbp - 0x49], eax
jmp 0x14000150d
mov eax, r12d
cmp dword [rdi + 0x24], 0
cmovl eax, esi
jmp 0x14000150a
mov eax, esi
cmp dword [rdi + 0x20], 0
cmovg eax, r12d
mov dword [rbp - 0x49], eax
jmp 0x14000150d
mov eax, esi
cmp dword [rdi + 0x24], 0
cmovg eax, r12d
mov dword [rbp - 0x45], eax
mov rax, qword [rbp - 0x49]
mov qword [rdi + 0x20], rax
mov r8, qword [r14 + 0x28]
mov rdx, qword [r8]
mov rax, qword [r8 + 8]
sub rax, rdx
sar rax, 3
cmp rax, 1
jb 0x1400015c8
lea rcx, [rax - 1]
cmp rax, rcx
jbe 0x140001958
lea rdx, [rdx + rcx*8]
mov rax, qword [rdx]
mov qword [r8 + 0x18], rax
nop dword [rax]
mov rcx, qword [r8]
mov rax, qword [r8 + 8]
sub rax, rcx
sar rax, 3
test rax, rax
je 0x140001958
cmp rdx, rcx
jbe 0x140001579
mov rax, qword [rdx - 8]
mov qword [rdx], rax
add rdx, 0xfffffffffffffff8
jmp 0x140001550
mov r9d, dword [r8 + 0x20]
add r9d, dword [rdx]
mov dword [rdx], r9d
mov r8d, dword [r8 + 0x24]
add r8d, dword [rdx + 4]
mov dword [rdx + 4], r8d
test r9d, r9d
jns 0x14000159e
mov r9d, dword [r14 + 0x38]
dec r9d
mov dword [rdx], r9d
mov eax, dword [rdx]
cmp r9d, dword [r14 + 0x38]
cmovge eax, r13d
mov dword [rdx], eax
test r8d, r8d
jns 0x1400015ba
mov r8d, dword [r14 + 0x3c]
dec r8d
mov dword [rdx + 4], r8d
mov eax, dword [rdx + 4]
cmp r8d, dword [r14 + 0x3c]
cmovge eax, r13d
mov dword [rdx + 4], eax
mov rax, qword [r14 + 0x28]
mov r8, qword [rax]
mov rdx, qword [rax + 8]
sub rdx, r8
sar rdx, 3
cmp rdx, 1
jb 0x140001623
cmp rdx, 2
jb 0x14000161d
mov r9d, r12d
cmp rdx, r9
jbe 0x14000161d
mov rcx, r12
cmp rdx, rcx
jbe 0x14000195e
mov eax, dword [r8 + rcx*8]
cmp dword [r8], eax
jne 0x140001612
mov eax, dword [r8 + rcx*8 + 4]
cmp dword [r8 + 4], eax
je 0x1400016ea
inc r9d
mov ecx, r9d
cmp rcx, rdx
jb 0x1400015f1
xor al, al
test al, al
je 0x140001663
mov rcx, qword [r14 + 0x30]
xor r9d, r9d
lea r8, str.Game_Over
lea rdx, str.Snake_died__you_lose_
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.USER32.dll_MessageBoxW]
mov r15b, 1
mov dword [rbp - 0x39], 0xa
mov dword [rbp - 0x35], 0xa
mov rax, qword [rbp - 0x39]
mov qword [r14 + 0x38], rax
mov rcx, r14
call fcn.140002fd0
mov rsi, qword [r14 + 0x28]
mov r10, qword [r14]
mov r11, qword [r14 + 8]
sub r11, r10
sar r11, 3
cmp r11, 1
jb 0x1400016c1
mov edi, r13d
mov rdx, r13
cmp r11, rdx
jbe 0x140001952
mov rcx, qword [rsi]
mov r8, qword [rsi + 8]
cmp rcx, r8
je 0x1400016b8
mov r9d, dword [r10 + rdx*8]
nop word [rax + rax]
cmp dword [rcx], r9d
jne 0x1400016af
mov eax, dword [r10 + rdx*8 + 4]
cmp dword [rcx + 4], eax
je 0x1400016c6
add rcx, 8
cmp rcx, r8
jne 0x1400016a0
inc edi
mov edx, edi
cmp r11, rdx
ja 0x14000168a
mov edi, 0xffffffff
cmp edi, 0xffffffff
je 0x1400017a1
lea r8, [rsi + 0x18]
mov rdx, qword [rsi + 8]
cmp rdx, qword [rsi + 0x10]
je 0x1400016f1
mov rax, qword [r8]
mov qword [rdx], rax
add qword [rsi + 8], 8
jmp 0x1400016fa
mov al, 1
jmp 0x14000161f
mov rcx, rsi
call fcn.140003320
nop
movsxd r8, edi
mov r9, qword [r14 + 8]
mov rax, qword [r14]
mov rdx, r9
sub rdx, rax
sar rdx, 3
cmp rdx, r8
jbe 0x140001964
lea rdi, [rax + r8*8]
mov rax, qword [r14 + 0x28]
mov rcx, qword [rax + 8]
sub rcx, qword [rax]
sar rcx, 3
add ecx, dword [r14 + 0x1c]
mov eax, dword [r14 + 0x3c]
imul eax, dword [r14 + 0x38]
cmp ecx, eax
jle 0x140001750
lea rax, [r9 - 8]
mov qword [r14 + 8], rax
lea rax, [rdx - 1]
cmp r8, rax
je 0x1400017a1
nop dword [rax]
mov edx, dword [r14 + 0x38]
dec edx
call fcn.140035bc0
mov dword [rdi], eax
mov edx, dword [r14 + 0x3c]
dec edx
call fcn.140035bc0
mov dword [rdi + 4], eax
mov rcx, qword [r14 + 0x28]
mov rdx, qword [rcx]
mov r8, qword [rcx + 8]
cmp rdx, r8
je 0x140001792
mov ecx, dword [rdi]
nop dword [rax]
cmp dword [rdx], ecx
jne 0x140001789
cmp dword [rdx + 4], eax
je 0x140001750
add rdx, 8
cmp rdx, r8
jne 0x140001780
mov rdx, rdi
mov rcx, r14
call fcn.140001260
test al, al
jne 0x140001750
mov byte [rsp + 0x20], r15b
lea r9, [rbp - 0x21]
lea rdx, [rbp - 0x29]
mov rcx, qword [r14 + 0x30]
call fcn.140037290
cmp byte [rbp - 0x25], 0
jne 0x140001918
cmp byte [r14 + 0x18], 0
je 0x1400017d8
mov rcx, r14
call fcn.140001970
xor r15b, r15b
jmp 0x14000187b
mov qword [rbp - 0x31], 0
lea rdx, [rbp - 0x31]
call fcn.14002e160
test al, al
je 0x1400017fa
mov byte [r14 + 0x18], 1
mov r15b, 1
jmp 0x14000187b
mov dword [rbp - 0x19], 0x46
mov dword [rbp - 0x11], 0xa
lea r8, [r14 + 0x38]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x11]
lea rcx, str.FieldSizeX
call fcn.14002f530
mov dword [rbp - 0x11], 0x28
mov dword [rbp - 0x19], 0xa
lea r8, [r14 + 0x3c]
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x19]
lea rcx, str.FieldSizeY
call fcn.14002f530
mov dword [rbp - 0x11], 0xa
mov dword [rbp - 0x19], r12d
lea r8, [r14 + 0x1c]
lea rax, [rbp - 0x11]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x19]
lea rcx, str.FoodAmount
call fcn.14002f530
xor r15b, r15b
mov rsi, qword [r14 + 0x30]
call fcn.140010fe0
call fcn.14000b330
call fcn.14000b730
xorps xmm0, xmm0
movups xmmword [rbp - 9], xmm0
mov rcx, qword [rsi + 0x30]
mov rax, qword [rcx]
xor r9d, r9d
lea r8, [rsi + 0x40]
mov edx, r12d
call qword [rax + 0x108]
mov rcx, qword [rsi + 0x30]
mov rax, qword [rcx]
lea r8, [rbp - 9]
mov rdx, qword [rsi + 0x40]
call qword [rax + 0x190]
mov rax, qword [0x140046758]
mov rax, qword [rax + 0x4030]
mov rcx, qword [rax]
add rcx, 0x48
mov rax, r13
cmp byte [rcx], r13b
cmovne rax, rcx
mov rcx, rax
call fcn.1400297e0
mov rcx, qword [rsi + 0x38]
mov rax, qword [rcx]
xor r8d, r8d
xor edx, edx
call qword [rax + 0x40]
nop
test r15b, r15b
je 0x14000190a
mov rcx, r14
call fcn.140002fd0
mov byte [r14 + 0x18], 1
cmp byte [rbp - 0x21], 0
jne 0x140001324
xor eax, eax
jmp 0x14000191b
mov eax, dword [rbp - 0x29]
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.140037510
lea r11, [rsp + 0xc0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140003300
nop
call fcn.140003300
nop
call fcn.140003300
nop
call fcn.140003300
int3