Function at 0x1402a2130
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 0x1402a24d6
mov r9d, dword [0x1402b2c9c]
mov eax, dword [global_posixly_correct]
test r9d, r9d
je 0x1402a2360
cmp eax, 0xffffffff
je 0x1402a2374
mov edx, dword [0x1403b9948]
test edx, edx
jne 0x1402a2374
movzx eax, byte [r13]
cmp al, 0x2d
je 0x1402a23a7
mov r8d, dword [global_posixly_correct]
test r8d, r8d
jne 0x1402a2480
cmp al, 0x2b
je 0x1402a2522
mov qword [0x1403b9940], 0
test edx, edx
je 0x1402a2274
mov dword [0x1402b2c84], 0xffffffff
mov dword [0x1402b2c88], 0xffffffff
nop word cs:[rax + rax]
mov dword [0x1403b9948], 0
mov ebx, dword [0x1402b2c9c]
cmp ebx, r12d
jge 0x1402a2498
movsxd rax, ebx
mov rsi, qword [rbp + rax*8]
cmp byte [rsi], 0x2d
je 0x1402a23b8
lea rax, [0x140310cc8]
mov qword [0x1402b2c90], rax
test r15b, 2
jne 0x1402a24f0
test r15b, 1
je 0x1402a24d6
mov esi, dword [0x1402b2c88]
cmp esi, 0xffffffff
je 0x1402a2470
mov edi, dword [0x1402b2c84]
cmp edi, 0xffffffff
je 0x1402a226b
mov edx, edi
mov r9, rbp
mov r8d, ebx
mov ecx, esi
call dbg.permute_args
sub edi, esi
mov eax, ebx
mov dword [0x1402b2c84], 0xffffffff
sub eax, edi
mov dword [0x1402b2c88], eax
add ebx, 1
mov dword [0x1402b2c9c], ebx
mov rdi, qword [0x1402b2c90]
movzx eax, byte [rdi]
test al, al
je 0x1402a21e0
test r14, r14
je 0x1402a22f6
movsxd rdx, dword [0x1402b2c9c]
cmp qword [rbp + rdx*8], rdi
je 0x1402a22f6
cmp al, 0x2d
je 0x1402a260b
and r15d, 4
je 0x1402a25b0
cmp al, 0x3a
je 0x1402a2616
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 0x1402a26ce
mov rdi, qword [0x1402b2c90]
movzx eax, byte [rdi]
lea r15, [rdi + 1]
movsx ebx, al
mov qword [0x1402b2c90], r15
cmp al, 0x3a
je 0x1402a25c6
cmp ebx, 0x2d
je 0x1402a2750
mov edx, ebx
mov rcx, r13
call sym.strchr
test rax, rax
je 0x1402a25c6
movzx edx, byte [rax + 1]
test r14, r14
je 0x1402a233f
cmp ebx, 0x57
jne 0x1402a233f
cmp dl, 0x3b
je 0x1402a261d
cmp dl, 0x3a
je 0x1402a242d
cmp byte [rdi + 1], 0
jne 0x1402a24db
add dword [0x1402b2c9c], 1
jmp 0x1402a24db
mov dword [0x1403b9948], 1
mov dword [0x1402b2c9c], 1
xor edx, edx
xor r8d, r8d
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edx, dword [0x1403b9948]
test eax, eax
setne al
movzx eax, al
mov dword [global_posixly_correct], eax
movzx eax, byte [r13]
cmp al, 0x2d
jne 0x1402a2197
or r15d, 2
add r13, 1
jmp 0x1402a21af
movzx eax, byte [rsi + 1]
test al, al
jne 0x1402a252b
mov edx, 0x2d
mov rcx, r13
call sym.strchr
test rax, rax
je 0x1402a220a
cmp dword [0x1402b2c88], 0xffffffff
je 0x1402a23f0
cmp dword [0x1402b2c84], 0xffffffff
je 0x1402a268a
lea r15, [rsi + 1]
mov qword [0x1402b2c90], r15
cmp byte [rsi + 1], 0
jne 0x1402a25f4
mov edx, 0x2d
mov rcx, r13
call sym.strchr
test rax, rax
je 0x1402a24d6
cmp byte [rax + 1], 0x3a
mov ebx, 0x2d
mov rdi, rsi
jne 0x1402a2352
mov qword [0x1403b9940], 0
cmp byte [rdi + 1], 0
mov edx, dword [0x1402b2c9c]
je 0x1402a26e1
mov qword [0x1403b9940], r15
lea rax, [0x140310cc8]
add edx, 1
mov qword [0x1402b2c90], rax
mov dword [0x1402b2c9c], edx
jmp 0x1402a24db
mov dword [0x1402b2c88], ebx
jmp 0x1402a226b
and r15d, 0xfffffffe
cmp al, 0x2b
jne 0x1402a21af
jmp 0x1402a23ab
mov esi, dword [0x1402b2c84]
lea rax, [0x140310cc8]
mov edi, dword [0x1402b2c88]
mov qword [0x1402b2c90], rax
cmp esi, 0xffffffff
jne 0x1402a2507
cmp edi, 0xffffffff
je 0x1402a24c2
mov dword [0x1402b2c9c], edi
mov dword [0x1402b2c84], 0xffffffff
mov dword [0x1402b2c88], 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 [0x1403b9940], rsi
mov dword [0x1402b2c9c], ebx
mov ebx, 1
jmp 0x1402a24db
mov edx, esi
sub esi, edi
mov r8d, ebx
mov r9, rbp
mov ecx, edi
sub ebx, esi
call dbg.permute_args
mov dword [0x1402b2c9c], ebx
jmp 0x1402a24c2
and r15d, 0xfffffffe
jmp 0x1402a23ab
mov ecx, dword [0x1402b2c88]
cmp ecx, 0xffffffff
je 0x1402a2543
cmp dword [0x1402b2c84], 0xffffffff
je 0x1402a2695
lea rdi, [rsi + 1]
mov qword [0x1402b2c90], rdi
cmp al, 0x2d
jne 0x1402a2286
cmp byte [rsi + 2], 0
jne 0x1402a2286
mov esi, dword [0x1402b2c84]
add ebx, 1
lea rax, [0x140310cc8]
mov dword [0x1402b2c9c], ebx
mov qword [0x1402b2c90], rax
cmp esi, 0xffffffff
je 0x1402a24c2
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 [0x1402b2c9c], ebx
jmp 0x1402a24c2
lea r15, [rdi + 1]
movsx ebx, al
mov qword [0x1402b2c90], r15
cmp al, 0x3a
jne 0x1402a2315
cmp byte [rdi + 1], 0
jne 0x1402a25d3
add dword [0x1402b2c9c], 1
mov ecx, dword [0x1402b2ca0]
test ecx, ecx
je 0x1402a25e4
cmp byte [r13], 0x3a
jne 0x1402a25fb
mov dword [0x1402b2c98], ebx
mov ebx, 0x3f
jmp 0x1402a24db
mov ebx, 0x2d
jmp 0x1402a25d3
mov edx, ebx
lea rcx, str.unknown_option_____c
call dbg.warnx
jmp 0x1402a25e4
add rdi, 1
mov qword [0x1402b2c90], rdi
xor eax, eax
jmp 0x1402a22c7
cmp byte [rdi + 1], 0
jne 0x1402a26ae
mov eax, dword [0x1402b2c9c]
add eax, 1
mov dword [0x1402b2c9c], eax
cmp eax, r12d
jl 0x1402a26a0
mov edx, dword [0x1402b2ca0]
lea rax, [0x140310cc8]
mov qword [0x1402b2c90], rax
test edx, edx
je 0x1402a266b
cmp byte [r13], 0x3a
je 0x1402a266b
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call dbg.warnx
mov dword [0x1402b2c98], 0x57
cmp byte [r13], 0x3a
jne 0x1402a25ea
mov ebx, 0x3a
jmp 0x1402a24db
mov dword [0x1402b2c84], ebx
jmp 0x1402a23f0
mov dword [0x1402b2c84], ebx
jmp 0x1402a2543
cdqe
mov rax, qword [rbp + rax*8]
mov qword [0x1402b2c90], 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, [0x140310cc8]
mov qword [0x1402b2c90], rax
jmp 0x1402a24db
cmp byte [rax + 2], 0x3a
je 0x1402a244f
add edx, 1
mov dword [0x1402b2c9c], edx
cmp r12d, edx
jle 0x1402a270d
movsxd rax, edx
mov rax, qword [rbp + rax*8]
mov qword [0x1403b9940], rax
jmp 0x1402a244f
lea rax, [0x140310cc8]
mov qword [0x1402b2c90], rax
mov eax, dword [0x1402b2ca0]
test eax, eax
je 0x1402a273a
cmp byte [r13], 0x3a
je 0x1402a273a
mov edx, ebx
lea rcx, str.option_requires_an_argument_____c
call dbg.warnx
mov dword [0x1402b2c98], ebx
cmp byte [r13], 0x3a
jne 0x1402a25ea
jmp 0x1402a2680
mov rsi, rdi
jmp 0x1402a23fb