Function at 0x140001550
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 0x1400016e8
mov ebx, dword [0x140008074]
xor r12d, r12d
mov qword [0x1400086a0], r12
test ebx, ebx
je 0x14000159a
cmp dword [0x140008698], r12d
je 0x1400015a5
mov edi, dword [0x140008674]
mov rsi, qword [0x140008660]
jmp 0x1400015ef
mov ebx, 1
mov dword [0x140008074], ebx
lea rcx, str.POSIXLY_CORRECT
mov dword [0x140008678], ebx
mov dword [0x140008670], ebx
mov qword [0x140008668], r12
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov ebx, dword [0x140008074]
mov edi, r12d
test rax, rax
mov qword [0x140008660], rax
mov rsi, rax
mov dword [0x140008698], 1
sete dil
mov dword [0x140008674], edi
mov rdx, qword [0x140008668]
test rdx, rdx
je 0x140001604
cmp byte [rdx], r12b
jne 0x140001718
mov ecx, dword [0x140008678]
cmp ecx, ebx
jle 0x140001616
mov ecx, ebx
mov dword [0x140008678], ebx
mov edx, dword [0x140008670]
cmp edx, ebx
jle 0x140001628
mov edx, ebx
mov dword [0x140008670], ebx
cmp edi, 1
jne 0x140001686
cmp edx, ecx
je 0x140001645
cmp ecx, ebx
je 0x140001651
mov rcx, r15
call fcn.140001460
mov edx, dword [0x140008670]
jmp 0x140001651
cmp ecx, ebx
je 0x140001651
mov edx, ebx
mov dword [0x140008670], ebx
cmp ebx, ebp
jge 0x14000167e
nop word [rax + rax]
movsxd rax, ebx
mov rcx, qword [r15 + rax*8]
cmp byte [rcx], 0x2d
jne 0x140001672
cmp byte [rcx + 1], r12b
jne 0x140001678
inc ebx
cmp ebx, ebp
jl 0x140001660
mov dword [0x140008074], ebx
mov ecx, ebx
mov dword [0x140008678], ebx
cmp ebx, ebp
je 0x1400016de
movsxd rax, ebx
mov r8, qword [r15 + rax*8]
cmp byte [r8], 0x2d
jne 0x140001ad2
cmp byte [r8 + 1], 0x2d
jne 0x140001700
cmp byte [r8 + 2], r12b
jne 0x140001700
inc ebx
mov dword [0x140008074], ebx
cmp edx, ecx
je 0x1400016c8
cmp ecx, ebx
je 0x1400016d0
mov rcx, r15
call fcn.140001460
mov edx, dword [0x140008670]
jmp 0x1400016d0
mov edx, ebx
mov dword [0x140008670], ebx
mov ecx, ebp
mov dword [0x140008074], ebp
mov dword [0x140008678], ecx
cmp edx, ecx
je 0x1400016e8
mov dword [0x140008074], edx
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 0x140001ad2
cmp byte [r8 + 1], r12b
lea rdx, [r8 + 1]
je 0x140001ad2
movsx edi, byte [rdx]
lea rax, str.hukln:p:s:d:x:
inc rdx
mov cl, 0x68
mov qword [0x140008668], rdx
nop
cmp cl, dil
je 0x140001743
movzx ecx, byte [rax + 1]
inc rax
test cl, cl
jne 0x140001730
mov rax, r12
movzx ecx, byte [rdx]
test cl, cl
jne 0x140001752
inc ebx
mov dword [0x140008074], ebx
test rax, rax
je 0x140001a8d
cmp dil, 0x3a
je 0x140001a8d
cmp byte [rax], 0x57
jne 0x1400019d4
cmp byte [rax + 1], 0x3b
jne 0x1400019d4
mov qword [rsp + 0x50], r13
mov r13d, r12d
mov qword [rsp + 0x58], r14
mov r14, r12
test cl, cl
jne 0x1400017bc
cmp ebx, ebp
jne 0x1400017b5
mov ecx, 2
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, edi
call fcn.140001410
jmp 0x140001933
movsxd rax, ebx
mov rdx, qword [r15 + rax*8]
movzx eax, byte [rdx]
inc ebx
mov qword [0x1400086a0], rdx
mov rsi, rdx
mov dword [0x140008074], ebx
mov qword [0x140008668], rdx
test al, al
je 0x1400017ef
nop dword [rax]
cmp al, 0x3d
je 0x1400017ef
movzx eax, byte [rsi + 1]
inc rsi
test al, al
jne 0x1400017e0
xor ebx, ebx
cmp qword [rbx], rbx
je 0x1400019bf
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 [0x140008668]
test eax, eax
jne 0x140001842
mov rax, qword [rbx]
mov rcx, rdi
inc rcx
cmp byte [rax + rcx], r13b
jne 0x140001820
mov eax, esi
sub eax, edx
cmp rax, rcx
je 0x14000184d
test r14, r14
jne 0x14000183c
mov r14, rbx
jmp 0x140001842
mov r12d, 1
add rbx, 0x20
cmp qword [rbx], r13
jne 0x140001800
jmp 0x140001856
mov r14, rbx
mov r13d, 1
test r12d, r12d
je 0x1400018a7
test r13d, r13d
jne 0x1400018a7
movsxd rbx, dword [0x140008074]
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 [0x140008668]
nop
inc rdi
cmp byte [rax + rdi], 0
jne 0x140001890
add rax, rdi
inc dword [0x140008074]
jmp 0x14000192c
test r14, r14
je 0x1400019bf
cmp byte [rsi], 0
mov eax, dword [r14 + 8]
je 0x140001953
test eax, eax
je 0x1400018f6
lea rax, [rsi + 1]
mov qword [0x1400086a0], rax
nop dword [rax]
inc rdi
cmp byte [rdx + rdi], 0
jne 0x1400018d0
mov rcx, qword [r14 + 0x10]
add rdx, rdi
mov eax, dword [r14 + 0x18]
mov qword [0x140008668], rdx
test rcx, rcx
je 0x140001938
mov dword [rcx], eax
xor eax, eax
jmp 0x140001938
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 [0x140008668]
nop dword [rax]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140001920
add rax, rdi
mov qword [0x140008668], 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 0x1400018d0
movsxd r8, dword [0x140008074]
cmp r8d, ebp
jge 0x140001982
mov rcx, qword [r15 + r8*8]
inc r8d
mov dword [0x140008074], r8d
mov qword [0x1400086a0], rcx
jmp 0x1400018d0
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 [0x140008668]
inc rdi
cmp byte [rax + rdi], 0
jne 0x1400019b1
jmp 0x140001929
mov qword [0x140008668], 0
mov eax, 0x57
jmp 0x140001938
cmp byte [rax + 1], 0x3a
jne 0x140001a78
cmp byte [rax + 2], 0x3a
jne 0x140001a0b
test cl, cl
jne 0x140001a0f
mov qword [0x1400086a0], r12
mov qword [0x140008668], r12
movsx eax, dil
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
test cl, cl
je 0x140001a18
mov qword [0x1400086a0], rdx
jmp 0x140001a69
cmp ebx, ebp
jne 0x140001a5b
mov ecx, 2
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, edi
call fcn.140001410
mov dil, 0x3f
mov qword [0x140008668], r12
movsx eax, dil
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 [0x1400086a0], rcx
inc ebx
mov qword [0x140008668], r12
mov dword [0x140008074], ebx
movsx eax, dil
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rbx, qword [r15]
mov ecx, 2
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 0x140001aae
lea rdx, str._s:_invalid_option_____c_n
mov r9d, edi
mov r8, rbx
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 0x1400016e8
inc ebx
mov qword [0x1400086a0], r8
mov dword [0x140008074], ebx
mov eax, 1
mov rbx, qword [rsp + 0x60]
add rsp, 0x20
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret