Function at 0x1400ac680
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 [0x140174bdc], 0
mov r13d, dword [rcx]
mov r12, rcx
mov r14, rdx
mov eax, r13d
jne 0x1400acd1c
test r14, r14
je 0x1400ac6d0
test eax, eax
je 0x1400ac6d0
mov rcx, qword [r14]
test rcx, rcx
je 0x1400ac6d0
cmp byte [rcx], 0
jne 0x1400aceb5
nop word cs:[rax + rax]
call fcn.1400b3020
lea rbx, [rsp + 0x40]
call sub.WINMM.dll_timeGetTime
lea rcx, str.GLUT_FPS
mov dword [0x140174bfc], eax
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1400ac71c
lea rdx, [0x1401a3ce0]
mov r8, rbx
mov rcx, rax
call fcn.1400ac630
mov eax, dword [rsp + 0x40]
mov edx, 0x1388
test eax, eax
cmovle eax, edx
mov dword [0x140174bf0], eax
lea rcx, [0x1401a3d52]
call sub.msvcrt.dll_getenv
cmp r13d, 1
mov qword [rsp + 0x20], rax
jle 0x1400acee0
mov esi, 1
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], 0
jmp 0x1400ac778
cmp r13d, ebx
jle 0x1400aca50
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 0x1400ac7dc
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 0x1400ac750
lea rdx, str._geometry
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400aca08
cmp r13d, ebx
jle 0x1400acb18
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 0x1400ac778
mov rbx, qword [rsp + 0x30]
mov r10d, dword [r12]
cmp r10d, 1
jle 0x1400ac83e
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 0x1400ac829
nop dword [rax]
mov rcx, rax
add rax, 1
mov rdx, qword [r14 + rax*8 - 8]
test rdx, rdx
je 0x1400ac818
cmp ecx, r8d
je 0x1400ac832
mov qword [r14 + r8*8], rdx
add r8, 1
add ecx, 1
cmp r8, r10
jne 0x1400ac800
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rsi, rax
mov qword [0x14087fb00], rax
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x1400ac867
mov rcx, rax
call sub.msvcrt.dll__strdup
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
lea rbp, [0x1401a3e5e]
mov r8, rbx
mov rcx, rsi
mov rdx, rbp
mov qword [0x14087fba8], rax
call qword [sym.imp.USER32.dll_GetClassInfoA]
test ax, ax
je 0x1400acd42
mov rbx, qword [sym.imp.USER32.dll_GetSystemMetrics]
xor ecx, ecx
call rbx
mov ecx, 1
mov dword [0x14087fbb0], eax
call rbx
mov dword [0x14087fbb4], 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 [0x14087fbb8], eax
call rdi
mov rcx, rsi
mov rdx, rbx
mov dword [0x14087fbbc], eax
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rcx, qword [0x14087fba8]
test rcx, rcx
je 0x1400ac967
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.GDI32.dll_CreateDCA]
test rax, rax
mov rbx, rax
je 0x1400acdea
mov edx, 8
mov rcx, rax
call rdi
mov edx, 0xa
mov rcx, rbx
mov dword [0x14087fbb0], eax
call rdi
mov edx, 4
mov rcx, rbx
mov dword [0x14087fbb4], eax
call rdi
mov rcx, rbx
mov edx, 6
mov dword [0x14087fbb8], eax
call rdi
mov rcx, rbx
mov dword [0x14087fbbc], eax
call qword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov byte [0x140174bdc], 1
call fcn.1400ad8b0
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x1400acb04
movzx edx, byte [rax]
test dl, dl
je 0x1400acaf6
cmp dl, 0x3d
je 0x1400ace9e
lea eax, [rdx - 0x2b]
test al, 0xfd
je 0x1400acaaa
cmp dl, 0x78
je 0x1400acaaa
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x1400acaf6
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 0x1400ac9c6
cmp qword [rsp + 0x28], rcx
mov dword [rsp + 0x3c], eax
je 0x1400acaf6
mov qword [rsp + 0x28], rcx
mov r8d, 4
jmp 0x1400acab5
lea rdx, str._direct
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400aca68
mov eax, dword [0x140174be0]
test eax, eax
je 0x1400acd31
mov dword [0x140174be0], 3
mov qword [rbp], 0
sub dword [r12], 1
mov ebx, esi
jmp 0x1400ac770
lea rcx, str._display_parameter_must_be_followed_by_display_name
call fcn.1400aea50
jmp 0x1400ac759
lea rdx, str._indirect
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400acb29
cmp dword [0x140174be0], 3
je 0x1400ace8d
mov dword [0x140174be0], 0
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ac770
mov dword [rsp + 0x3c], 0
xor r8d, r8d
mov eax, edx
xor ecx, ecx
and eax, 0xffffffdf
cmp al, 0x58
jne 0x1400acbfa
mov rax, qword [rsp + 0x28]
lea r11, [rax + 1]
movzx eax, byte [rax + 1]
cmp al, 0x2b
je 0x1400acba0
cmp al, 0x2d
je 0x1400acf6a
lea ecx, [rax - 0x30]
mov rdx, r11
mov r10d, 1
cmp cl, 9
jbe 0x1400acbbd
movd xmm0, dword [rsp + 0x3c]
movq qword [0x140174bcc], 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.1400aea50
jmp 0x1400ac7bd
lea rdx, str._iconic
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400acb57
mov byte [0x140174be4], 1
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ac770
lea rdx, str._gldebug
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x1400ace72
lea rdx, str._sync
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400aca40
mov byte [0x140174be7], 1
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ac770
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 0x1400acbe5
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 0x1400acbc0
cmp r10d, 0xffffffff
jne 0x1400acbe5
neg ecx
cmp r11, rdx
mov qword [rsp + 0x28], rdx
je 0x1400acaf6
movzx edx, byte [rdx]
or r8d, 8
lea eax, [rdx - 0x2b]
test al, 0xfd
jne 0x1400acdfb
mov rax, qword [rsp + 0x28]
cmp dl, 0x2d
lea r11, [rax + 1]
movzx eax, byte [rax + 1]
je 0x1400acfa7
cmp al, 0x2b
je 0x1400ad00a
cmp al, 0x2d
je 0x1400acf47
lea edx, [rax - 0x30]
mov r9, r11
mov ebx, 1
cmp dl, 9
ja 0x1400acaf6
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 0x1400acc42
mov eax, r10d
neg eax
cmp ebx, 0xffffffff
cmove r10d, eax
cmp r9, r11
je 0x1400acaf6
movzx eax, byte [r9]
mov esi, r8d
or esi, 1
lea edx, [rax - 0x2b]
and edx, 0xfd
jne 0x1400acf90
movzx edx, byte [r9 + 1]
lea rbx, [r9 + 1]
cmp al, 0x2d
je 0x1400ad070
cmp dl, 0x2b
je 0x1400ad04f
cmp dl, 0x2d
je 0x1400ad0d9
lea eax, [rdx - 0x30]
mov r11, rbx
mov r9d, 1
cmp al, 9
ja 0x1400acaf6
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 0x1400accc7
cmp r9d, 0xffffffff
je 0x1400ad0d2
cmp r11, rbx
je 0x1400acaf6
or esi, 2
cmp byte [r11], 0
mov r8d, esi
jne 0x1400acaf6
mov dword [0x140174bc0], r10d
mov dword [0x140174bc4], eax
jmp 0x1400ace03
lea rcx, str.illegal_glutInit___reinitialization_attempt
call fcn.1400aea50
mov eax, dword [r12]
jmp 0x1400ac6ac
lea rcx, str.parameters_ambiguity___direct_and__indirect_cannot_be_both_specified
call fcn.1400aea50
jmp 0x1400aca29
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 [0x1401c1a00]
lea rdx, str.GLUT_ICON
mov rcx, qword [0x14087fb00]
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 0x1400acf1f
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 0x1400ac892
lea r8, str.fghInitialize
lea rdx, str.Window_Class_Not_Registered
lea rcx, [0x1401a3ea0]
call fcn.1400aea50
jmp 0x1400ac892
lea rcx, str.fghInitialize:_CreateDC_failed__Screen_size_info_may_be_incorrect_nThis_is_quite_likely_caused_by_a_bad__display_parameter
call fcn.1400aeb30
jmp 0x1400ac967
test dl, dl
jne 0x1400acaf6
mov eax, r8d
and eax, 8
test r8b, 4
jne 0x1400aceee
test eax, eax
jne 0x1400acf32
mov eax, dword [rsp + 0x3c]
xor ecx, ecx
mov dword [0x140174bd0], ecx
mov dword [0x140174bcc], eax
test r8b, 0x10
je 0x1400ace45
mov eax, dword [0x14087fbb0]
mov ebx, dword [rsp + 0x3c]
sub eax, ebx
add dword [0x140174bc0], eax
test r8b, 0x20
je 0x1400ace59
mov eax, dword [0x14087fbb4]
sub eax, ecx
add dword [0x140174bc4], eax
not r8d
and r8d, 3
jne 0x1400acb04
mov byte [0x140174bc8], 1
jmp 0x1400acb04
mov byte [0x140174be6], 1
mov ebx, esi
mov qword [rbp], 0
sub dword [r12], 1
jmp 0x1400ac770
lea rcx, str.parameters_ambiguity___direct_and__indirect_cannot_be_both_specified
call fcn.1400aea50
jmp 0x1400aca8c
mov rax, qword [rsp + 0x28]
movzx edx, byte [rax + 1]
add rax, 1
mov qword [rsp + 0x28], rax
jmp 0x1400ac9a0
call sub.msvcrt.dll__strdup
test rax, rax
mov qword [0x140174c60], rax
jne 0x1400ac6d0
lea rcx, str.Could_not_allocate_space_for_the_programs_name.
call fcn.1400aea50
jmp 0x1400ac6d0
mov qword [rsp + 0x28], 0
jmp 0x1400ac7e1
test eax, eax
je 0x1400ace1b
mov eax, dword [rsp + 0x3c]
mov dword [0x140174bd0], ecx
mov dword [0x140174bcc], eax
mov eax, r8d
not eax
test al, 0xc
jne 0x1400ace2d
mov byte [0x140174bd4], 1
jmp 0x1400ace2d
mov edx, 0x7f05
xor ecx, ecx
call rsi
mov qword [rsp + 0x60], rax
jmp 0x1400acd8d
mov eax, dword [rsp + 0x3c]
mov dword [0x140174bd0], ecx
mov dword [0x140174bcc], eax
jmp 0x1400ace2d
mov rax, qword [rsp + 0x28]
lea r9, [rax + 2]
movzx eax, byte [rax + 2]
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x1400ad028
mov ebx, 0xffffffff
jmp 0x1400acc3f
mov rax, qword [rsp + 0x28]
lea rdx, [rax + 2]
movzx eax, byte [rax + 2]
lea r9d, [rax - 0x30]
cmp r9b, 9
ja 0x1400acbe5
mov r10d, 0xffffffff
jmp 0x1400acbbd
test al, al
jne 0x1400acaf6
mov dword [0x140174bc0], r10d
mov r8d, esi
jmp 0x1400ace03
cmp al, 0x2b
je 0x1400ad030
cmp al, 0x2d
je 0x1400ad10c
lea edx, [rax - 0x30]
mov r9, r11
mov ebx, 1
cmp dl, 9
ja 0x1400acaf6
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 0x1400acfce
mov eax, r10d
neg eax
cmp ebx, 0xffffffff
cmovne r10d, eax
cmp r9, r11
je 0x1400acaf6
or r8d, 0x10
jmp 0x1400acc75
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 0x1400acc3f
xor r10d, r10d
jmp 0x1400acc6c
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 0x1400acfcb
xor r10d, r10d
jmp 0x1400acff8
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
mov r9d, 1
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x1400accc5
xor eax, eax
jmp 0x1400accf1
cmp dl, 0x2b
je 0x1400ad12f
cmp dl, 0x2d
je 0x1400ad0f4
lea eax, [rdx - 0x30]
mov r11, rbx
mov r9d, 1
cmp al, 9
ja 0x1400acaf6
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 0x1400ad094
mov edx, eax
neg edx
cmp r9d, 0xffffffff
cmovne eax, edx
cmp r11, rbx
je 0x1400acaf6
mov esi, r8d
or esi, 0x21
jmp 0x1400accfa
xor eax, eax
neg eax
jmp 0x1400accf1
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x1400ad0d0
mov r9d, 0xffffffff
jmp 0x1400accc5
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x1400ad149
mov r9d, 0xffffffff
jmp 0x1400ad092
mov rax, qword [rsp + 0x28]
lea r9, [rax + 2]
movzx eax, byte [rax + 2]
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x1400ad04a
mov ebx, 0xffffffff
jmp 0x1400acfcb
movzx edx, byte [r9 + 2]
lea r11, [r9 + 2]
mov r9d, 1
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x1400ad092
xor eax, eax
jmp 0x1400ad0bc
mov qword [0x14087fae0], r8
jmp 0x1400ac680