Function at 0x140002439
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 edi, dword [rsp + 0xb8]
mov r12d, ecx
mov rsi, rdx
mov rbx, r8
mov rbp, r9
test r8, r8
je 0x14000295a
cmp dword [0x14000d03c], 0
jne 0x140002482
mov dword [0x140014da8], 1
mov dword [0x14000d03c], 1
cmp dword [0x14000d020], 0xffffffff
je 0x140002494
cmp dword [0x140014da8], 0
je 0x1400024b4
xor r8d, r8d
xor edx, edx
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
setne al
movzx eax, al
mov dword [0x14000d020], eax
mov al, byte [rbx]
cmp al, 0x2d
jne 0x1400024bf
or edi, 2
jmp 0x1400024cf
cmp dword [0x14000d020], 0
jne 0x1400024cc
cmp al, 0x2b
jne 0x1400024cf
and edi, 0xfffffffe
sub eax, 0x2b
and eax, 0xfffffffd
cmp al, 1
adc rbx, 0
xor r9d, r9d
cmp dword [0x140014da8], 0
mov qword [0x140014da0], r9
je 0x140002502
mov dword [0x14000d024], 0xffffffff
mov dword [0x14000d028], 0xffffffff
mov eax, edi
lea r13, [0x140010706]
and eax, 2
mov dword [rsp + 0x34], eax
mov eax, edi
and eax, 1
mov dword [rsp + 0x38], eax
cmp dword [0x140014da8], 0
jne 0x140002534
mov rax, qword [0x14000d030]
cmp byte [rax], 0
jne 0x14000270b
mov r14d, dword [0x14000d03c]
xor r8d, r8d
mov dword [0x140014da8], r8d
cmp r14d, r12d
jl 0x1400025a9
mov ebx, dword [0x14000d024]
lea rax, [0x140010706]
mov edi, dword [0x14000d028]
mov qword [0x14000d030], rax
cmp ebx, 0xffffffff
je 0x140002585
mov edx, ebx
sub ebx, edi
mov r8d, r14d
mov r9, rsi
mov ecx, edi
sub r14d, ebx
call fcn.140002050
mov r8d, r14d
jmp 0x1400026ff
cmp edi, 0xffffffff
je 0x140002590
mov dword [0x14000d03c], edi
mov dword [0x14000d024], 0xffffffff
mov dword [0x14000d028], 0xffffffff
jmp 0x14000295a
movsxd rax, r14d
mov r15, qword [rsi + rax*8]
cmp byte [r15], 0x2d
mov qword [0x14000d030], r15
jne 0x1400025ea
mov r10b, byte [r15 + 1]
test r10b, r10b
jne 0x140002680
mov edx, 0x2d
mov rcx, rbx
mov byte [rsp + 0x3c], r10b
call sub.msvcrt.dll_strchr
mov r10b, byte [rsp + 0x3c]
test rax, rax
jne 0x140002680
cmp dword [rsp + 0x34], 0
mov qword [0x14000d030], r13
je 0x140002614
lea r8d, [r14 + 1]
mov qword [0x140014da0], r15
mov edi, 1
mov dword [0x14000d03c], r8d
jmp 0x14000295d
cmp dword [rsp + 0x38], 0
je 0x14000295a
mov r15d, dword [0x14000d028]
cmp r15d, 0xffffffff
jne 0x140002635
mov dword [0x14000d028], r14d
jmp 0x140002670
mov eax, dword [0x14000d024]
cmp eax, 0xffffffff
je 0x140002670
mov edx, eax
mov r9, rsi
mov r8d, r14d
mov ecx, r15d
mov dword [rsp + 0x3c], eax
call fcn.140002050
mov eax, dword [rsp + 0x3c]
mov edx, r14d
mov dword [0x14000d024], 0xffffffff
sub eax, r15d
sub edx, eax
mov dword [0x14000d028], edx
lea r8d, [r14 + 1]
mov dword [0x14000d03c], r8d
jmp 0x14000251b
mov r13d, dword [0x14000d028]
cmp r13d, 0xffffffff
je 0x14000269d
cmp dword [0x14000d024], 0xffffffff
jne 0x14000269d
mov dword [0x14000d024], r14d
test r10b, r10b
je 0x14000270b
lea rax, [r15 + 1]
mov qword [0x14000d030], rax
cmp r10b, 0x2d
jne 0x14000270b
cmp byte [r15 + 2], 0
jne 0x14000270b
mov edi, dword [0x14000d024]
lea r8d, [r14 + 1]
lea rax, [0x140010706]
mov dword [0x14000d03c], r8d
mov qword [0x14000d030], rax
cmp edi, 0xffffffff
je 0x140002590
mov edx, edi
mov r9, rsi
mov ecx, r13d
mov dword [rsp + 0x34], r8d
call fcn.140002050
mov r8d, dword [rsp + 0x34]
sub edi, r13d
sub r8d, edi
mov dword [0x14000d03c], r8d
jmp 0x140002590
mov rax, qword [0x14000d030]
movsx edx, byte [rax]
test rbp, rbp
je 0x14000278d
movsxd rcx, dword [0x14000d03c]
cmp qword [rsi + rcx*8], rax
je 0x14000278d
cmp dl, 0x2d
je 0x140002733
and edi, 4
jne 0x14000273f
jmp 0x14000278d
inc rax
mov qword [0x14000d030], rax
jmp 0x140002744
cmp dl, 0x3a
jne 0x140002748
xor eax, eax
jmp 0x140002759
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
setne al
movzx eax, al
mov dword [rsp + 0x20], eax
mov r8, rbp
mov rdx, rbx
mov rcx, rsi
mov r9, qword [rsp + 0xb0]
call fcn.140002163
mov edi, eax
cmp eax, 0xffffffff
je 0x14000278d
lea rax, [0x140010706]
mov qword [0x14000d030], rax
jmp 0x14000295d
mov r13, qword [0x14000d030]
movsx edi, byte [r13]
lea r14, [r13 + 1]
mov qword [0x14000d030], r14
cmp edi, 0x3a
je 0x1400027d5
cmp edi, 0x2d
jne 0x1400027b5
cmp byte [r13 + 1], 0
jne 0x1400027e2
mov edx, edi
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x140002806
cmp edi, 0x2d
jne 0x1400027d5
cmp byte [r13 + 1], 0
jne 0x1400027e2
jmp 0x14000295a
cmp byte [r13 + 1], 0
jne 0x1400027e2
inc dword [0x14000d03c]
cmp dword [0x14000d040], 0
je 0x1400027fe
cmp byte [rbx], 0x3a
je 0x1400027fe
mov edx, edi
lea rcx, str.unknown_option_____c
call fcn.1400020dc
mov dword [0x14000d038], edi
jmp 0x140002883
mov dl, byte [rax + 1]
test rbp, rbp
je 0x1400028c4
cmp edi, 0x57
jne 0x1400028c4
cmp dl, 0x3b
jne 0x1400028c4
cmp byte [r13 + 1], 0
lea r13, [0x140010706]
jne 0x14000289a
mov eax, dword [0x14000d03c]
inc eax
mov dword [0x14000d03c], eax
cmp eax, r12d
jl 0x14000288d
cmp dword [0x14000d040], 0
mov qword [0x14000d030], r13
je 0x14000286b
cmp byte [rbx], 0x3a
je 0x14000286b
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call fcn.1400020dc
mov dword [0x14000d038], 0x57
cmp byte [rbx], 0x3a
mov edi, 0x3a
je 0x14000295d
mov edi, 0x3f
jmp 0x14000295d
cdqe
mov rax, qword [rsi + rax*8]
mov qword [0x14000d030], rax
xor ecx, ecx
mov r9, qword [rsp + 0xb0]
mov r8, rbp
mov rdx, rbx
mov dword [rsp + 0x20], ecx
mov rcx, rsi
call fcn.140002163
mov qword [0x14000d030], r13
mov edi, eax
jmp 0x14000295d
cmp dl, 0x3a
je 0x1400028d6
cmp byte [r13 + 1], 0
jne 0x14000295d
jmp 0x140002952
xor edx, edx
lea rcx, [0x140010706]
mov qword [0x140014da0], rdx
cmp byte [r13 + 1], 0
mov edx, dword [0x14000d03c]
je 0x1400028fc
mov qword [0x140014da0], r14
jmp 0x14000294b
cmp byte [rax + 2], 0x3a
je 0x14000294b
lea eax, [rdx + 1]
mov dword [0x14000d03c], eax
cmp r12d, eax
jg 0x14000293e
cmp dword [0x14000d040], 0
mov qword [0x14000d030], rcx
je 0x140002933
cmp byte [rbx], 0x3a
je 0x140002933
mov edx, edi
lea rcx, str.option_requires_an_argument_____c
call fcn.1400020dc
mov dword [0x14000d038], edi
jmp 0x140002875
cdqe
mov rax, qword [rsi + rax*8]
mov qword [0x140014da0], rax
mov qword [0x14000d030], rcx
inc dword [0x14000d03c]
jmp 0x14000295d
or edi, 0xffffffff
mov eax, edi
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret