Function at 0x140001570
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r15
sub rsp, 0x20
mov r15, rdx
mov ebp, ecx
cmp ecx, 1
jl 0x1400016f7
mov ebx, dword [0x140008034]
xor r12d, r12d
mov qword [0x140008660], r12
test ebx, ebx
je 0x1400015ba
cmp dword [0x140008658], r12d
je 0x1400015c5
mov edi, dword [0x140008634]
mov rsi, qword [0x140008620]
jmp 0x14000160f
mov ebx, 1
mov dword [0x140008034], ebx
lea rcx, str.POSIXLY_CORRECT
mov dword [0x140008638], ebx
mov dword [0x140008630], ebx
mov qword [0x140008628], r12
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov ebx, dword [0x140008034]
mov edi, r12d
test rax, rax
mov qword [0x140008620], rax
mov rsi, rax
mov dword [0x140008658], 1
sete dil
mov dword [0x140008634], edi
mov rdx, qword [0x140008628]
test rdx, rdx
je 0x140001624
cmp byte [rdx], r12b
jne 0x140001727
mov edx, dword [0x140008638]
cmp edx, ebx
mov ecx, dword [0x140008630]
cmovg edx, ebx
cmp ecx, ebx
mov dword [0x140008638], edx
cmovg ecx, ebx
mov dword [0x140008630], ecx
cmp edi, 1
jne 0x140001698
cmp ecx, edx
je 0x140001663
cmp edx, ebx
je 0x14000166e
mov rcx, r15
call fcn.140001460
mov ecx, dword [0x140008630]
jmp 0x14000166e
cmp edx, ebx
cmovne ecx, ebx
mov dword [0x140008630], ecx
cmp ebx, ebp
jge 0x140001690
movsxd rax, ebx
mov rdx, qword [r15 + rax*8]
cmp byte [rdx], 0x2d
jne 0x140001684
cmp byte [rdx + 1], r12b
jne 0x140001690
inc ebx
mov dword [0x140008034], ebx
cmp ebx, ebp
jl 0x140001672
mov edx, ebx
mov dword [0x140008638], ebx
cmp ebx, ebp
je 0x1400016ec
movsxd rax, ebx
mov r8, qword [r15 + rax*8]
cmp byte [r8], 0x2d
jne 0x140001ae8
cmp byte [r8 + 1], 0x2d
jne 0x14000170f
cmp byte [r8 + 2], r12b
jne 0x14000170f
inc ebx
mov dword [0x140008034], ebx
cmp ecx, edx
je 0x1400016da
cmp edx, ebx
je 0x1400016e2
mov rcx, r15
call fcn.140001460
mov ecx, dword [0x140008630]
jmp 0x1400016e2
mov ecx, ebx
mov dword [0x140008630], ebx
mov edx, ebp
mov ebx, ebp
mov dword [0x140008638], edx
cmp ecx, edx
cmovne ebx, ecx
mov dword [0x140008034], ebx
mov rax, 0xffffffffffffffff
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp byte [r8], 0x2d
jne 0x140001ae8
cmp byte [r8 + 1], r12b
lea rdx, [r8 + 1]
je 0x140001ae8
movsx r8d, byte [rdx]
lea rax, str.hukln:p:s:d:x:
inc rdx
mov cl, 0x68
mov qword [0x140008628], rdx
nop
cmp cl, r8b
je 0x140001753
movzx ecx, byte [rax + 1]
inc rax
test cl, cl
jne 0x140001740
mov rax, r12
movzx ecx, byte [rdx]
test cl, cl
jne 0x140001762
inc ebx
mov dword [0x140008034], ebx
test rax, rax
je 0x140001aa0
cmp r8b, 0x3a
je 0x140001aa0
cmp byte [rax], 0x57
jne 0x1400019e4
cmp byte [rax + 1], 0x3b
jne 0x1400019e4
mov qword [rsp + 0x50], r13
mov r13d, r12d
mov qword [rsp + 0x58], r14
mov r14, r12
test cl, cl
jne 0x1400017cf
cmp ebx, ebp
jne 0x1400017c8
mov ecx, 2
mov ebx, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [r15]
lea rdx, str._s:_option_requires_an_argument_____c_n
mov rcx, rax
mov r9d, ebx
call fcn.140001410
jmp 0x140001943
movsxd rax, ebx
mov rdx, qword [r15 + rax*8]
movzx eax, byte [rdx]
inc ebx
mov qword [0x140008660], rdx
mov rsi, rdx
mov dword [0x140008034], ebx
mov qword [0x140008628], rdx
test al, al
je 0x1400017ff
nop
cmp al, 0x3d
je 0x1400017ff
movzx eax, byte [rsi + 1]
inc rsi
test al, al
jne 0x1400017f0
xor ebx, ebx
cmp qword [rbx], rbx
je 0x1400019cf
lea rdi, [rbx - 1]
nop
mov rcx, qword [rbx]
mov r8, rsi
sub r8, rdx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov rdx, qword [0x140008628]
test eax, eax
jne 0x140001852
mov rax, qword [rbx]
mov rcx, rdi
inc rcx
cmp byte [rax + rcx], r13b
jne 0x140001830
mov eax, esi
sub eax, edx
cmp rax, rcx
je 0x14000185d
test r14, r14
jne 0x14000184c
mov r14, rbx
jmp 0x140001852
mov r12d, 1
add rbx, 0x20
cmp qword [rbx], r13
jne 0x140001810
jmp 0x140001866
mov r14, rbx
mov r13d, 1
test r12d, r12d
je 0x1400018b7
test r13d, r13d
jne 0x1400018b7
movsxd rbx, dword [0x140008034]
lea ecx, [r13 + 2]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r15 + rbx*8]
lea rdx, str._s:_option___W__s_is_ambiguous_n
mov r8, qword [r15]
mov rcx, rax
call fcn.140001410
mov rax, qword [0x140008628]
nop
inc rdi
cmp byte [rax + rdi], 0
jne 0x1400018a0
add rax, rdi
inc dword [0x140008034]
jmp 0x14000193c
test r14, r14
je 0x1400019cf
cmp byte [rsi], 0
mov eax, dword [r14 + 8]
je 0x140001963
test eax, eax
je 0x140001906
lea rax, [rsi + 1]
mov qword [0x140008660], rax
nop dword [rax]
inc rdi
cmp byte [rdx + rdi], 0
jne 0x1400018e0
mov rcx, qword [r14 + 0x10]
add rdx, rdi
mov eax, dword [r14 + 0x18]
mov qword [0x140008628], rdx
test rcx, rcx
je 0x140001948
mov dword [rcx], eax
xor eax, eax
jmp 0x140001948
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r14]
lea rdx, str._t_t_t_t_t_t_t_t_t_t_t___s:_option___W__s_doesnt_allow_an_argument_n
mov r8, qword [r15]
mov rcx, rax
call fcn.140001410
mov rax, qword [0x140008628]
nop dword [rax]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140001930
add rax, rdi
mov qword [0x140008628], rax
mov eax, 0x3f
mov r13, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
cmp eax, 1
jne 0x1400018e0
movsxd r8, dword [0x140008034]
cmp r8d, ebp
jge 0x140001992
mov rcx, qword [r15 + r8*8]
inc r8d
mov dword [0x140008034], r8d
mov qword [0x140008660], rcx
jmp 0x1400018e0
lea eax, [r8 - 1]
mov ecx, 2
movsxd rbx, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r15 + rbx*8]
lea rdx, str._s:_option___s_requires_an_argument_n
mov r8, qword [r15]
mov rcx, rax
call fcn.140001410
mov rax, qword [0x140008628]
inc rdi
cmp byte [rax + rdi], 0
jne 0x1400019c1
jmp 0x140001939
mov qword [0x140008628], 0
mov eax, 0x57
jmp 0x140001948
cmp byte [rax + 1], 0x3a
jne 0x140001a8b
cmp byte [rax + 2], 0x3a
jne 0x140001a1b
test cl, cl
jne 0x140001a1f
mov qword [0x140008660], r12
mov qword [0x140008628], r12
movsx eax, r8b
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
test cl, cl
je 0x140001a28
mov qword [0x140008660], rdx
jmp 0x140001a7c
cmp ebx, ebp
jne 0x140001a6e
mov ecx, 2
mov ebx, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [r15]
lea rdx, str._s:_option_requires_an_argument_____c_n
mov rcx, rax
mov r9d, ebx
call fcn.140001410
mov r8b, 0x3f
mov qword [0x140008628], r12
movsx eax, r8b
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
movsxd rax, ebx
mov rcx, qword [r15 + rax*8]
mov qword [0x140008660], rcx
inc ebx
mov qword [0x140008628], r12
mov dword [0x140008034], ebx
movsx eax, r8b
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rdi, qword [r15]
mov ecx, 2
mov ebx, r8d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
lea rdx, str._s:_illegal_option_____c_n
test rsi, rsi
jne 0x140001ac4
lea rdx, str._s:_invalid_option_____c_n
mov r9d, ebx
mov r8, rdi
mov rcx, rax
call fcn.140001410
mov eax, 0x3f
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
test edi, edi
je 0x1400016f7
inc ebx
mov qword [0x140008660], r8
mov dword [0x140008034], ebx
mov eax, 1
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret