Function at 0x1400404d0
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 0x1400408ab
test rdx, rdx
je 0x1400408ab
test r8, r8
jne 0x140040539
test r9, r9
je 0x1400408ab
movsxd rdx, dword [0x140134108]
cmp edx, ecx
jge 0x140040566
mov rcx, qword [r14 + rdx*8]
test rcx, rcx
je 0x140040566
cmp byte [rcx], 0x2d
jne 0x14004056d
cmp byte [rcx + 1], 0x2d
jne 0x14004056d
cmp byte [rcx + 2], dil
jne 0x14004056d
inc edx
mov dword [0x140134108], edx
mov eax, ebp
jmp 0x1400408ba
test edx, edx
jne 0x140040588
mov edx, 1
mov dword [0x140134108], edx
mov r8d, edx
mov qword [0x140134110], rdx
jmp 0x14004058f
mov r8, qword [0x140134110]
test r13, r13
je 0x1400405ba
movzx ecx, byte [r13]
lea eax, [rcx - 0x2b]
test al, 0xfd
jne 0x1400405ba
cmp cl, 0x2d
mov r9d, edi
setne r9b
inc r9d
inc r13
mov qword [rsp + 0xa0], r13
jmp 0x1400405de
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edx, dword [0x140134108]
neg rax
mov r8, qword [0x140134110]
sbb r9d, r9d
and r9d, 2
mov ebx, dword [rsp + 0xb8]
mov dword [rsp + 0x34], r9d
cmp r8, 1
jne 0x140040629
mov ecx, r9d
test r9d, r9d
je 0x1400406be
sub ecx, r8d
je 0x14004067b
cmp ecx, r8d
jne 0x140040629
movsxd rax, edx
mov rcx, qword [r14 + rax*8]
test rcx, rcx
je 0x140040629
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x140040629
test ebx, ebx
je 0x140040566
cmp al, 0x2b
jne 0x140040566
mov r15d, 2
test rsi, rsi
je 0x140040969
movsxd rcx, edx
mov r8d, r15d
lea rdx, [0x1400d996c]
mov rcx, qword [r14 + rcx*8]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
movsxd rdx, dword [0x140134108]
test eax, eax
je 0x140040743
test ebx, ebx
je 0x14004066f
mov rcx, qword [r14 + rdx*8]
cmp byte [rcx], 0x2b
je 0x140040743
mov r8, qword [0x140134110]
jmp 0x140040969
movsxd rax, edx
mov rcx, qword [r14 + rax*8]
test rcx, rcx
je 0x140040629
movzx r9d, byte [rcx]
cmp r9b, 0x2d
je 0x140040629
test ebx, ebx
je 0x14004069b
cmp r9b, 0x2b
je 0x140040629
inc edx
mov qword [0x140134100], rcx
mov dword [0x140134108], edx
mov eax, 1
mov dword [0x1400fe0b4], 1
jmp 0x1400408ba
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 0x140040735
movzx eax, byte [rcx]
cmp al, 0x2d
je 0x1400406fe
test ebx, ebx
je 0x1400406e9
cmp al, 0x2b
je 0x1400406f6
inc edx
mov dword [0x140134108], edx
inc r11d
jmp 0x1400406c9
cmp al, 0x2d
jne 0x140040629
cmp byte [rcx + 1], 0x2d
jne 0x140040629
cmp byte [rcx + 2], dil
jne 0x140040629
lea rcx, [r14 + r15*8]
mov r8d, 1
mov edx, r11d
call fcn.140040c10
lea eax, [r15 + 1]
mov dword [0x140134108], eax
mov eax, ebp
jmp 0x1400408ba
mov dword [0x140134108], r15d
mov eax, ebp
jmp 0x1400408ba
mov r8, qword [0x140134110]
cmp r8, 1
jne 0x140040969
mov rcx, qword [r14 + rdx*8]
mov r8, r15
lea rdx, [0x1400d996c]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
mov rdx, qword [0x140134110]
test eax, eax
movsxd rax, dword [0x140134108]
cmove rdx, r15
mov qword [0x140134110], rdx
mov rcx, qword [r14 + rax*8]
add rcx, rdx
mov edx, 0x3d
call sub.VCRUNTIME140.dll_strchr
movsxd rdx, dword [0x140134108]
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x1400407c4
mov rcx, qword [r14 + rdx*8]
mov rbx, rbp
nop dword [rax]
inc rbx
cmp byte [rcx + rbx], dil
jne 0x1400407b0
lea r10, [rcx + rbx]
mov qword [rsp + 0x38], r10
jmp 0x1400407cb
mov rbx, rax
sub rbx, qword [r14 + rdx*8]
mov r8, qword [0x140134110]
mov r15d, edi
mov r9, qword [rsi]
sub rbx, r8
test r9, r9
je 0x140040963
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 0x140040832
mov rsi, qword [rdi]
mov rax, rbp
inc rax
cmp byte [rsi + rax], 0
jne 0x140040810
cmp rbx, rax
je 0x1400408d2
test r12d, r12d
jns 0x14004085d
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 0x1400408dd
mov edx, dword [0x140134108]
mov r8, qword [0x140134110]
jmp 0x1400407f0
cmp dword [0x1400fe0b0], 0
je 0x1400408ab
movsxd rdi, dword [0x140134108]
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.140008980
mov dword [0x1400fe0b4], 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 [0x140134108]
mov r8, qword [0x140134110]
test r12d, r12d
js 0x140040959
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 0x140040b32
sub ebp, 1
je 0x140040a4f
cmp ebp, 1
jne 0x140040b67
movzx r9d, byte [r10]
cmp r9b, 0x3d
jne 0x14004092d
movzx r9d, byte [r10 + 1]
lea rax, [r10 + 1]
cmovne rax, r10
xor ebx, ebx
test r9b, r9b
je 0x140040a40
mov r8d, 1
mov qword [0x140134100], rax
mov qword [0x140134110], r8
jmp 0x140040b69
mov r13, qword [rsp + 0xa0]
xor edi, edi
mov r15d, 2
test r13, r13
je 0x1400408fa
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 0x140040a06
cmp dword [0x1400fe0b0], eax
je 0x1400409c6
movsxd rax, dword [0x140134108]
mov rcx, qword [r14 + rax*8]
mov rax, qword [0x140134110]
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.140008980
mov rdx, qword [0x140134110]
movsxd r8, dword [0x140134108]
inc rdx
mov qword [0x140134110], rdx
mov rcx, qword [r14 + r8*8]
cmp byte [rdx + rcx], 0
jne 0x1400408ab
inc r8d
mov qword [0x140134110], 1
mov dword [0x140134108], r8d
jmp 0x1400408ab
cmp byte [rax + 1], 0x3a
jne 0x140040a1a
cmp byte [rbx + 2], 0x3a
mov eax, edi
sete al
lea ebp, [rax + 1]
jmp 0x140040a1c
mov ebp, edi
mov r8, qword [0x140134110]
movsxd rdx, dword [0x140134108]
movsx eax, byte [rbx]
lea r10, [r8 + 1]
add r10, qword [r14 + rdx*8]
mov dword [0x1400fe0b4], eax
jmp 0x140040904
mov rax, rbx
mov qword [0x140134100], rbx
jmp 0x140040b69
movzx r8d, byte [r10]
cmp r8b, 0x3d
jne 0x140040a5e
movzx r8d, byte [r10 + 1]
lea rax, [r10 + 1]
cmovne rax, r10
test r8b, r8b
je 0x140040a72
xor ebx, ebx
jmp 0x140040b1c
lea eax, [rdx + 1]
cmp eax, dword [rsp + 0x90]
jl 0x140040b11
cmp dword [0x1400fe0b0], 0
je 0x140040af5
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.140008980
mov ecx, 2
test r12d, r12d
js 0x140040ad4
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.140008980
jmp 0x140040aef
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.140008980
mov edx, dword [0x140134108]
inc edx
mov dword [0x1400fe0b4], 0x3a
mov dword [0x140134108], edx
mov eax, 0x3a
jmp 0x1400408ba
cdqe
mov ebx, 1
mov rax, qword [r14 + rax*8]
mov r8d, 1
mov qword [0x140134100], rax
mov qword [0x140134110], r8
jmp 0x140040b69
test r12d, r12d
jns 0x140040b4f
inc r8
movsxd rax, edx
mov qword [0x140134110], r8
mov rcx, qword [r14 + rax*8]
cmp byte [r8 + rcx], 0
jne 0x140040b5c
mov r8d, 1
mov qword [0x140134110], r8
xor ebx, ebx
mov qword [0x140134100], rbx
jmp 0x140040b69
xor ebx, ebx
cmp dword [rsp + 0x34], 0
jne 0x140040b99
cmp r8, 1
jne 0x140040baa
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x140040b9f
mov rdi, qword [rsp + 0x48]
lea r8d, [rbx + 1]
mov edx, eax
lea rcx, [r14 + rdi*8]
call fcn.140040c10
lea eax, [rdi + 1]
add eax, ebx
jmp 0x140040ba4
cmp r8, 1
jne 0x140040baa
lea eax, [rbx + 1]
add eax, edx
mov dword [0x140134108], eax
test r12d, r12d
js 0x140040be1
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x140040bbf
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 0x1400408ba
mov dword [rcx], eax
xor eax, eax
jmp 0x1400408ba
mov eax, dword [0x1400fe0b4]
jmp 0x1400408ba