Function at 0x14005c780
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 r15d, dword [rsp + 0xb8]
mov r12d, ecx
mov rbp, rdx
mov r13, r8
mov r14, r9
test r8, r8
je 0x14005cb26
mov r9d, dword [0x140071c3c]
mov eax, dword [global_posixly_correct]
test r9d, r9d
je 0x14005c9b0
cmp eax, 0xffffffff
je 0x14005c9c4
mov edx, dword [0x140082e78]
test edx, edx
jne 0x14005c9c4
movzx eax, byte [r13]
cmp al, 0x2d
je 0x14005c9f7
mov r8d, dword [global_posixly_correct]
test r8d, r8d
jne 0x14005cad0
cmp al, 0x2b
je 0x14005cbc0
mov qword [0x140082e70], 0
test edx, edx
je 0x14005c8c4
mov dword [0x140071c24], 0xffffffff
mov dword [0x140071c28], 0xffffffff
nop word cs:[rax + rax]
mov dword [0x140082e78], 0
mov ebx, dword [0x140071c3c]
cmp ebx, r12d
jge 0x14005cae8
movsxd rax, ebx
mov rsi, qword [rbp + rax*8]
cmp byte [rsi], 0x2d
je 0x14005ca08
lea rax, [0x140078a28]
mov qword [0x140071c30], rax
test r15b, 2
jne 0x14005cb40
test r15b, 1
je 0x14005cb26
mov esi, dword [0x140071c28]
cmp esi, 0xffffffff
je 0x14005cac0
mov edi, dword [0x140071c24]
cmp edi, 0xffffffff
je 0x14005c8bb
mov edx, edi
mov r9, rbp
mov r8d, ebx
mov ecx, esi
call dbg.permute_args
sub edi, esi
mov eax, ebx
mov dword [0x140071c24], 0xffffffff
sub eax, edi
mov dword [0x140071c28], eax
add ebx, 1
mov dword [0x140071c3c], ebx
mov rdi, qword [0x140071c30]
movzx eax, byte [rdi]
test al, al
je 0x14005c830
test r14, r14
je 0x14005c946
movsxd rdx, dword [0x140071c3c]
cmp qword [rbp + rdx*8], rdi
je 0x14005c946
cmp al, 0x2d
je 0x14005cc63
and r15d, 4
je 0x14005cb72
cmp al, 0x3a
je 0x14005cc6e
movsx edx, al
mov rcx, r13
call sym.strchr
test rax, rax
setne al
movzx eax, al
mov dword [rsp + 0x20], eax
mov r8, r14
mov rdx, r13
mov rcx, rbp
mov r9, qword [rsp + 0xb0]
call dbg.parse_long_options
mov ebx, eax
cmp eax, 0xffffffff
jne 0x14005cd26
mov rdi, qword [0x140071c30]
movzx eax, byte [rdi]
lea r15, [rdi + 1]
movsx ebx, al
mov qword [0x140071c30], r15
cmp al, 0x3a
je 0x14005cb88
cmp ebx, 0x2d
je 0x14005ca53
mov edx, ebx
mov rcx, r13
call sym.strchr
test rax, rax
je 0x14005cb88
movzx edx, byte [rax + 1]
test r14, r14
je 0x14005c98f
cmp ebx, 0x57
jne 0x14005c98f
cmp dl, 0x3b
je 0x14005cc75
cmp dl, 0x3a
je 0x14005ca7d
cmp byte [rdi + 1], 0
jne 0x14005cb2b
add dword [0x140071c3c], 1
jmp 0x14005cb2b
mov dword [0x140082e78], 1
mov dword [0x140071c3c], 1
xor edx, edx
xor r8d, r8d
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [0x140082e78]
test eax, eax
setne al
movzx eax, al
mov dword [global_posixly_correct], eax
movzx eax, byte [r13]
cmp al, 0x2d
jne 0x14005c7e7
or r15d, 2
add r13, 1
jmp 0x14005c7ff
movzx eax, byte [rsi + 1]
test al, al
jne 0x14005cbc9
mov edx, 0x2d
mov rcx, r13
call sym.strchr
test rax, rax
je 0x14005c85a
cmp dword [0x140071c28], 0xffffffff
je 0x14005ca40
cmp dword [0x140071c24], 0xffffffff
je 0x14005cce2
lea r15, [rsi + 1]
mov rdi, rsi
mov ebx, 0x2d
mov qword [0x140071c30], r15
cmp byte [rdi + 1], 0
jne 0x14005cb95
mov edx, 0x2d
mov rcx, r13
call sym.strchr
test rax, rax
je 0x14005cb26
cmp byte [rax + 1], 0x3a
jne 0x14005c9a2
mov qword [0x140082e70], 0
cmp byte [rdi + 1], 0
mov edx, dword [0x140071c3c]
je 0x14005cd39
mov qword [0x140082e70], r15
lea rax, [0x140078a28]
add edx, 1
mov qword [0x140071c30], rax
mov dword [0x140071c3c], edx
jmp 0x14005cb2b
mov dword [0x140071c28], ebx
jmp 0x14005c8bb
and r15d, 0xfffffffe
cmp al, 0x2b
jne 0x14005c7ff
jmp 0x14005c9fb
mov esi, dword [0x140071c24]
lea rax, [0x140078a28]
mov edi, dword [0x140071c28]
mov qword [0x140071c30], rax
cmp esi, 0xffffffff
jne 0x14005cb57
cmp edi, 0xffffffff
je 0x14005cb12
mov dword [0x140071c3c], edi
mov dword [0x140071c24], 0xffffffff
mov dword [0x140071c28], 0xffffffff
mov ebx, 0xffffffff
mov eax, ebx
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 [0x140082e70], rsi
mov dword [0x140071c3c], ebx
mov ebx, 1
jmp 0x14005cb2b
mov edx, esi
sub esi, edi
mov r8d, ebx
mov r9, rbp
mov ecx, edi
sub ebx, esi
call dbg.permute_args
mov dword [0x140071c3c], ebx
jmp 0x14005cb12
lea r15, [rdi + 1]
movsx ebx, al
mov qword [0x140071c30], r15
cmp al, 0x3a
jne 0x14005c965
cmp byte [rdi + 1], 0
jne 0x14005cb95
add dword [0x140071c3c], 1
mov ecx, dword [0x140071c40]
test ecx, ecx
je 0x14005cbaa
cmp byte [r13], 0x3a
jne 0x14005cc50
mov dword [0x140071c38], ebx
mov ebx, 0x3f
jmp 0x14005cb2b
and r15d, 0xfffffffe
jmp 0x14005c9fb
mov ecx, dword [0x140071c28]
cmp ecx, 0xffffffff
je 0x14005cbe1
cmp dword [0x140071c24], 0xffffffff
je 0x14005cced
lea rdi, [rsi + 1]
mov qword [0x140071c30], rdi
cmp al, 0x2d
jne 0x14005c8d6
cmp byte [rsi + 2], 0
jne 0x14005c8d6
mov esi, dword [0x140071c24]
add ebx, 1
lea rax, [0x140078a28]
mov dword [0x140071c3c], ebx
mov qword [0x140071c30], rax
cmp esi, 0xffffffff
je 0x14005cb12
mov r8d, ebx
mov edx, esi
mov r9, rbp
mov dword [rsp + 0x3c], ecx
call dbg.permute_args
mov ecx, dword [rsp + 0x3c]
sub esi, ecx
sub ebx, esi
mov dword [0x140071c3c], ebx
jmp 0x14005cb12
mov edx, ebx
lea rcx, str.unknown_option_____c
call dbg.warnx
jmp 0x14005cbaa
add rdi, 1
mov qword [0x140071c30], rdi
xor eax, eax
jmp 0x14005c917
cmp byte [rdi + 1], 0
jne 0x14005cd06
mov eax, dword [0x140071c3c]
add eax, 1
mov dword [0x140071c3c], eax
cmp eax, r12d
jl 0x14005ccf8
mov edx, dword [0x140071c40]
lea rax, [0x140078a28]
mov qword [0x140071c30], rax
test edx, edx
je 0x14005ccc3
cmp byte [r13], 0x3a
je 0x14005ccc3
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call dbg.warnx
mov dword [0x140071c38], 0x57
cmp byte [r13], 0x3a
jne 0x14005cbb0
mov ebx, 0x3a
jmp 0x14005cb2b
mov dword [0x140071c24], ebx
jmp 0x14005ca40
mov dword [0x140071c24], ebx
jmp 0x14005cbe1
cdqe
mov rax, qword [rbp + rax*8]
mov qword [0x140071c30], rax
mov dword [rsp + 0x20], 0
mov r8, r14
mov rdx, r13
mov rcx, rbp
mov r9, qword [rsp + 0xb0]
call dbg.parse_long_options
mov ebx, eax
lea rax, [0x140078a28]
mov qword [0x140071c30], rax
jmp 0x14005cb2b
cmp byte [rax + 2], 0x3a
je 0x14005ca9f
add edx, 1
mov dword [0x140071c3c], edx
cmp r12d, edx
jle 0x14005cd65
movsxd rax, edx
mov rax, qword [rbp + rax*8]
mov qword [0x140082e70], rax
jmp 0x14005ca9f
lea rax, [0x140078a28]
mov qword [0x140071c30], rax
mov eax, dword [0x140071c40]
test eax, eax
je 0x14005cd92
cmp byte [r13], 0x3a
je 0x14005cd92
mov edx, ebx
lea rcx, str.option_requires_an_argument_____c
call dbg.warnx
mov dword [0x140071c38], ebx
cmp byte [r13], 0x3a
jne 0x14005cbb0
jmp 0x14005ccd8