Function at 0x140004590
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 r14d, dword [rsp + 0xb8]
mov ebp, ecx
mov r15, rdx
mov r12, r8
mov r13, r9
test r8, r8
je 0x140004866
mov r9d, dword [0x1400fb0cc]
mov eax, dword [global_posixly_correct]
test r9d, r9d
je 0x140004760
cmp eax, 0xffffffff
je 0x140004774
mov edx, dword [0x14012e1b8]
test edx, edx
jne 0x140004774
movzx eax, byte [r12]
cmp al, 0x2d
je 0x1400047a7
mov r8d, dword [global_posixly_correct]
test r8d, r8d
jne 0x140004606
cmp al, 0x2b
jne 0x140004612
and r14d, 0xfffffffe
cmp al, 0x2b
je 0x1400047ab
mov qword [0x14012e1b0], 0
test edx, edx
je 0x1400046d9
mov dword [0x1400fb0b4], 0xffffffff
mov dword [0x1400fb0b8], 0xffffffff
nop dword [rax]
mov dword [0x14012e1b8], 0
mov ebx, dword [0x1400fb0cc]
cmp ebx, ebp
jge 0x140004828
movsxd rax, ebx
mov rsi, qword [r15 + rax*8]
cmp byte [rsi], 0x2d
mov qword [0x1400fb0c0], rsi
je 0x1400047b8
lea rax, [0x140100c28]
mov qword [0x1400fb0c0], rax
test r14b, 2
jne 0x140004880
test r14b, 1
je 0x140004866
mov esi, dword [0x1400fb0b8]
cmp esi, 0xffffffff
je 0x140004818
mov edi, dword [0x1400fb0b4]
cmp edi, 0xffffffff
je 0x1400046d0
mov edx, edi
mov r9, r15
mov r8d, ebx
mov ecx, esi
call dbg.permute_args
sub edi, esi
mov eax, ebx
mov dword [0x1400fb0b4], 0xffffffff
sub eax, edi
mov dword [0x1400fb0b8], eax
add ebx, 1
mov dword [0x1400fb0cc], ebx
mov rdi, qword [0x1400fb0c0]
movzx eax, byte [rdi]
test al, al
je 0x140004640
test r13, r13
je 0x14000470f
movsxd rdx, dword [0x1400fb0cc]
cmp qword [r15 + rdx*8], rdi
je 0x14000470f
cmp al, 0x2d
je 0x140004aeb
and r14d, 4
jne 0x1400048b3
lea rbx, [rdi + 1]
movsx r14d, al
mov qword [0x1400fb0c0], rbx
cmp al, 0x3a
jne 0x140004905
cmp byte [rdi + 1], 0
jne 0x140004733
add dword [0x1400fb0cc], 1
mov ecx, dword [0x1400fb0d0]
test ecx, ecx
je 0x140004748
cmp byte [r12], 0x3a
jne 0x140004a87
mov dword [0x1400fb0c8], r14d
mov r14d, 0x3f
jmp 0x14000486c
mov dword [0x14012e1b8], 1
mov dword [0x1400fb0cc], 1
xor edx, edx
xor r8d, r8d
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [0x14012e1b8]
test eax, eax
setne al
movzx eax, al
mov dword [global_posixly_correct], eax
movzx eax, byte [r12]
cmp al, 0x2d
jne 0x1400045f6
or r14d, 2
add r12, 1
jmp 0x140004612
movzx eax, byte [rsi + 1]
test al, al
jne 0x1400049f6
mov edx, 0x2d
mov rcx, r12
call sym.strchr
test rax, rax
je 0x14000466f
cmp dword [0x1400fb0b8], 0xffffffff
je 0x140004afd
cmp dword [0x1400fb0b4], 0xffffffff
je 0x140004ae0
lea rbx, [rsi + 1]
mov qword [0x1400fb0c0], rbx
cmp byte [rsi + 1], 0
je 0x1400049b4
mov r14d, 0x2d
jmp 0x140004733
mov dword [0x1400fb0b8], ebx
jmp 0x1400046d0
mov esi, dword [0x1400fb0b4]
lea rax, [0x140100c28]
mov edi, dword [0x1400fb0b8]
mov qword [0x1400fb0c0], rax
cmp esi, 0xffffffff
jne 0x140004898
cmp edi, 0xffffffff
je 0x140004852
mov dword [0x1400fb0cc], edi
mov dword [0x1400fb0b4], 0xffffffff
mov dword [0x1400fb0b8], 0xffffffff
mov r14d, 0xffffffff
mov eax, r14d
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 [0x14012e1b0], rsi
mov r14d, 1
mov dword [0x1400fb0cc], ebx
jmp 0x14000486c
mov edx, esi
sub esi, edi
mov r8d, ebx
mov r9, r15
mov ecx, edi
sub ebx, esi
call dbg.permute_args
mov dword [0x1400fb0cc], ebx
jmp 0x140004852
xor edx, edx
cmp al, 0x3a
je 0x1400048cc
movsx edx, al
mov rcx, r12
call sym.strchr
xor edx, edx
test rax, rax
setne dl
mov dword [rsp + 0x20], edx
mov r8, r13
mov rdx, r12
mov rcx, r15
mov r9, qword [rsp + 0xb0]
call dbg.parse_long_options
mov r14d, eax
cmp eax, 0xffffffff
je 0x140004a78
lea rax, [0x140100c28]
mov qword [0x1400fb0c0], rax
jmp 0x14000486c
cmp r14d, 0x2d
je 0x140004b0b
mov edx, r14d
mov rcx, r12
call sym.strchr
test rax, rax
je 0x140004726
movzx edx, byte [rax + 1]
test r13, r13
je 0x1400049d7
cmp r14d, 0x57
jne 0x1400049d7
cmp dl, 0x3b
jne 0x1400049d7
cmp byte [rdi + 1], 0
jne 0x140004b43
mov eax, dword [0x1400fb0cc]
add eax, 1
mov dword [0x1400fb0cc], eax
cmp eax, ebp
jl 0x140004b36
mov edx, dword [0x1400fb0d0]
lea rax, [0x140100c28]
mov qword [0x1400fb0c0], rax
test edx, edx
je 0x140004994
cmp byte [r12], 0x3a
je 0x140004994
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call dbg.warnx
mov dword [0x1400fb0c8], 0x57
cmp byte [r12], 0x3a
je 0x140004ba9
mov r14d, 0x3f
jmp 0x14000486c
mov edx, 0x2d
mov rcx, r12
call sym.strchr
test rax, rax
je 0x140004866
movzx edx, byte [rax + 1]
mov rdi, rsi
mov r14d, 0x2d
cmp dl, 0x3a
je 0x140004a9b
cmp byte [rdi + 1], 0
jne 0x14000486c
add dword [0x1400fb0cc], 1
jmp 0x14000486c
mov ecx, dword [0x1400fb0b8]
cmp ecx, 0xffffffff
je 0x140004a0e
cmp dword [0x1400fb0b4], 0xffffffff
je 0x140004ad5
lea rdi, [rsi + 1]
mov qword [0x1400fb0c0], rdi
cmp al, 0x2d
jne 0x1400046eb
cmp byte [rsi + 2], 0
jne 0x1400046eb
mov esi, dword [0x1400fb0b4]
add ebx, 1
lea rax, [0x140100c28]
mov dword [0x1400fb0cc], ebx
mov qword [0x1400fb0c0], rax
cmp esi, 0xffffffff
je 0x140004852
mov r8d, ebx
mov edx, esi
mov r9, r15
mov dword [rsp + 0x3c], ecx
call dbg.permute_args
mov ecx, dword [rsp + 0x3c]
sub esi, ecx
sub ebx, esi
mov dword [0x1400fb0cc], ebx
jmp 0x140004852
mov rdi, qword [0x1400fb0c0]
movzx eax, byte [rdi]
jmp 0x14000470f
mov edx, r14d
lea rcx, str.unknown_option_____c
call dbg.warnx
jmp 0x140004748
mov qword [0x14012e1b0], 0
cmp byte [rdi + 1], 0
mov edx, dword [0x1400fb0cc]
je 0x140004b13
mov qword [0x14012e1b0], rbx
lea rax, [0x140100c28]
add edx, 1
mov qword [0x1400fb0c0], rax
mov dword [0x1400fb0cc], edx
jmp 0x14000486c
mov dword [0x1400fb0b4], ebx
jmp 0x140004a0e
mov dword [0x1400fb0b4], ebx
jmp 0x1400047f4
add rdi, 1
xor edx, edx
mov qword [0x1400fb0c0], rdi
jmp 0x1400048cc
lea rbx, [rsi + 1]
mov rdi, rsi
mov qword [0x1400fb0c0], rbx
mov rsi, rdi
jmp 0x1400047ff
cmp byte [rax + 2], 0x3a
je 0x140004ab9
add edx, 1
mov dword [0x1400fb0cc], edx
cmp ebp, edx
jle 0x140004b69
movsxd rax, edx
mov rax, qword [r15 + rax*8]
mov qword [0x14012e1b0], rax
jmp 0x140004ab9
cdqe
mov rax, qword [r15 + rax*8]
mov qword [0x1400fb0c0], rax
mov dword [rsp + 0x20], 0
mov r8, r13
mov rdx, r12
mov rcx, r15
mov r9, qword [rsp + 0xb0]
call dbg.parse_long_options
mov r14d, eax
jmp 0x1400048f2
lea rax, [0x140100c28]
mov qword [0x1400fb0c0], rax
mov eax, dword [0x1400fb0d0]
test eax, eax
je 0x140004b97
cmp byte [r12], 0x3a
je 0x140004b97
mov edx, r14d
lea rcx, str.option_requires_an_argument_____c
call dbg.warnx
mov dword [0x1400fb0c8], r14d
cmp byte [r12], 0x3a
jne 0x1400049a9
mov r14d, 0x3a
jmp 0x14000486c