Function at 0x46cea0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
test r8, r8
mov ebp, ecx
mov rdi, rdx
mov qword [rsp + 0x90], r8
mov qword [rsp + 0x98], r9
je 0x46d1aa
mov r9d, dword [0x0047a02c]
test r9d, r9d
je 0x46d0f0
cmp dword [0x0047a010], 0xffffffff
je 0x46d104
mov edx, dword [0x004ac228]
test edx, edx
jne 0x46d104
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax]
cmp al, 0x2d
je 0x46d138
mov r8d, dword [global_posixly_correct]
test r8d, r8d
jne 0x46d1c0
cmp al, 0x2b
je 0x46d1c0
sub eax, 0x2b
test al, 0xfd
je 0x46d140
test edx, edx
mov qword [0x004ac220], 0
je 0x46cf52
mov dword [0x0047a014], 0xffffffff
mov dword [0x0047a018], 0xffffffff
mov r13d, dword [rsp + 0xa8]
mov r12d, dword [rsp + 0xa8]
and r13d, 2
and r12d, 1
jmp 0x46cff1
lea rax, [0x0048d935]
test r13d, r13d
mov edx, r13d
mov qword [0x0047a020], rax
jne 0x46d1d0
test r12d, r12d
je 0x46d1aa
mov r14d, dword [0x0047a018]
cmp r14d, 0xffffffff
je 0x46d150
mov r15d, dword [0x0047a014]
cmp r15d, 0xffffffff
je 0x46cfe8
mov edx, r15d
mov ecx, r14d
mov r9, rdi
mov r8d, ebx
call dbg.permute_args
mov esi, dword [0x0047a02c]
mov eax, r15d
mov edx, dword [0x004ac228]
sub eax, r14d
mov dword [0x0047a014], 0xffffffff
mov ecx, esi
sub ecx, eax
mov dword [0x0047a018], ecx
add esi, 1
mov dword [0x0047a02c], esi
test edx, edx
jne 0x46d009
mov rsi, qword [0x0047a020]
movzx r15d, byte [rsi]
test r15b, r15b
jne 0x46d220
movsxd rbx, dword [0x0047a02c]
mov dword [0x004ac228], 0
cmp ebx, ebp
mov esi, ebx
jge 0x46d160
movsxd rax, ebx
mov r14, qword [rdi + rax*8]
cmp byte [r14], 0x2d
mov qword [0x0047a020], r14
jne 0x46cf70
movzx r15d, byte [r14 + 1]
test r15b, r15b
jne 0x46d1fa
mov rcx, qword [rsp + 0x90]
mov edx, 0x2d
call sym.strchr
test rax, rax
je 0x46cf70
mov r12d, dword [0x0047a018]
cmp r12d, 0xffffffff
je 0x46d459
cmp dword [0x0047a014], 0xffffffff
je 0x46d412
test r15b, r15b
jne 0x46d20b
lea r12, [r14 + 1]
mov qword [0x0047a020], r12
cmp byte [r14 + 1], 0
jne 0x46d40b
mov rcx, qword [rsp + 0x90]
mov edx, 0x2d
call sym.strchr
test rax, rax
je 0x46d1aa
mov rsi, r14
mov ebx, 0x2d
movzx edx, byte [rax + 1]
cmp dl, 0x3a
je 0x46d41d
cmp byte [rsi + 1], 0
mov eax, ebx
jne 0x46d1af
add dword [0x0047a02c], 1
jmp 0x46d1af
mov dword [0x004ac228], 1
mov dword [0x0047a02c], 1
lea rcx, str.POSIXLY_CORRECT
call sym.getenv
test rax, rax
mov edx, dword [0x004ac228]
setne al
movzx eax, al
mov dword [global_posixly_correct], eax
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax]
cmp al, 0x2d
jne 0x46cf0c
or dword [rsp + 0xa8], 2
add qword [rsp + 0x90], 1
jmp 0x46cf2f
mov dword [0x0047a018], ebx
jmp 0x46cfe8
mov esi, dword [0x0047a014]
lea rax, [0x0048d935]
mov qword [0x0047a020], rax
cmp esi, 0xffffffff
je 0x46d1e7
mov ebp, dword [0x0047a018]
mov edx, esi
mov r9, rdi
mov r8d, ebx
mov ecx, ebp
sub esi, ebp
call dbg.permute_args
sub dword [0x0047a02c], esi
mov dword [0x0047a014], 0xffffffff
mov dword [0x0047a018], 0xffffffff
mov eax, 0xffffffff
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
and dword [rsp + 0xa8], 0xfffffffe
jmp 0x46cf24
add ebx, 1
mov qword [0x004ac220], r14
mov eax, 1
mov dword [0x0047a02c], ebx
jmp 0x46d1af
mov eax, dword [0x0047a018]
cmp eax, 0xffffffff
je 0x46d196
mov dword [0x0047a02c], eax
jmp 0x46d196
mov r12d, dword [0x0047a018]
cmp r12d, 0xffffffff
jne 0x46d076
lea rsi, [r14 + 1]
cmp r15b, 0x2d
mov qword [0x0047a020], rsi
je 0x46d3d5
cmp qword [rsp + 0x98], 0
je 0x46d2b9
movsxd rax, dword [0x0047a02c]
cmp qword [rdi + rax*8], rsi
je 0x46d2b9
cmp r15b, 0x2d
je 0x46d3f9
test byte [rsp + 0xa8], 4
je 0x46d2b9
xor eax, eax
cmp r15b, 0x3a
je 0x46d272
mov rcx, qword [rsp + 0x90]
movsx edx, r15b
call sym.strchr
test rax, rax
setne al
movzx eax, al
mov r9, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x98]
mov rcx, rdi
mov rdx, qword [rsp + 0x90]
mov dword [rsp + 0x20], eax
call dbg.parse_long_options
cmp eax, 0xffffffff
je 0x46d2ae
lea rdi, [0x0048d935]
mov qword [0x0047a020], rdi
jmp 0x46d1af
mov rsi, qword [0x0047a020]
movzx r15d, byte [rsi]
lea r12, [rsi + 1]
movsx ebx, r15b
cmp ebx, 0x3a
mov qword [0x0047a020], r12
je 0x46d393
cmp ebx, 0x2d
je 0x46d467
mov rcx, qword [rsp + 0x90]
mov edx, ebx
call sym.strchr
test rax, rax
je 0x46d393
cmp qword [rsp + 0x98], 0
je 0x46d0c5
cmp ebx, 0x57
jne 0x46d0c5
movzx edx, byte [rax + 1]
cmp dl, 0x3b
jne 0x46d0c9
cmp byte [rsi + 1], 0
jne 0x46d4ee
mov eax, dword [0x0047a02c]
add eax, 1
cmp ebp, eax
mov dword [0x0047a02c], eax
jg 0x46d4e1
mov edx, dword [0x0047a030]
lea rax, [0x0048d935]
mov qword [0x0047a020], rax
test edx, edx
je 0x46d36e
mov rax, qword [rsp + 0x90]
cmp byte [rax], 0x3a
je 0x46d36e
lea rcx, str.option_requires_an_argument_____c
mov edx, 0x57
call dbg.warnx
mov rax, qword [rsp + 0x90]
mov dword [0x0047a028], 0x57
cmp byte [rax], 0x3a
je 0x46d4d7
mov eax, 0x3f
jmp 0x46d1af
cmp byte [rsi + 1], 0
jne 0x46d3a0
add dword [0x0047a02c], 1
mov ecx, dword [0x0047a030]
test ecx, ecx
je 0x46d3c5
mov rax, qword [rsp + 0x90]
cmp byte [rax], 0x3a
je 0x46d3c5
lea rcx, str.unknown_option_____c
mov edx, ebx
call dbg.warnx
mov dword [0x0047a028], ebx
mov eax, 0x3f
jmp 0x46d1af
cmp byte [r14 + 2], 0
je 0x46d52e
cmp qword [rsp + 0x98], 0
je 0x46d571
cmp rsi, qword [rdi + rbx*8]
je 0x46d2b9
add rsi, 1
xor eax, eax
mov qword [0x0047a020], rsi
jmp 0x46d272
mov ebx, 0x2d
jmp 0x46d3a0
mov dword [0x0047a014], ebx
jmp 0x46d083
mov qword [0x004ac220], 0
cmp byte [rsi + 1], 0
je 0x46d470
mov eax, dword [0x0047a02c]
mov qword [0x004ac220], r12
lea rdi, [0x0048d935]
add eax, 1
mov dword [0x0047a02c], eax
mov eax, ebx
mov qword [0x0047a020], rdi
jmp 0x46d1af
lea r12, [r14 + 1]
mov rsi, r14
mov qword [0x0047a020], r12
mov r14, rsi
jmp 0x46d097
cmp byte [rax + 2], 0x3a
mov eax, dword [0x0047a02c]
je 0x46d43b
add eax, 1
cmp ebp, eax
mov dword [0x0047a02c], eax
jg 0x46d51b
lea rax, [0x0048d935]
mov qword [0x0047a020], rax
mov eax, dword [0x0047a030]
test eax, eax
je 0x46d4c0
mov rax, qword [rsp + 0x90]
cmp byte [rax], 0x3a
je 0x46d4c0
lea rcx, str.option_requires_an_argument_____c
mov edx, ebx
call dbg.warnx
mov rax, qword [rsp + 0x90]
mov dword [0x0047a028], ebx
cmp byte [rax], 0x3a
jne 0x46d389
mov eax, 0x3a
jmp 0x46d1af
cdqe
mov rax, qword [rdi + rax*8]
mov qword [0x0047a020], rax
mov r9, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x98]
mov rcx, rdi
mov rdx, qword [rsp + 0x90]
mov dword [rsp + 0x20], 0
call dbg.parse_long_options
jmp 0x46d29b
movsxd rdx, eax
mov rdx, qword [rdi + rdx*8]
mov qword [0x004ac220], rdx
jmp 0x46d43b
mov esi, dword [0x0047a014]
lea r8d, [rbx + 1]
lea rax, [0x0048d935]
mov dword [0x0047a02c], r8d
mov qword [0x0047a020], rax
cmp esi, 0xffffffff
je 0x46d196
mov edx, esi
mov r9, rdi
mov ecx, r12d
call dbg.permute_args
sub esi, r12d
sub dword [0x0047a02c], esi
jmp 0x46d196
lea r12, [r14 + 2]
mov r14, rsi
mov qword [0x0047a020], r12
jmp 0x46d097