Function at 0x684780
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov qword [rsp + 0xa8], r9
mov esi, ecx
mov r15, rdx
mov r13, r8
test r8, r8
je 0x684b3e
mov r9d, dword [0x0068ccac]
test r9d, r9d
je 0x6849e0
cmp dword [0x0068cc90], 0xffffffff
je 0x6849f4
mov eax, dword [0x0079aaf8]
test eax, eax
jne 0x6849f4
movzx edx, byte [r13]
cmp dl, 0x2d
je 0x684a23
mov r8d, dword [0x0068cc90]
test r8d, r8d
jne 0x6847f3
cmp dl, 0x2b
jne 0x684804
and dword [rsp + 0xb8], 0xfffffffe
cmp dl, 0x2b
je 0x684a2b
mov qword [0x0079aaf0], 0
test eax, eax
je 0x684827
mov dword [0x0068cc94], 0xffffffff
mov dword [0x0068cc98], 0xffffffff
mov edi, dword [rsp + 0xb8]
mov r12d, dword [rsp + 0xb8]
lea rbp, [0x006f3015]
and edi, 2
and r12d, 1
test eax, eax
je 0x6848ba
movsxd rbx, dword [0x0068ccac]
mov dword [0x0079aaf8], 0
cmp ebx, esi
jge 0x684b00
movsxd rax, ebx
mov r11, qword [r15 + rax*8]
cmp byte [r11], 0x2d
mov qword [0x0068cca0], r11
je 0x684a38
mov qword [0x0068cca0], rbp
test edi, edi
jne 0x684b60
test r12d, r12d
je 0x684b3e
mov r14d, dword [0x0068cc98]
cmp r14d, 0xffffffff
je 0x684aa0
mov edx, dword [0x0068cc94]
cmp edx, 0xffffffff
jne 0x684ab8
add ebx, 1
mov dword [0x0068ccac], ebx
mov r9, qword [0x0068cca0]
movzx r14d, byte [r9]
test r14b, r14b
je 0x684848
cmp qword [rsp + 0xa8], 0
je 0x6848fe
movsxd rax, dword [0x0068ccac]
cmp qword [r15 + rax*8], r9
je 0x6848fe
cmp r14b, 0x2d
je 0x684c8a
test byte [rsp + 0xb8], 4
jne 0x684b91
lea rbx, [r9 + 1]
movsx r12d, r14b
mov qword [0x0068cca0], rbx
cmp r14b, 0x3a
je 0x684c9c
cmp r12d, 0x2d
je 0x684de3
mov edx, r12d
mov rcx, r13
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strchr
mov r9, qword [rsp + 0x38]
test rax, rax
je 0x684c9c
cmp qword [rsp + 0xa8], 0
movzx edx, byte [rax + 1]
je 0x684c19
cmp r12d, 0x57
jne 0x684c19
cmp dl, 0x3b
jne 0x684c19
cmp byte [r9 + 1], 0
jne 0x684d6d
mov eax, dword [0x0068ccac]
add eax, 1
mov dword [0x0068ccac], eax
cmp eax, esi
jl 0x684d60
mov edx, dword [0x0068ccb0]
lea rax, [0x006f3015]
mov qword [0x0068cca0], rax
test edx, edx
je 0x6849b7
cmp byte [r13], 0x3a
je 0x6849b7
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call fcn.00684350
mov dword [0x0068cca8], 0x57
cmp byte [r13], 0x3a
je 0x684dd8
mov r12d, 0x3f
jmp 0x684b44
mov dword [0x0079aaf8], 1
mov dword [0x0068ccac], 1
lea rcx, str.POSIXLY_CORRECT
call sub.msvcrt.dll_getenv
movzx edx, byte [r13]
test rax, rax
setne al
movzx eax, al
mov dword [0x0068cc90], eax
mov eax, dword [0x0079aaf8]
cmp dl, 0x2d
jne 0x6847e2
or dword [rsp + 0xb8], 2
add r13, 1
jmp 0x684804
movzx r14d, byte [r11 + 1]
test r14b, r14b
jne 0x684c39
mov edx, 0x2d
mov rcx, r13
mov qword [rsp + 0x38], r11
call sub.msvcrt.dll_strchr
mov r11, qword [rsp + 0x38]
test rax, rax
je 0x684879
mov edi, dword [0x0068cc98]
cmp edi, 0xffffffff
je 0x684a7e
cmp dword [0x0068cc94], 0xffffffff
je 0x684d29
lea rbx, [r11 + 1]
mov qword [0x0068cca0], rbx
cmp byte [r11 + 1], 0
je 0x684bec
mov r12d, 0x2d
jmp 0x684caa
mov dword [0x0068cc98], ebx
add ebx, 1
mov dword [0x0068ccac], ebx
jmp 0x6848ba
mov ecx, r14d
mov r9, r15
mov r8d, ebx
mov dword [rsp + 0x38], edx
call fcn.00684290
mov ecx, dword [0x0068ccac]
mov edx, dword [rsp + 0x38]
mov dword [0x0068cc94], 0xffffffff
mov eax, ecx
sub edx, r14d
add ecx, 1
sub eax, edx
mov dword [0x0068ccac], ecx
mov dword [0x0068cc98], eax
mov eax, dword [0x0079aaf8]
jmp 0x684844
mov esi, dword [0x0068cc94]
lea rax, [0x006f3015]
mov edi, dword [0x0068cc98]
mov qword [0x0068cca0], rax
cmp esi, 0xffffffff
jne 0x684b78
cmp edi, 0xffffffff
je 0x684b2a
mov dword [0x0068ccac], edi
mov dword [0x0068cc94], 0xffffffff
mov dword [0x0068cc98], 0xffffffff
mov r12d, 0xffffffff
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add ebx, 1
mov qword [0x0079aaf0], r11
mov r12d, 1
mov dword [0x0068ccac], ebx
jmp 0x684b44
mov r9, r15
mov r8d, ebx
mov edx, esi
mov ecx, edi
sub esi, edi
call fcn.00684290
sub dword [0x0068ccac], esi
jmp 0x684b2a
xor eax, eax
cmp r14b, 0x3a
je 0x684bae
movsx edx, r14b
mov rcx, r13
call sub.msvcrt.dll_strchr
test rax, rax
setne al
movzx eax, al
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0xb0]
mov rdx, r13
mov rcx, r15
mov r8, qword [rsp + 0xa8]
call fcn.006843e0
mov r12d, eax
cmp eax, 0xffffffff
je 0x684ccd
lea rax, [0x006f3015]
mov qword [0x0068cca0], rax
jmp 0x684b44
mov edx, 0x2d
mov rcx, r13
mov qword [rsp + 0x38], r11
call sub.msvcrt.dll_strchr
mov r11, qword [rsp + 0x38]
test rax, rax
je 0x684b3e
movzx edx, byte [rax + 1]
mov r9, r11
mov r12d, 0x2d
cmp dl, 0x3a
je 0x684cee
cmp byte [r9 + 1], 0
jne 0x684b44
add dword [0x0068ccac], 1
jmp 0x684b44
mov edi, dword [0x0068cc98]
cmp edi, 0xffffffff
je 0x684c51
cmp dword [0x0068cc94], 0xffffffff
je 0x684d29
lea r9, [r11 + 1]
mov qword [0x0068cca0], r9
cmp r14b, 0x2d
jne 0x6848ce
cmp byte [r11 + 2], 0
je 0x684dfe
cmp qword [rsp + 0xa8], 0
je 0x684deb
cmp r9, qword [r15 + rbx*8]
je 0x6848fe
add r9, 1
xor eax, eax
mov qword [0x0068cca0], r9
jmp 0x684bae
cmp byte [r9 + 1], 0
jne 0x684caa
add dword [0x0068ccac], 1
mov ecx, dword [0x0068ccb0]
test ecx, ecx
je 0x684cbb
cmp byte [r13], 0x3a
jne 0x684cdd
mov dword [0x0068cca8], r12d
mov r12d, 0x3f
jmp 0x684b44
mov r9, qword [0x0068cca0]
movzx r14d, byte [r9]
jmp 0x6848fe
mov edx, r12d
lea rcx, str.unknown_option_____c
call fcn.00684350
jmp 0x684cbb
mov ecx, dword [0x0068ccac]
mov qword [0x0079aaf0], 0
cmp byte [r9 + 1], 0
lea edx, [rcx + 1]
je 0x684d3d
mov qword [0x0079aaf0], rbx
lea rax, [0x006f3015]
mov dword [0x0068ccac], edx
mov qword [0x0068cca0], rax
jmp 0x684b44
mov dword [0x0068cc94], ebx
test r14b, r14b
jne 0x684c51
jmp 0x684a7e
cmp byte [rax + 2], 0x3a
je 0x684d10
mov dword [0x0068ccac], edx
cmp esi, edx
jle 0x684d98
movsxd rdx, edx
mov rax, qword [r15 + rdx*8]
lea edx, [rcx + 2]
mov qword [0x0079aaf0], rax
jmp 0x684d10
cdqe
mov rax, qword [r15 + rax*8]
mov qword [0x0068cca0], rax
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0xb0]
mov rdx, r13
mov rcx, r15
mov r8, qword [rsp + 0xa8]
call fcn.006843e0
mov r12d, eax
jmp 0x684bd9
lea rax, [0x006f3015]
mov qword [0x0068cca0], rax
mov eax, dword [0x0068ccb0]
test eax, eax
je 0x684dc6
cmp byte [r13], 0x3a
je 0x684dc6
mov edx, r12d
lea rcx, str.option_requires_an_argument_____c
call fcn.00684350
mov dword [0x0068cca8], r12d
cmp byte [r13], 0x3a
jne 0x6849cc
mov r12d, 0x3a
jmp 0x684b44
mov r11, r9
jmp 0x684a89
lea rbx, [r11 + 2]
mov r11, r9
mov qword [0x0068cca0], rbx
jmp 0x684a89
mov esi, dword [0x0068cc94]
lea r8d, [rbx + 1]
lea rax, [0x006f3015]
mov dword [0x0068ccac], r8d
mov qword [0x0068cca0], rax
cmp esi, 0xffffffff
je 0x684b2a
mov r9, r15
jmp 0x684b7e