Function at 0x140001b90
Capabilities:
Check for time delay via queryperformancecounter
Hide graphical window

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x168
movaps xmmword [rsp + 0x150], xmm6
mov rsi, qword [sym.imp.USER32.dll_GetSystemMetrics]
pxor xmm6, xmm6
lea r14, str.Snake
lea r15, [0x1400090c0]
mov qword [rsp + 0x1b0], rcx
xor ecx, ecx
lea rdi, [rsp + 0x100]
call rsi
mov ecx, 1
mov ebx, eax
call rsi
mov ecx, ebx
mov r8d, ebx
movdqa xmm0, xmmword [0x140005090]
mov esi, eax
lea eax, [rax + rax*4]
sar ecx, 0x1f
movups xmmword [rsp + 0x134], xmm6
shl eax, 4
movaps xmmword [0x1400090f0], xmm0
cdq
movups xmmword [rsp + 0x104], xmm6
idiv ebx
movups xmmword [rsp + 0x114], xmm6
mov dword [0x1400090d8], 0x50
mov dword [rsp + 0x100], 0x50
movups xmmword [rsp + 0x124], xmm6
movups xmmword [rsp + 0x140], xmm6
movsxd rdx, ebx
imul rdx, rdx, 0x66666667
sar rdx, 0x25
sub edx, ecx
lea ecx, [rdx + rdx*4]
mov dword [0x1400090e0], edx
shl ecx, 4
sub r8d, ecx
mov ecx, r8d
shr ecx, 0x1f
add ecx, r8d
sar ecx, 1
mov dword [0x1400090e4], ecx
xor ecx, ecx
mov dword [0x1400090dc], eax
imul eax, edx
mov edx, esi
sub edx, eax
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, 0x7f00
sar eax, 1
mov dword [0x1400090e8], eax
call qword [sym.imp.USER32.dll_LoadCursorA]
mov rcx, rdi
mov qword [rsp + 0x140], r14
mov qword [rsp + 0x128], rax
lea rax, [sym.MsgProc_HWND____unsigned_int__unsigned_long_long__long_long_]
mov qword [rsp + 0x108], rax
call qword [sym.imp.USER32.dll_RegisterClassExA]
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov r9d, 0x80000000
mov r8, r14
xor ecx, ecx
mov rdx, r14
mov dword [rsp + 0x38], esi
lea rsi, [rsp + 0xa0]
mov dword [rsp + 0x30], ebx
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
call qword [sym.imp.USER32.dll_CreateWindowExA]
movd xmm0, dword [0x1400090d8]
xor ecx, ecx
movaps xmmword [rsp + 0xb0], xmm6
mov qword [0x1400090c0], rax
mov eax, dword [0x1400090dc]
mov dword [rsp + 0xa0], 0x28
neg eax
movups xmmword [rsp + 0xbc], xmm6
mov dword [rsp + 0xac], 0x200001
movd xmm1, eax
mov rax, qword [sym.imp.USER32.dll_GetDC]
punpckldq xmm0, xmm1
movq qword [rsp + 0xa4], xmm0
mov qword [rsp + 0x60], rax
call rax
lea r9, [0x1400090d0]
xor r8d, r8d
mov rdx, rsi
mov rbx, rax
mov rcx, rax
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.GDI32.dll_CreateDIBSection]
mov rcx, rbx
mov rsi, rax
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
xor ecx, ecx
mov rdx, rbx
lea rbx, [rsp + 0xd0]
mov qword [0x1400090c8], rax
mov rax, qword [sym.imp.USER32.dll_ReleaseDC]
mov qword [rsp + 0x68], rax
call rax
mov rdx, rsi
mov rcx, qword [0x1400090c8]
call qword [sym.imp.GDI32.dll_SelectObject]
mov rcx, rax
call qword [sym.imp.GDI32.dll_DeleteObject]
mov edx, 3
mov rcx, qword [0x1400090c0]
call qword [sym.imp.USER32.dll_ShowWindow]
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov rcx, qword [rsp + 0x90]
movabs rax, 0x6666666666666667
mov rbp, qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
imul rcx
mov r8, rcx
movabs rax, 0x8888888888888889
sar r8, 0x3f
sar rdx, 3
mov rdi, rdx
imul rcx
sub rdi, r8
mov qword [rsp + 0x70], rdi
add rdx, rcx
lea rcx, [rsp + 0x88]
sar rdx, 5
sub rdx, r8
mov qword [rsp + 0x90], rdx
call rbp
add qword [rsp + 0x88], rdi
call method.Game.mazeInit__
mov rsi, qword [sym.imp.USER32.dll_PeekMessageA]
mov r12, qword [sym.imp.KERNEL32.dll_Sleep]
mov rdi, qword [sym.imp.USER32.dll_DispatchMessageA]
cmp byte [0x1400090bc], 0
je 0x140001f34
mov r10d, dword [0x1400090a4]
lea rax, [0x1400090a0]
lea r8, [0x1400090f0]
mov rcx, qword [0x1400090d0]
mov edx, dword [rax]
movsxd rax, r10d
mov r9d, dword [r8 + rax*4]
add r9d, edx
movsxd r13, r9d
shl r13, 2
lea rax, [rcx + r13]
test byte [rax], 1
jne 0x140002136
shl r10d, 0x10
mov r11d, r10d
mov dword [rsp + 0x78], r10d
movsxd r10, edx
or r11d, 0x3ccf01
mov dword [rcx + r10*4], r11d
mov r10d, dword [0x1400090ac]
test r10d, r10d
jne 0x140002060
mov dword [0x1400090a8], edx
mov dword [0x1400090ac], 1
test byte [rax], 2
jne 0x14000209d
lea rdx, [0x1400090a0]
mov dword [rdx], r9d
mov edx, dword [rsp + 0x78]
or edx, 0xfcff01
mov dword [rax], edx
mov rcx, qword [r15]
mov rax, qword [rsp + 0x60]
call rax
mov edx, dword [0x1400090e0]
mov r9d, dword [0x1400090d8]
mov dword [rsp + 0x50], 0xcc0020
mov r13, rax
mov eax, dword [0x1400090dc]
mov rcx, qword [0x1400090c8]
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x40], r9d
mov r8d, dword [0x1400090e8]
imul r9d, edx
mov dword [rsp + 0x48], eax
imul eax, edx
mov edx, dword [0x1400090e4]
mov qword [rsp + 0x28], rcx
mov rcx, r13
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x20], eax
call qword [sym.imp.GDI32.dll_StretchBlt]
mov rdx, r13
mov rcx, qword [r15]
mov rax, qword [rsp + 0x68]
call rax
lea r13, [rsp + 0x98]
nop word [rax + rax]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 1
mov rcx, rbx
call rsi
test eax, eax
je 0x140001ff0
cmp dword [rsp + 0xd8], 0x12
je 0x140002018
mov rcx, rbx
call rdi
jmp 0x140001fc0
mov rcx, r13
call rbp
mov rax, qword [rsp + 0x88]
cmp qword [rsp + 0x98], rax
jg 0x140002100
mov ecx, 1
call r12
jmp 0x140001fc0
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeEndPeriod]
mov rcx, qword [0x1400090c8]
call qword [sym.imp.GDI32.dll_DeleteDC]
mov rdx, qword [rsp + 0x1b0]
mov rcx, r14
call qword [sym.imp.USER32.dll_UnregisterClassA]
nop
movaps xmm6, xmmword [rsp + 0x150]
xor eax, eax
add rsp, 0x168
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp r10d, dword [0x1400090b0]
jl 0x140002126
movsxd rdx, dword [0x1400090a8]
lea rcx, [rcx + rdx*4]
mov r10, rdx
mov edx, dword [rcx]
mov dword [rcx], 0
shr edx, 0x10
and edx, 3
add r10d, dword [r8 + rdx*4]
mov dword [0x1400090a8], r10d
test byte [rax], 2
je 0x140001f1e
xor edx, edx
mov dword [rsp + 0x7c], r9d
mov r8d, 0x110001
mov ecx, 0x2153
call qword [sym.imp.WINMM.dll_PlaySoundA]
shl dword [0x1400090b0], 1
mov r9d, dword [rsp + 0x7c]
mov rax, qword [0x1400090d0]
add rax, r13
mov edx, dword [rax]
shr edx, 2
and edx, 1
sub dword [0x1400090b8], 1
mov byte [0x1400090bd], dl
jne 0x140001f1e
add dword [0x1400090b4], 1
call method.Game.mazeInit__
jmp 0x140001f34
cmp byte [0x1400090bd], 0
mov rdx, qword [rsp + 0x70]
je 0x140002116
mov rdx, qword [rsp + 0x90]
add rax, rdx
mov qword [rsp + 0x88], rax
jmp 0x140001e92
add r10d, 1
mov dword [0x1400090ac], r10d
jmp 0x140001f15
mov r8d, 0x110001
xor edx, edx
mov ecx, 0x2a53
call qword [sym.imp.WINMM.dll_PlaySoundA]
call method.Game.mazeInit__
jmp 0x140001f34