Function at 0x140040f60
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov dword [rsp + 8], ecx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
xor edi, edi
mov rbp, 0xffffffffffffffff
mov qword [rsp + 0x48], rdi
mov rsi, r9
mov dword [rsp + 0x30], edi
mov r13, r8
mov qword [rsp + 0x38], rdi
mov r14, rdx
mov qword [rsp + 0x40], rdi
mov r12d, ebp
test ecx, ecx
je 0x14004133b
test rdx, rdx
je 0x14004133b
test r8, r8
jne 0x140040fc9
test r9, r9
je 0x14004133b
movsxd rdx, dword [0x140147058]
cmp edx, ecx
jge 0x140040ff6
mov rcx, qword [r14 + rdx*8]
test rcx, rcx
je 0x140040ff6
cmp byte [rcx], 0x2d
jne 0x140040ffd
cmp byte [rcx + 1], 0x2d
jne 0x140040ffd
cmp byte [rcx + 2], dil
jne 0x140040ffd
inc edx
mov dword [0x140147058], edx
mov eax, ebp
jmp 0x14004134a
test edx, edx
jne 0x140041018
mov edx, 1
mov dword [0x140147058], edx
mov r8d, edx
mov qword [0x140147060], rdx
jmp 0x14004101f
mov r8, qword [0x140147060]
test r13, r13
je 0x14004104a
movzx ecx, byte [r13]
lea eax, [rcx - 0x2b]
test al, 0xfd
jne 0x14004104a
cmp cl, 0x2d
mov r9d, edi
setne r9b
inc r9d
inc r13
mov qword [rsp + 0xa0], r13
jmp 0x14004106e
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, dword [0x140147058]
neg rax
mov r8, qword [0x140147060]
sbb r9d, r9d
and r9d, 2
mov ebx, dword [rsp + 0xb8]
mov dword [rsp + 0x34], r9d
cmp r8, 1
jne 0x1400410b9
mov ecx, r9d
test r9d, r9d
je 0x14004114e
sub ecx, r8d
je 0x14004110b
cmp ecx, r8d
jne 0x1400410b9
movsxd rax, edx
mov rcx, qword [r14 + rax*8]
test rcx, rcx
je 0x1400410b9
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x1400410b9
test ebx, ebx
je 0x140040ff6
cmp al, 0x2b
jne 0x140040ff6
mov r15d, 2
test rsi, rsi
je 0x1400413f9
movsxd rcx, edx
mov r8d, r15d
lea rdx, [0x1400e36c4]
mov rcx, qword [r14 + rcx*8]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
movsxd rdx, dword [0x140147058]
test eax, eax
je 0x1400411d3
test ebx, ebx
je 0x1400410ff
mov rcx, qword [r14 + rdx*8]
cmp byte [rcx], 0x2b
je 0x1400411d3
mov r8, qword [0x140147060]
jmp 0x1400413f9
movsxd rax, edx
mov rcx, qword [r14 + rax*8]
test rcx, rcx
je 0x1400410b9
movzx r9d, byte [rcx]
cmp r9b, 0x2d
je 0x1400410b9
test ebx, ebx
je 0x14004112b
cmp r9b, 0x2b
je 0x1400410b9
inc edx
mov qword [0x140147050], rcx
mov dword [0x140147058], edx
mov eax, 1
mov dword [0x1401110a4], 1
jmp 0x14004134a
movsxd r15, edx
mov r11d, edi
mov qword [rsp + 0x48], r15
movsxd rax, edx
mov dword [rsp + 0x30], r11d
mov rcx, qword [r14 + rax*8]
test rcx, rcx
je 0x1400411c5
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x14004118e
test ebx, ebx
je 0x140041179
cmp al, 0x2b
je 0x140041186
inc edx
mov dword [0x140147058], edx
inc r11d
jmp 0x140041159
cmp al, 0x2d
jne 0x1400410b9
cmp byte [rcx + 1], 0x2d
jne 0x1400410b9
cmp byte [rcx + 2], dil
jne 0x1400410b9
lea rcx, [r14 + r15*8]
mov r8d, 1
mov edx, r11d
call fcn.1400416a0
lea eax, [r15 + 1]
mov dword [0x140147058], eax
mov eax, ebp
jmp 0x14004134a
mov dword [0x140147058], r15d
mov eax, ebp
jmp 0x14004134a
mov r8, qword [0x140147060]
cmp r8, 1
jne 0x1400413f9
mov rcx, qword [r14 + rdx*8]
mov r8, r15
lea rdx, [0x1400e36c4]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov rdx, qword [0x140147060]
test eax, eax
movsxd rax, dword [0x140147058]
cmove rdx, r15
mov qword [0x140147060], rdx
mov rcx, qword [r14 + rax*8]
add rcx, rdx
mov edx, 0x3d
call sub.VCRUNTIME140.dll_strchr
movsxd rdx, dword [0x140147058]
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x140041254
mov rcx, qword [r14 + rdx*8]
mov rbx, rbp
nop dword [rax]
inc rbx
cmp byte [rcx + rbx], dil
jne 0x140041240
lea r10, [rcx + rbx]
mov qword [rsp + 0x38], r10
jmp 0x14004125b
mov rbx, rax
sub rbx, qword [r14 + rdx*8]
mov r8, qword [0x140147060]
mov r15d, edi
mov r9, qword [rsi]
sub rbx, r8
test r9, r9
je 0x1400413f3
mov r13, rdi
mov rdi, rsi
nop word [rax + rax]
movsxd rax, edx
mov rdx, r9
mov rcx, qword [r14 + rax*8]
add rcx, r8
mov r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1400412c2
mov rsi, qword [rdi]
mov rax, rbp
inc rax
cmp byte [rsi + rax], 0
jne 0x1400412a0
cmp rbx, rax
je 0x140041362
test r12d, r12d
jns 0x1400412ed
mov rsi, qword [rsp + 0xa8]
mov r12d, r15d
inc r13
inc r15d
mov rdi, r13
shl rdi, 5
add rdi, rsi
mov r9, qword [rdi]
test r9, r9
je 0x14004136d
mov edx, dword [0x140147058]
mov r8, qword [0x140147060]
jmp 0x140041280
cmp dword [0x1401110a0], 0
je 0x14004133b
movsxd rdi, dword [0x140147058]
mov ecx, 2
movsxd rbx, r12d
shl rbx, 5
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, qword [r14 + rdi*8]
lea rdx, str._s:_option___s_is_ambiguous__could_be_____s_or_____s__n
mov r8, qword [r14]
mov rcx, rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x28], rsi
mov rax, qword [rbx + rax]
mov qword [rsp + 0x20], rax
call fcn.1400093d0
mov dword [0x1401110a4], 0x3f
mov eax, 0x3f
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov rsi, qword [rsp + 0xa8]
mov r12d, r15d
mov edx, dword [0x140147058]
mov r8, qword [0x140147060]
test r12d, r12d
js 0x1400413e9
movsxd rax, r12d
shl rax, 5
mov ebp, dword [rax + rsi + 8]
mov rbx, qword [rsp + 0x40]
mov r10, qword [rsp + 0x38]
test ebp, ebp
je 0x1400415c2
sub ebp, 1
je 0x1400414df
cmp ebp, 1
jne 0x1400415f7
movzx r9d, byte [r10]
cmp r9b, 0x3d
jne 0x1400413bd
movzx r9d, byte [r10 + 1]
lea rax, [r10 + 1]
cmovne rax, r10
xor ebx, ebx
test r9b, r9b
je 0x1400414d0
mov r8d, 1
mov qword [0x140147050], rax
mov qword [0x140147060], r8
jmp 0x1400415f9
mov r13, qword [rsp + 0xa0]
xor edi, edi
mov r15d, 2
test r13, r13
je 0x14004138a
movsxd rax, edx
mov rcx, qword [r14 + rax*8]
movsx edx, byte [rcx + r8]
mov rcx, r13
call sub.VCRUNTIME140.dll_strchr
mov rbx, rax
test rax, rax
jne 0x140041496
cmp dword [0x1401110a0], eax
je 0x140041456
movsxd rax, dword [0x140147058]
mov rcx, qword [r14 + rax*8]
mov rax, qword [0x140147060]
movsx ebx, byte [rcx + rax]
mov ecx, r15d
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [r14]
lea rdx, str._s:_invalid_option_______c_n
mov rcx, rax
mov r9d, ebx
call fcn.1400093d0
mov rdx, qword [0x140147060]
movsxd r8, dword [0x140147058]
inc rdx
mov qword [0x140147060], rdx
mov rcx, qword [r14 + r8*8]
cmp byte [rdx + rcx], 0
jne 0x14004133b
inc r8d
mov qword [0x140147060], 1
mov dword [0x140147058], r8d
jmp 0x14004133b
cmp byte [rax + 1], 0x3a
jne 0x1400414aa
cmp byte [rbx + 2], 0x3a
mov eax, edi
sete al
lea ebp, [rax + 1]
jmp 0x1400414ac
mov ebp, edi
mov r8, qword [0x140147060]
movsxd rdx, dword [0x140147058]
movsx eax, byte [rbx]
lea r10, [r8 + 1]
add r10, qword [r14 + rdx*8]
mov dword [0x1401110a4], eax
jmp 0x140041394
mov rax, rbx
mov qword [0x140147050], rbx
jmp 0x1400415f9
movzx r8d, byte [r10]
cmp r8b, 0x3d
jne 0x1400414ee
movzx r8d, byte [r10 + 1]
lea rax, [r10 + 1]
cmovne rax, r10
test r8b, r8b
je 0x140041502
xor ebx, ebx
jmp 0x1400415ac
lea eax, [rdx + 1]
cmp eax, dword [rsp + 0x90]
jl 0x1400415a1
cmp dword [0x1401110a0], 0
je 0x140041585
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [r14]
lea rdx, str._s:_argument_required_for_option__
mov rcx, rax
call fcn.1400093d0
mov ecx, 2
test r12d, r12d
js 0x140041564
movsxd rbx, r12d
shl rbx, 5
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8, qword [rbx + rsi]
lea rdx, str.___s_n
mov rcx, rax
call fcn.1400093d0
jmp 0x14004157f
movsx ebx, byte [rbx]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r8d, ebx
lea rdx, str.__c_n
mov rcx, rax
call fcn.1400093d0
mov edx, dword [0x140147058]
inc edx
mov dword [0x1401110a4], 0x3a
mov dword [0x140147058], edx
mov eax, 0x3a
jmp 0x14004134a
cdqe
mov ebx, 1
mov rax, qword [r14 + rax*8]
mov r8d, 1
mov qword [0x140147050], rax
mov qword [0x140147060], r8
jmp 0x1400415f9
test r12d, r12d
jns 0x1400415df
inc r8
movsxd rax, edx
mov qword [0x140147060], r8
mov rcx, qword [r14 + rax*8]
cmp byte [r8 + rcx], 0
jne 0x1400415ec
mov r8d, 1
mov qword [0x140147060], r8
xor ebx, ebx
mov qword [0x140147050], rbx
jmp 0x1400415f9
xor ebx, ebx
cmp dword [rsp + 0x34], 0
jne 0x140041629
cmp r8, 1
jne 0x14004163a
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x14004162f
mov rdi, qword [rsp + 0x48]
lea r8d, [rbx + 1]
mov edx, eax
lea rcx, [r14 + rdi*8]
call fcn.1400416a0
lea eax, [rdi + 1]
add eax, ebx
jmp 0x140041634
cmp r8, 1
jne 0x14004163a
lea eax, [rbx + 1]
add eax, edx
mov dword [0x140147058], eax
test r12d, r12d
js 0x140041671
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x14004164f
mov dword [rax], r12d
movsxd rax, r12d
shl rax, 5
mov rcx, qword [rax + rsi + 0x10]
mov eax, dword [rax + rsi + 0x18]
test rcx, rcx
je 0x14004134a
mov dword [rcx], eax
xor eax, eax
jmp 0x14004134a
mov eax, dword [0x1401110a4]
jmp 0x14004134a