Function at 0x499900
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
test r8, r8
mov esi, ecx
mov rbx, rdx
mov r13, r8
mov qword [rsp + 0xa8], r9
je 0x499c0c
mov r9d, dword [0x004a014c]
test r9d, r9d
je 0x499a60
cmp dword [0x004a0130], 0xffffffff
je 0x499a74
mov eax, dword [0x004d8488]
test eax, eax
jne 0x499a74
movzx edx, byte [r13]
cmp dl, 0x2d
je 0x499aa3
mov r8d, dword [global_posixly_correct]
test r8d, r8d
jne 0x499c24
cmp dl, 0x2b
je 0x499c24
sub edx, 0x2b
and edx, 0xfd
je 0x499aab
test eax, eax
mov qword [0x004d8480], 0
je 0x4999ad
mov dword [0x004a0134], 0xffffffff
mov dword [0x004a0138], 0xffffffff
mov edi, dword [rsp + 0xb8]
mov r12d, dword [rsp + 0xb8]
lea rbp, [0x004d0d35]
and edi, 2
and r12d, 1
nop word [rax + rax]
test eax, eax
jne 0x4999e8
mov r10, qword [0x004a0140]
movzx r14d, byte [r10]
test r14b, r14b
jne 0x499ca0
movsxd r8, dword [0x004a014c]
mov dword [0x004d8488], 0
cmp r8d, esi
jge 0x499c31
movsxd rax, r8d
mov r15, qword [rbx + rax*8]
cmp byte [r15], 0x2d
mov qword [0x004a0140], r15
je 0x499b20
test edi, edi
mov qword [0x004a0140], rbp
jne 0x499c63
test r12d, r12d
je 0x499c0c
mov r14d, dword [0x004a0138]
cmp r14d, 0xffffffff
je 0x499b00
mov r15d, dword [0x004a0134]
cmp r15d, 0xffffffff
jne 0x499ab4
add r8d, 1
mov dword [0x004a014c], r8d
jmp 0x4999d4
mov dword [0x004d8488], 1
mov dword [0x004a014c], 1
lea rcx, str.POSIXLY_CORRECT
call sym.getenv
movzx edx, byte [r13]
test rax, rax
setne al
movzx eax, al
mov dword [global_posixly_correct], eax
mov eax, dword [0x004d8488]
cmp dl, 0x2d
jne 0x499962
or dword [rsp + 0xb8], 2
add r13, 1
jmp 0x49998a
mov edx, r15d
mov ecx, r14d
mov r9, rbx
call dbg.permute_args
mov edx, dword [0x004a014c]
mov eax, r15d
mov dword [0x004a0134], 0xffffffff
sub eax, r14d
mov ecx, edx
add edx, 1
sub ecx, eax
mov dword [0x004a014c], edx
mov eax, dword [0x004d8488]
mov dword [0x004a0138], ecx
jmp 0x4999d0
mov dword [0x004a0138], r8d
add r8d, 1
mov dword [0x004a014c], r8d
jmp 0x4999d4
movzx r14d, byte [r15 + 1]
test r14b, r14b
jne 0x499c7c
mov edx, 0x2d
mov rcx, r13
mov dword [rsp + 0x38], r8d
call sym.strchr
test rax, rax
movsxd r8, dword [rsp + 0x38]
je 0x499a1a
mov edi, dword [0x004a0138]
cmp edi, 0xffffffff
je 0x499ec6
cmp dword [0x004a0134], 0xffffffff
je 0x499e7f
test r14b, r14b
jne 0x499c8b
lea rbp, [r15 + 1]
mov qword [0x004a0140], rbp
cmp byte [r15 + 1], 0
jne 0x499e78
mov edx, 0x2d
mov rcx, r13
call sym.strchr
test rax, rax
je 0x499c0c
mov r10, r15
mov edi, 0x2d
movzx edx, byte [rax + 1]
cmp dl, 0x3a
je 0x499e8b
cmp byte [r10 + 1], 0
jne 0x499c11
add dword [0x004a014c], 1
jmp 0x499c11
mov esi, dword [0x004a0134]
lea rax, [0x004d0d35]
add r8d, 1
mov dword [0x004a014c], r8d
mov qword [0x004a0140], rax
cmp esi, 0xffffffff
je 0x499bf8
mov edx, esi
mov r9, rbx
mov ecx, edi
call dbg.permute_args
sub esi, edi
sub dword [0x004a014c], esi
mov dword [0x004a0134], 0xffffffff
mov dword [0x004a0138], 0xffffffff
mov 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
and dword [rsp + 0xb8], 0xfffffffe
jmp 0x49997b
mov esi, dword [0x004a0134]
lea rax, [0x004d0d35]
mov edi, dword [0x004a0138]
mov qword [0x004a0140], rax
cmp esi, 0xffffffff
jne 0x499be4
mov eax, dword [0x004a0138]
cmp eax, 0xffffffff
je 0x499bf8
mov dword [0x004a014c], eax
jmp 0x499bf8
add r8d, 1
mov qword [0x004d8480], r15
mov edi, 1
mov dword [0x004a014c], r8d
jmp 0x499c11
mov edi, dword [0x004a0138]
cmp edi, 0xffffffff
jne 0x499b5d
lea r10, [r15 + 1]
cmp r14b, 0x2d
mov qword [0x004a0140], r10
je 0x499e42
cmp qword [rsp + 0xa8], 0
je 0x499d31
movsxd rax, dword [0x004a014c]
cmp qword [rbx + rax*8], r10
je 0x499d31
cmp r14b, 0x2d
je 0x499e66
test byte [rsp + 0xb8], 4
je 0x499d31
xor eax, eax
cmp r14b, 0x3a
je 0x499ced
movsx edx, r14b
mov rcx, r13
call sym.strchr
test rax, rax
setne al
movzx eax, al
mov r9, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
mov rdx, r13
mov dword [rsp + 0x20], eax
mov rcx, rbx
call dbg.parse_long_options
cmp eax, 0xffffffff
mov edi, eax
je 0x499d26
lea rax, [0x004d0d35]
mov qword [0x004a0140], rax
jmp 0x499c11
mov r10, qword [0x004a0140]
movzx r14d, byte [r10]
lea rbp, [r10 + 1]
movsx edi, r14b
cmp edi, 0x3a
mov qword [0x004a0140], rbp
je 0x499e05
cmp edi, 0x2d
je 0x499ed4
mov edx, edi
mov rcx, r13
mov qword [rsp + 0x38], r10
call sym.strchr
test rax, rax
mov r10, qword [rsp + 0x38]
je 0x499e05
cmp qword [rsp + 0xa8], 0
je 0x499ba3
cmp edi, 0x57
jne 0x499ba3
movzx edx, byte [rax + 1]
cmp dl, 0x3b
jne 0x499ba7
cmp byte [r10 + 1], 0
jne 0x499f4e
mov eax, dword [0x004a014c]
add eax, 1
cmp esi, eax
mov dword [0x004a014c], eax
jg 0x499f41
mov edx, dword [0x004a0150]
lea rax, [0x004d0d35]
mov qword [0x004a0140], rax
test edx, edx
je 0x499de6
cmp byte [r13], 0x3a
je 0x499de6
lea rcx, str.option_requires_an_argument_____c
mov edx, 0x57
call dbg.warnx
mov dword [0x004a0148], 0x57
cmp byte [r13], 0x3a
je 0x499f37
mov edi, 0x3f
jmp 0x499c11
cmp byte [r10 + 1], 0
jne 0x499e13
add dword [0x004a014c], 1
mov ecx, dword [0x004a0150]
test ecx, ecx
je 0x499e32
cmp byte [r13], 0x3a
je 0x499e32
lea rcx, str.unknown_option_____c
mov edx, edi
call dbg.warnx
mov dword [0x004a0148], edi
mov edi, 0x3f
jmp 0x499c11
cmp byte [r15 + 2], 0
je 0x499bc0
cmp qword [rsp + 0xa8], 0
je 0x499f8b
cmp r10, qword [rbx + r8*8]
je 0x499d31
add r10, 1
xor eax, eax
mov qword [0x004a0140], r10
jmp 0x499ced
mov edi, 0x2d
jmp 0x499e13
mov dword [0x004a0134], r8d
jmp 0x499b6a
mov qword [0x004d8480], 0
cmp byte [r10 + 1], 0
je 0x499ee0
mov eax, dword [0x004a014c]
mov qword [0x004d8480], rbp
lea rsi, [0x004d0d35]
add eax, 1
mov dword [0x004a014c], eax
mov qword [0x004a0140], rsi
jmp 0x499c11
lea rbp, [r15 + 1]
mov r10, r15
mov qword [0x004a0140], rbp
mov r15, r10
jmp 0x499b7e
cmp byte [rax + 2], 0x3a
mov eax, dword [0x004a014c]
je 0x499eaa
add eax, 1
cmp esi, eax
mov dword [0x004a014c], eax
jg 0x499f78
lea rax, [0x004d0d35]
mov qword [0x004a0140], rax
mov eax, dword [0x004a0150]
test eax, eax
je 0x499f26
cmp byte [r13], 0x3a
je 0x499f26
lea rcx, str.option_requires_an_argument_____c
mov edx, edi
call dbg.warnx
mov dword [0x004a0148], edi
cmp byte [r13], 0x3a
jne 0x499dfb
mov edi, 0x3a
jmp 0x499c11
cdqe
mov rax, qword [rbx + rax*8]
mov qword [0x004a0140], rax
mov r9, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xa8]
mov rdx, r13
mov dword [rsp + 0x20], 0
mov rcx, rbx
call dbg.parse_long_options
mov edi, eax
jmp 0x499d13
movsxd rdx, eax
mov rdx, qword [rbx + rdx*8]
mov qword [0x004d8480], rdx
jmp 0x499eaa
lea rbp, [r15 + 2]
mov r15, r10
mov qword [0x004a0140], rbp
jmp 0x499b7e