Function at 0x4a0ae0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
cmp byte [0x00588a9c], 0
mov r14d, dword [rcx]
mov r15, rcx
mov rbx, rdx
mov eax, r14d
jne 0x4a067a
test rbx, rbx
je 0x49ffd0
test eax, eax
je 0x49ffd0
mov rcx, qword [rbx]
test rcx, rcx
je 0x49ffd0
cmp byte [rcx], 0
jne 0x4a0847
nop word cs:[rax + rax]
call fcn.004a6680
lea rsi, [rsp + 0x50]
call sub.WINMM.dll_timeGetTime
lea rcx, str.GLUT_FPS
mov dword [0x00588abc], eax
call sub.msvcrt.dll_getenv
mov qword [rsp + 0x38], rsi
test rax, rax
je 0x4a0021
lea rdx, [0x005b772a]
mov r8, rsi
mov rcx, rax
call sub.msvcrt.dll_sscanf
mov eax, dword [rsp + 0x50]
mov edx, 0x1388
test eax, eax
cmovle eax, edx
mov dword [0x00588ab0], eax
lea rcx, [0x005b772d]
call sub.msvcrt.dll_getenv
cmp r14d, 1
mov r10, rax
jle 0x4a087a
mov ebp, 1
mov r8d, r14d
mov rdx, r15
mov qword [rsp + 0x28], 0
jmp 0x4a007f
cmp r8d, r15d
jle 0x4a0365
lea rax, [rbx + r13 + 8]
add ebp, 2
mov r10, qword [rax]
mov qword [rbx + r12*8], 0
mov qword [rax], 0
sub dword [rdx], 2
cmp r8d, ebp
jle 0x4a00ff
lea rdi, str._display
movsxd r12, ebp
mov ecx, 9
lea r13, [r12*8]
lea r14, [rbx + r13]
mov rax, qword [r14]
lea r15d, [rbp + 1]
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
je 0x4a0050
lea rdi, str._geometry
mov ecx, 0xa
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x4a0320
cmp r8d, r15d
jle 0x4a0476
lea rax, [rbx + r13 + 8]
add ebp, 2
mov rdi, qword [rax]
mov qword [rsp + 0x28], rdi
mov qword [rbx + r12*8], 0
mov qword [rax], 0
sub dword [rdx], 2
cmp r8d, ebp
jg 0x4a007f
mov r15, rdx
mov eax, dword [r15]
cmp eax, 1
jle 0x4a0156
lea r9d, [rax - 2]
mov r8d, 1
mov ecx, 1
add r9, 2
nop dword [rax]
movsxd rax, ecx
mov rdx, qword [rbx + rax*8]
lea eax, [rcx + 1]
cdqe
test rdx, rdx
jne 0x4a0141
mov ecx, eax
add rax, 1
mov rdx, qword [rbx + rax*8 - 8]
test rdx, rdx
je 0x4a0131
cmp ecx, r8d
je 0x4a014a
mov qword [rbx + r8*8], rdx
add r8, 1
add ecx, 1
cmp r9, r8
jne 0x4a0120
mov qword [rsp + 0x30], r10
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov r10, qword [rsp + 0x30]
mov rbx, rax
mov qword [0x00c89bc0], rax
xor eax, eax
test r10, r10
je 0x4a0181
mov rcx, r10
call sub.msvcrt.dll__strdup
mov qword [0x00c89c68], rax
mov r8, qword [rsp + 0x38]
lea rdx, [0x005b7836]
mov rcx, rbx
call qword [sym.imp.USER32.dll_GetClassInfoA]
test ax, ax
je 0x4a06c3
xor ecx, ecx
mov rbx, qword [sym.imp.USER32.dll_GetSystemMetrics]
call rbx
mov ecx, 1
mov dword [0x00c89c70], eax
call rbx
mov dword [0x00c89c74], eax
call qword [sym.imp.USER32.dll_GetDesktopWindow]
mov rdi, rax
mov rcx, rax
call qword [sym.imp.USER32.dll_GetDC]
mov edx, 4
mov rbx, qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov rsi, rax
mov rcx, rax
call rbx
mov edx, 6
mov rcx, rsi
mov dword [0x00c89c78], eax
call rbx
mov rcx, rdi
mov rdx, rsi
mov dword [0x00c89c7c], eax
call qword [sym.imp.USER32.dll_ReleaseDC]
mov rcx, qword [0x00c89c68]
test rcx, rcx
je 0x4a027b
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.GDI32.dll_CreateDCA]
test rax, rax
mov rsi, rax
je 0x4a077c
mov edx, 8
mov rcx, rax
call rbx
mov edx, 0xa
mov rcx, rsi
mov dword [0x00c89c70], eax
call rbx
mov edx, 4
mov rcx, rsi
mov dword [0x00c89c74], eax
call rbx
mov rcx, rsi
mov edx, 6
mov dword [0x00c89c78], eax
call rbx
mov rcx, rsi
mov dword [0x00c89c7c], eax
call qword [sym.imp.GDI32.dll_DeleteDC]
mov ecx, 1
call qword [sym.imp.WINMM.dll_timeBeginPeriod]
mov byte [0x00588a9c], 1
call fcn.004a1200
mov rax, qword [rsp + 0x28]
test rax, rax
je 0x4a0462
movsx eax, byte [rax]
test al, al
je 0x4a0661
cmp al, 0x3d
je 0x4a0830
lea edx, [rax - 0x2b]
and edx, 0xfd
je 0x4a07db
cmp al, 0x78
je 0x4a07db
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x4a0661
mov rdx, qword [rsp + 0x28]
xor ecx, ecx
nop dword [rax]
lea ecx, [rcx + rcx*4]
add rdx, 1
lea ecx, [rax + rcx*2 - 0x30]
movsx eax, byte [rdx]
lea r8d, [rax - 0x30]
cmp r8b, 9
jbe 0x4a02e0
cmp qword [rsp + 0x28], rdx
mov dword [rsp + 0x48], ecx
je 0x4a0661
mov qword [rsp + 0x28], rdx
mov r9d, 4
jmp 0x4a07e6
lea rdi, str._direct
mov ecx, 8
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x4a0390
mov eax, dword [0x00588aa0]
test eax, eax
je 0x4a068e
mov dword [0x00588aa0], 3
mov ebp, r15d
mov qword [r14], 0
sub dword [rdx], 1
jmp 0x4a0076
lea rcx, str._display_parameter_must_be_followed_by_display_name
mov qword [rsp + 0xf0], rdx
mov dword [rsp + 0x30], r8d
call fcn.004a2310
mov rdx, qword [rsp + 0xf0]
mov r8d, dword [rsp + 0x30]
jmp 0x4a0059
lea rdi, str._indirect
mov ecx, 0xa
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x4a04ab
cmp dword [0x00588aa0], 3
je 0x4a07a6
mov dword [0x00588aa0], 0
mov ebp, r15d
mov qword [r14], 0
sub dword [rdx], 1
jmp 0x4a0076
xor edx, edx
xor ecx, ecx
test al, al
jne 0x4a0661
test r9b, 1
jne 0x4a0895
test r9b, 2
je 0x4a03fa
mov dword [0x00588a84], edx
mov eax, dword [rsp + 0x48]
mov dword [0x00588a8c], eax
mov eax, dword [rsp + 0x44]
mov dword [0x00588a90], eax
mov eax, r9d
and eax, 0xc
cmp eax, 0xc
jne 0x4a0420
mov byte [0x00588a94], 1
mov ecx, r9d
mov edx, r9d
and ecx, 0x20
and edx, 3
and r9d, 0x10
je 0x4a0442
mov eax, dword [0x00c89c70]
sub eax, dword [rsp + 0x48]
add dword [0x00588a80], eax
test ecx, ecx
je 0x4a0456
mov eax, dword [0x00c89c74]
sub eax, dword [rsp + 0x44]
add dword [0x00588a84], eax
cmp edx, 3
jne 0x4a0462
mov byte [0x00588a88], 1
add rsp, 0xa8
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
mov qword [rsp + 0xf0], rdx
mov dword [rsp + 0x30], r8d
mov qword [rsp + 0x28], r10
call fcn.004a2310
mov rdx, qword [rsp + 0xf0]
mov r8d, dword [rsp + 0x30]
mov r10, qword [rsp + 0x28]
jmp 0x4a00d8
lea rdi, str._iconic
mov ecx, 8
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
jne 0x4a04df
mov byte [0x00588aa4], 1
mov ebp, r15d
mov qword [r14], 0
sub dword [rdx], 1
jmp 0x4a0076
lea rdi, str._gldebug
mov ecx, 9
mov rsi, rax
repe cmpsb byte [rsi], byte [rdi]
seta cl
sbb cl, 0
test cl, cl
je 0x4a078d
mov rsi, rax
mov ecx, 6
mov ebp, r15d
lea rdi, str._sync
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x4a0076
mov byte [0x00588aa7], 1
mov qword [r14], 0
sub dword [rdx], 1
jmp 0x4a0076
mov rax, qword [rsp + 0x28]
lea rdx, [rax + 2]
movsx eax, byte [rax + 2]
lea ecx, [rax - 0x30]
cmp cl, 9
ja 0x4a0943
mov r10d, 0xffffffff
xor ecx, ecx
nop word cs:[rax + rax]
lea ecx, [rcx + rcx*4]
add rdx, 1
lea ecx, [rax + rcx*2 - 0x30]
movsx eax, byte [rdx]
lea r8d, [rax - 0x30]
cmp r8b, 9
jbe 0x4a0560
cmp r10d, 0xffffffff
jne 0x4a0580
neg ecx
mov dword [rsp + 0x44], ecx
mov qword [rsp + 0x28], rdx
cmp r11, rdx
je 0x4a0661
movzx eax, byte [rdx]
or r9d, 8
lea edx, [rax - 0x2b]
and edx, 0xfd
jne 0x4a03d8
mov rdi, qword [rsp + 0x28]
cmp al, 0x2d
lea r10, [rdi + 1]
movsx edx, byte [rdi + 1]
je 0x4a0955
cmp dl, 0x2b
je 0x4a09b4
cmp dl, 0x2d
jne 0x4a08b3
mov rax, qword [rsp + 0x28]
movsx edx, byte [rax + 2]
lea r8, [rax + 2]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x4a09d2
mov r11d, 0xffffffff
xor ecx, ecx
lea eax, [rcx + rcx*4]
add r8, 1
lea ecx, [rdx + rax*2 - 0x30]
movsx edx, byte [r8]
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x4a05ef
mov eax, ecx
neg eax
cmp r11d, 0xffffffff
cmove ecx, eax
cmp r8, r10
je 0x4a0661
movzx edx, byte [r8]
mov ebx, r9d
or ebx, 1
lea eax, [rdx - 0x2b]
test al, 0xfd
jne 0x4a0888
lea r11, [r8 + 1]
cmp dl, 0x2d
movsx eax, byte [r8 + 1]
je 0x4a0a24
cmp al, 0x2b
je 0x4a09e2
cmp al, 0x2d
je 0x4a08cc
lea edx, [rax - 0x30]
mov r10, r11
mov r9d, 1
cmp dl, 9
jbe 0x4a08e7
mov eax, dword [rsp + 0x48]
mov dword [0x00588a8c], eax
mov eax, dword [rsp + 0x44]
mov dword [0x00588a90], eax
jmp 0x4a0462
lea rcx, str.illegal_glutInit___reinitialization_attempt
call fcn.004a2310
mov eax, dword [r15]
jmp 0x49ffac
lea rcx, str.parameters_ambiguity___direct_and__indirect_cannot_be_both_specified
mov qword [rsp + 0xf0], rdx
mov dword [rsp + 0x4c], r8d
mov qword [rsp + 0x30], r10
call fcn.004a2310
mov rdx, qword [rsp + 0xf0]
mov r8d, dword [rsp + 0x4c]
mov r10, qword [rsp + 0x30]
jmp 0x4a0349
mov rdi, qword [rsp + 0x38]
xor eax, eax
mov ecx, 9
lea rdx, str.GLUT_ICON
mov rbx, qword [sym.imp.USER32.dll_LoadIconA]
rep stosq qword [rdi], rax
mov rax, qword [0x005d3ab0]
mov rcx, qword [0x00c89bc0]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x68], rcx
call rbx
mov dword [rsp + 0x50], 0x23
test rax, rax
mov qword [rsp + 0x70], rax
je 0x4a08a0
xor ecx, ecx
mov edx, 0x7f00
call qword [sym.imp.USER32.dll_LoadCursorA]
mov rcx, qword [rsp + 0x38]
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x78], rax
lea rax, [0x005b7836]
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x90], rax
call qword [sym.imp.USER32.dll_RegisterClassA]
test ax, ax
jne 0x4a01a6
lea r8, str.fghInitialize
lea rdx, str.Window_Class_Not_Registered
lea rcx, [0x005b7878]
call fcn.004a2310
jmp 0x4a01a6
lea rcx, str.fghInitialize:_CreateDC_failed__Screen_size_info_may_be_incorrect_nThis_is_quite_likely_caused_by_a_bad__display_parameter
call fcn.004a2400
jmp 0x4a027b
mov byte [0x00588aa6], 1
mov ebp, r15d
mov qword [r14], 0
sub dword [rdx], 1
jmp 0x4a0076
lea rcx, str.parameters_ambiguity___direct_and__indirect_cannot_be_both_specified
mov qword [rsp + 0xf0], rdx
mov dword [rsp + 0x4c], r8d
mov qword [rsp + 0x30], r10
call fcn.004a2310
mov rdx, qword [rsp + 0xf0]
mov r8d, dword [rsp + 0x4c]
mov r10, qword [rsp + 0x30]
jmp 0x4a03bc
mov dword [rsp + 0x48], 0
xor r9d, r9d
mov edx, eax
and edx, 0xffffffdf
cmp dl, 0x58
jne 0x4a086d
mov rax, qword [rsp + 0x28]
lea r11, [rax + 1]
movsx eax, byte [rax + 1]
cmp al, 0x2b
je 0x4a0924
cmp al, 0x2d
je 0x4a0535
lea ecx, [rax - 0x30]
mov rdx, r11
mov r10d, 1
cmp cl, 9
jbe 0x4a0554
jmp 0x4a0661
mov rdi, qword [rsp + 0x28]
movsx eax, byte [rdi + 1]
add rdi, 1
mov qword [rsp + 0x28], rdi
jmp 0x4a02b3
call sub.msvcrt.dll__strdup
test rax, rax
mov qword [0x00588b20], rax
jne 0x49ffd0
lea rcx, str.Could_not_allocate_space_for_the_programs_name.
call fcn.004a2310
jmp 0x49ffd0
mov dword [rsp + 0x44], 0
jmp 0x4a0599
mov qword [rsp + 0x28], 0
jmp 0x4a0102
test dl, dl
jne 0x4a0661
mov r9d, ebx
xor edx, edx
mov dword [0x00588a80], ecx
jmp 0x4a03ee
mov edx, 0x7f05
xor ecx, ecx
call rbx
mov qword [rsp + 0x70], rax
jmp 0x4a0710
lea eax, [rdx - 0x30]
mov r8, r10
mov r11d, 1
cmp al, 9
jbe 0x4a05ed
jmp 0x4a0661
movsx eax, byte [r8 + 2]
lea r10, [r8 + 2]
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x4a09d9
mov r9d, 0xffffffff
xor edx, edx
lea edx, [rdx + rdx*4]
add r10, 1
lea edx, [rax + rdx*2 - 0x30]
movsx eax, byte [r10]
lea r8d, [rax - 0x30]
cmp r8b, 9
jbe 0x4a08e9
cmp r9d, 0xffffffff
je 0x4a09db
cmp r10, r11
je 0x4a0661
or ebx, 2
movzx eax, byte [r10]
mov r9d, ebx
jmp 0x4a03dc
mov rax, qword [rsp + 0x28]
mov r10d, 1
lea rdx, [rax + 2]
movsx eax, byte [rax + 2]
lea ecx, [rax - 0x30]
cmp cl, 9
jbe 0x4a0554
mov qword [rsp + 0x28], rdx
mov dword [rsp + 0x44], 0
jmp 0x4a0589
cmp dl, 0x2b
je 0x4a0a04
cmp dl, 0x2d
je 0x4a0ab5
lea eax, [rdx - 0x30]
mov r8, r10
mov r11d, 1
cmp al, 9
ja 0x4a0661
xor eax, eax
lea eax, [rax + rax*4]
add r8, 1
lea eax, [rdx + rax*2 - 0x30]
movsx edx, byte [r8]
lea ecx, [rdx - 0x30]
cmp cl, 9
jbe 0x4a097d
mov ecx, eax
neg ecx
cmp r11d, 0xffffffff
je 0x4a0a7c
cmp r8, r10
je 0x4a0661
or r9d, 0x10
jmp 0x4a0615
mov rax, qword [rsp + 0x28]
mov r11d, 1
movsx edx, byte [rax + 2]
lea r8, [rax + 2]
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x4a05ed
xor ecx, ecx
jmp 0x4a0610
xor edx, edx
neg edx
jmp 0x4a090c
movsx eax, byte [r8 + 2]
lea r10, [r8 + 2]
mov r9d, 1
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x4a08e7
xor edx, edx
jmp 0x4a090c
movsx edx, byte [rdi + 2]
lea r8, [rdi + 2]
xor ecx, ecx
mov r11d, 1
lea eax, [rdx - 0x30]
cmp al, 9
jbe 0x4a097b
jmp 0x4a09a2
cmp al, 0x2b
je 0x4a0a9b
cmp al, 0x2d
je 0x4a0a83
lea edx, [rax - 0x30]
mov r10, r11
mov ebx, 1
cmp dl, 9
ja 0x4a0661
xor r8d, r8d
lea edx, [r8 + r8*4]
add r10, 1
lea r8d, [rax + rdx*2 - 0x30]
movsx eax, byte [r10]
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x4a0a43
mov edx, r8d
neg edx
cmp ebx, 0xffffffff
je 0x4a0ad7
cmp r10, r11
je 0x4a0661
mov ebx, r9d
or ebx, 0x21
jmp 0x4a0915
xor eax, eax
mov ecx, eax
jmp 0x4a09a2
movsx eax, byte [r8 + 2]
lea r10, [r8 + 2]
lea edx, [rax - 0x30]
cmp dl, 9
ja 0x4a0ad4
mov ebx, 0xffffffff
jmp 0x4a0a40
movsx eax, byte [r8 + 2]
lea r10, [r8 + 2]
mov ebx, 1
lea edx, [rax - 0x30]
cmp dl, 9
jbe 0x4a0a40
xor edx, edx
jmp 0x4a0a66
mov rax, qword [rsp + 0x28]
movsx edx, byte [rax + 2]
lea r8, [rax + 2]
lea eax, [rdx - 0x30]
cmp al, 9
ja 0x4a0a7a
mov r11d, 0xffffffff
jmp 0x4a097b
xor r8d, r8d
mov edx, r8d
jmp 0x4a0a66
mov qword [0x00c88600], r8
jmp 0x49ff80