Function at 0x1400ae2c0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
cmp byte [0x140176bdc], 0
mov r13d, dword [rcx]
mov r12, rcx
mov r14, rdx
mov eax, r13d
jne 0x1400ae95c
test r14, r14
je 0x1400ae310
test eax, eax
je 0x1400ae310
mov rcx, qword [r14]
test rcx, rcx
je 0x1400ae310
cmp byte [rcx], 0
jne 0x1400aeaf5
nop word cs:[rax + rax]
call fcn.1400b4c60
lea rbx, [rsp + 0x40]
call sub.WINMM.dll_timeGetTime
lea rcx, str.GLUT_FPS
mov dword [0x140176bfc], eax
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1400ae35c
lea rdx, [0x1401a6080]
mov r8, rbx
mov rcx, rax
call fcn.1400ae270
mov eax, dword [rsp + 0x40]
mov edx, 0x1388
test eax, eax
cmovle eax, edx
mov dword [0x140176bf0], eax
lea rcx, [0x1401a60f2]
call sub.msvcrt.dll_getenv
cmp r13d, 1
mov qword [rsp + 0x20], rax
jle 0x1400aeb20
mov esi, 1
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], 0
jmp 0x1400ae3b8
cmp r13d, ebx
jle 0x1400ae690
mov rax, qword [r14 + rdi + 8]
pxor xmm0, xmm0
movups xmmword [rbp], xmm0
sub dword [r12], 2
mov qword [rsp + 0x20], rax
lea esi, [rbx + 1]
cmp r13d, esi
jle 0x1400ae41c
lea rdx, str._display
movsxd rdi, esi
lea ebx, [rsi + 1]
shl rdi, 3
lea rbp, [r14 + rdi]
mov r15, qword [rbp]
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x1400ae390
lea rdx, str._geometry
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400ae648
cmp r13d, ebx
jle 0x1400ae758
mov rax, qword [r14 + rdi + 8]
lea esi, [rbx + 1]
pxor xmm0, xmm0
movups xmmword [rbp], xmm0
sub dword [r12], 2
cmp r13d, esi
mov qword [rsp + 0x28], rax
jg 0x1400ae3b8
mov rbx, qword [rsp + 0x30]
mov r10d, dword [r12]
cmp r10d, 1
jle 0x1400ae47e
mov r8d, 1
mov ecx, 1
nop word cs:[rax + rax]
movsxd rax, ecx
mov rdx, qword [r14 + rax*8]
lea eax, [rcx + 1]
cdqe
test rdx, rdx
jne 0x1400ae469
nop dword [rax]
mov rcx, rax
add rax, 1
mov rdx, qword [r14 + rax*8 - 8]
test rdx, rdx
je 0x1400ae458
cmp ecx, r8d
je 0x1400ae472
mov qword [r14 + r8*8], rdx
add r8, 1
add ecx, 1
cmp r8, r10
jne 0x1400ae440
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rsi, rax
mov qword [0x140882b00], rax
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x1400ae4a7
mov rcx, rax
call sub.msvcrt.dll__strdup
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
lea rbp, [0x1401a61fe]
mov r8, rbx
mov rcx, rsi
mov rdx, rbp
mov qword [0x140882ba8], rax
call qword [sym.imp.USER32.dll_GetClassInfoA]
test ax, ax
je 0x1400ae982
mov rbx, qword [sym.imp.USER32.dll_GetSystemMetrics]
xor ecx, ecx
call rbx
mov ecx, 1
mov dword [0x140882bb0], eax
call rbx
mov dword [0x140882bb4], eax
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rsi, rax
mov rcx, rax
call qword [sym.imp.USER32.dll_GetDC]
mov rdi, qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edx, 4
mov rbx, rax
mov rcx, rax
call rdi
mov edx, 6
mov rcx, rbx
mov dword [0x140882bb8], eax
call rdi
mov rcx, rsi
mov rdx, rbx
mov dword [0x140882bbc], eax
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rcx, qword [0x140882ba8]
test rcx, rcx
je 0x1400ae5a7
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.GDI32.dll_CreateDCA]
test rax, rax
mov rbx, rax
je 0x1400aea2a
mov edx, 8
mov rcx, rax
call rdi
mov edx, 0xa
mov rcx, rbx
mov dword [0x140882bb0], eax
call rdi
mov edx, 4
mov rcx, rbx
mov dword [0x140882bb4], eax
call rdi
mov rcx, rbx
mov edx, 6
mov dword [0x140882bb8], eax
call rdi
mov rcx, rbx
mov dword [0x140882bbc], eax
call qword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov byte [0x140176bdc], 1
call fcn.1400af4f0
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x1400ae744
movzx edx, byte [rax]
test dl, dl
je 0x1400ae736
cmp dl, 0x3d
je 0x1400aeade
lea eax, [rdx - 0x2b]
test al, 0xfd
je 0x1400ae6ea
cmp dl, 0x78
je 0x1400ae6ea
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x1400ae736
mov rcx, qword [rsp + 0x28]
xor eax, eax
lea r8d, [rax + rax*4]
add rcx, 1
lea eax, [rdx - 0x30]
movzx edx, byte [rcx]
movsx eax, al
lea eax, [rax + r8*2]
lea r8d, [rdx - 0x30]
cmp r8b, 9
jbe 0x1400ae606
cmp qword [rsp + 0x28], rcx
mov dword [rsp + 0x3c], eax
je 0x1400ae736
mov qword [rsp + 0x28], rcx
mov r8d, 4
jmp 0x1400ae6f5
lea rdx, str._direct
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400ae6a8
mov eax, dword [0x140176be0]
test eax, eax
je 0x1400ae971
mov dword [0x140176be0], 3
mov qword [rbp], 0
sub dword [r12], 1
mov ebx, esi
jmp 0x1400ae3b0
lea rcx, str._display_parameter_must_be_followed_by_display_name
call fcn.1400b0690
jmp 0x1400ae399
lea rdx, str._indirect
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400ae769
cmp dword [0x140176be0], 3
je 0x1400aeacd
mov dword [0x140176be0], 0
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ae3b0
mov dword [rsp + 0x3c], 0
xor r8d, r8d
mov eax, edx
xor ecx, ecx
and eax, 0xffffffdf
cmp al, 0x58
jne 0x1400ae83a
mov rax, qword [rsp + 0x28]
lea r11, [rax + 1]
movzx eax, byte [rax + 1]
cmp al, 0x2b
je 0x1400ae7e0
cmp al, 0x2d
je 0x1400aebaa
lea ecx, [rax - 0x30]
mov rdx, r11
mov r10d, 1
cmp cl, 9
jbe 0x1400ae7fd
movd xmm0, dword [rsp + 0x3c]
movq qword [0x140176bcc], xmm0
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, str._geometry_parameter_must_be_followed_by_window_geometry_settings
call fcn.1400b0690
jmp 0x1400ae3fd
lea rdx, str._iconic
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400ae797
mov byte [0x140176be4], 1
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ae3b0
lea rdx, str._gldebug
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x1400aeab2
lea rdx, str._sync
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400ae680
mov byte [0x140176be7], 1
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ae3b0
mov rax, qword [rsp + 0x28]
mov r10d, 1
lea rdx, [rax + 2]
movzx eax, byte [rax + 2]
lea r9d, [rax - 0x30]
cmp r9b, 9
ja 0x1400ae825
xor ecx, ecx
nop
lea ecx, [rcx + rcx*4]
sub eax, 0x30
add rdx, 1
movsx eax, al
lea ecx, [rax + rcx*2]
movzx eax, byte [rdx]
lea r9d, [rax - 0x30]
cmp r9b, 9
jbe 0x1400ae800
cmp r10d, 0xffffffff
jne 0x1400ae825
neg ecx
cmp r11, rdx
mov qword [rsp + 0x28], rdx
je 0x1400ae736
movzx edx, byte [rdx]
or r8d, 8
lea eax, [rdx - 0x2b]
test al, 0xfd
jne 0x1400aea3b
mov rax, qword [rsp + 0x28]
cmp dl, 0x2d
lea r11, [rax + 1]
movzx eax, byte [rax + 1]
je 0x1400aebe7
cmp al, 0x2b
je 0x1400aec4a
cmp al, 0x2d
je 0x1400aeb87
lea edx, [rax - 0x30]
mov r9, r11
mov ebx, 1
cmp dl, 9
ja 0x1400ae736
xor r10d, r10d
lea edx, [r10 + r10*4]
sub eax, 0x30
add r9, 1
movsx eax, al
lea r10d, [rax + rdx*2]
movzx eax, byte [r9]
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x1400ae882
mov eax, r10d
neg eax
cmp ebx, 0xffffffff
cmove r10d, eax
cmp r9, r11
je 0x1400ae736
movzx eax, byte [r9]
mov esi, r8d
or esi, 1
lea edx, [rax - 0x2b]
and edx, 0xfd
jne 0x1400aebd0
movzx edx, byte [r9 + 1]
lea rbx, [r9 + 1]
cmp al, 0x2d
je 0x1400aecb0
cmp dl, 0x2b
je 0x1400aec8f
cmp dl, 0x2d
je 0x1400aed19
lea eax, [rdx - 0x30]
mov r11, rbx
mov r9d, 1
cmp al, 9
ja 0x1400ae736
xor eax, eax
lea r8d, [rax + rax*4]
add r11, 1
lea eax, [rdx - 0x30]
movzx edx, byte [r11]
movsx eax, al
lea eax, [rax + r8*2]
lea r8d, [rdx - 0x30]
cmp r8b, 9
jbe 0x1400ae907
cmp r9d, 0xffffffff
je 0x1400aed12
cmp r11, rbx
je 0x1400ae736
or esi, 2
cmp byte [r11], 0
mov r8d, esi
jne 0x1400ae736
mov dword [0x140176bc0], r10d
mov dword [0x140176bc4], eax
jmp 0x1400aea43
lea rcx, str.illegal_glutInit___reinitialization_attempt
call fcn.1400b0690
mov eax, dword [r12]
jmp 0x1400ae2ec
lea rcx, str.parameters_ambiguity___direct_and__indirect_cannot_be_both_specified
call fcn.1400b0690
jmp 0x1400ae669
xor eax, eax
mov ecx, 9
mov rdi, rbx
mov rsi, qword [sym.imp.USER32.dll_LoadIconA]
rep stosq qword [rdi], rax
mov rax, qword [0x1401c3da0]
lea rdx, str.GLUT_ICON
mov rcx, qword [0x140882b00]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x58], rcx
call rsi
mov dword [rsp + 0x40], 0x23
test rax, rax
mov qword [rsp + 0x60], rax
je 0x1400aeb5f
xor ecx, ecx
mov edx, 0x7f00
call qword [sym.imp.USER32.dll_LoadCursorA]
mov qword [rsp + 0x80], rbp
mov rcx, rbx
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
call qword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
jne 0x1400ae4d2
lea r8, str.fghInitialize
lea rdx, str.Window_Class_Not_Registered
lea rcx, [0x1401a6240]
call fcn.1400b0690
jmp 0x1400ae4d2
lea rcx, str.fghInitialize:_CreateDC_failed__Screen_size_info_may_be_incorrect_nThis_is_quite_likely_caused_by_a_bad__display_parameter
call fcn.1400b0770
jmp 0x1400ae5a7
test dl, dl
jne 0x1400ae736
mov eax, r8d
and eax, 8
test r8b, 4
jne 0x1400aeb2e
test eax, eax
jne 0x1400aeb72
mov eax, dword [rsp + 0x3c]
xor ecx, ecx
mov dword [0x140176bd0], ecx
mov dword [0x140176bcc], eax
test r8b, 0x10
je 0x1400aea85
mov eax, dword [0x140882bb0]
mov ebx, dword [rsp + 0x3c]
sub eax, ebx
add dword [0x140176bc0], eax
test r8b, 0x20
je 0x1400aea99
mov eax, dword [0x140882bb4]
sub eax, ecx
add dword [0x140176bc4], eax
not r8d
and r8d, 3
jne 0x1400ae744
mov byte [0x140176bc8], 1
jmp 0x1400ae744
mov byte [0x140176be6], 1
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ae3b0
lea rcx, str.parameters_ambiguity___direct_and__indirect_cannot_be_both_specified
call fcn.1400b0690
jmp 0x1400ae6cc
mov rax, qword [rsp + 0x28]
movzx edx, byte [rax + 1]
add rax, 1
mov qword [rsp + 0x28], rax
jmp 0x1400ae5e0
call sub.msvcrt.dll__strdup
test rax, rax
mov qword [0x140176c60], rax
jne 0x1400ae310
lea rcx, str.Could_not_allocate_space_for_the_programs_name.
call fcn.1400b0690
jmp 0x1400ae310
mov qword [rsp + 0x28], 0
jmp 0x1400ae421
test eax, eax
je 0x1400aea5b
mov eax, dword [rsp + 0x3c]
mov dword [0x140176bd0], ecx
mov dword [0x140176bcc], eax
mov eax, r8d
not eax
test al, 0xc
jne 0x1400aea6d
mov byte [0x140176bd4], 1
jmp 0x1400aea6d
mov edx, 0x7f05
xor ecx, ecx
call rsi
mov qword [rsp + 0x60], rax
jmp 0x1400ae9cd
mov eax, dword [rsp + 0x3c]
mov dword [0x140176bd0], ecx
mov dword [0x140176bcc], eax
jmp 0x1400aea6d
mov rax, qword [rsp + 0x28]
lea r9, [rax + 2]
movzx eax, byte [rax + 2]
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x1400aec68
mov ebx, 0xffffffff
jmp 0x1400ae87f
mov rax, qword [rsp + 0x28]
lea rdx, [rax + 2]
movzx eax, byte [rax + 2]
lea r9d, [rax - 0x30]
cmp r9b, 9
ja 0x1400ae825
mov r10d, 0xffffffff
jmp 0x1400ae7fd
test al, al
jne 0x1400ae736
mov dword [0x140176bc0], r10d
mov r8d, esi
jmp 0x1400aea43
cmp al, 0x2b
je 0x1400aec70
cmp al, 0x2d
je 0x1400aed4c
lea edx, [rax - 0x30]
mov r9, r11
mov ebx, 1
cmp dl, 9
ja 0x1400ae736
xor r10d, r10d
lea edx, [r10 + r10*4]
sub eax, 0x30
add r9, 1
movsx eax, al
lea r10d, [rax + rdx*2]
movzx eax, byte [r9]
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x1400aec0e
mov eax, r10d
neg eax
cmp ebx, 0xffffffff
cmovne r10d, eax
cmp r9, r11
je 0x1400ae736
or r8d, 0x10
jmp 0x1400ae8b5
mov rax, qword [rsp + 0x28]
mov ebx, 1
lea r9, [rax + 2]
movzx eax, byte [rax + 2]
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x1400ae87f
xor r10d, r10d
jmp 0x1400ae8ac
mov rax, qword [rsp + 0x28]
mov ebx, 1
lea r9, [rax + 2]
movzx eax, byte [rax + 2]
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x1400aec0b
xor r10d, r10d
jmp 0x1400aec38
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
mov r9d, 1
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x1400ae905
xor eax, eax
jmp 0x1400ae931
cmp dl, 0x2b
je 0x1400aed6f
cmp dl, 0x2d
je 0x1400aed34
lea eax, [rdx - 0x30]
mov r11, rbx
mov r9d, 1
cmp al, 9
ja 0x1400ae736
xor eax, eax
lea esi, [rax + rax*4]
add r11, 1
lea eax, [rdx - 0x30]
movzx edx, byte [r11]
movsx eax, al
lea eax, [rax + rsi*2]
lea esi, [rdx - 0x30]
cmp sil, 9
jbe 0x1400aecd4
mov edx, eax
neg edx
cmp r9d, 0xffffffff
cmovne eax, edx
cmp r11, rbx
je 0x1400ae736
mov esi, r8d
or esi, 0x21
jmp 0x1400ae93a
xor eax, eax
neg eax
jmp 0x1400ae931
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x1400aed10
mov r9d, 0xffffffff
jmp 0x1400ae905
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x1400aed89
mov r9d, 0xffffffff
jmp 0x1400aecd2
mov rax, qword [rsp + 0x28]
lea r9, [rax + 2]
movzx eax, byte [rax + 2]
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x1400aec8a
mov ebx, 0xffffffff
jmp 0x1400aec0b
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
mov r9d, 1
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x1400aecd2
xor eax, eax
jmp 0x1400aecfc
mov qword [0x140882ae0], r8
jmp 0x1400ae2c0