Function at 0x140001410
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r8d, dword [0x14007b154]
mov r13d, ecx
xor ecx, ecx
mov r15, rdx
cmp r8d, 0xffffffff
jne 0x140001457
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
xor ecx, ecx
mov r8d, ecx
test rax, rax
setne r8b
mov dword [0x14007b154], r8d
mov ebx, dword [reloc.WS2_32.dll_accept]
test r8d, r8d
mov r12d, 1
cmovne r12d, ecx
test ebx, ebx
jne 0x140001486
mov r14d, 1
mov ebx, r14d
mov dword [0x14007f558], r14d
mov dword [reloc.WS2_32.dll_accept], ebx
jmp 0x14000148d
mov r14d, dword [0x14007f558]
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x68], rsi
mov qword [0x14007f550], rcx
test r14d, r14d
je 0x1400014b6
or ebp, 0xffffffff
or esi, ebp
mov dword [0x14007b164], ebp
mov dword [0x14007b160], esi
jmp 0x1400014c2
mov esi, dword [0x14007b160]
mov ebp, dword [0x14007b164]
mov rdi, qword [0x14007b158]
nop dword [rax]
test r14d, r14d
jne 0x1400014de
cmp byte [rdi], r14b
jne 0x14000160e
mov dword [0x14007f558], ecx
mov r14d, ecx
cmp ebx, r13d
jge 0x140001814
movsxd rax, ebx
mov rdi, qword [r15 + rax*8]
mov qword [0x14007b158], rdi
cmp byte [rdi], 0x2d
jne 0x14000153d
cmp byte [rdi + 1], 0
jne 0x1400015b5
mov edx, Ordinal_46
lea rcx, str.Bc:Dhp:Px:kqr:R:s:t:T:o:u:O:Vd:f:l:
call qword [sym.imp.VCRUNTIME140.dll_strchr]
mov ebx, dword [reloc.WS2_32.dll_accept]
mov esi, dword [0x14007b160]
mov ebp, dword [0x14007b164]
test rax, rax
jne 0x1400015ac
mov r14d, dword [0x14007f558]
lea rdi, [0x14007ecd2]
mov qword [0x14007b158], rdi
test r12b, 2
jne 0x1400017f7
test r12b, 1
je 0x14000184a
cmp esi, 0xffffffff
jne 0x14000157b
mov esi, ebx
mov dword [0x14007b160], ebx
inc ebx
mov dword [reloc.WS2_32.dll_accept], ebx
xor ecx, ecx
jmp 0x1400014d0
cmp ebp, 0xffffffff
je 0x14000159d
mov r9, r15
call fcn.140001100
mov eax, ebx
sub eax, ebp
add esi, eax
or ebp, 0xffffffff
mov dword [0x14007b160], esi
mov dword [0x14007b164], ebp
inc ebx
mov dword [reloc.WS2_32.dll_accept], ebx
xor ecx, ecx
jmp 0x1400014d0
mov rdi, qword [0x14007b158]
xor ecx, ecx
cmp esi, 0xffffffff
je 0x1400015c6
cmp ebp, 0xffffffff
cmove ebp, ebx
mov dword [0x14007b164], ebp
cmp byte [rdi + 1], 0
lea rax, [rdi + 1]
je 0x14000160e
cmp byte [rax], 0x2d
mov rdi, rax
jne 0x14000160e
cmp byte [rax + 1], 0
jne 0x14000160e
inc ebx
lea rcx, [0x14007ecd3]
mov dword [reloc.WS2_32.dll_accept], ebx
mov qword [0x14007b158], rcx
cmp ebp, 0xffffffff
je 0x140001836
mov r9, r15
call fcn.140001100
sub esi, ebp
add ebx, esi
jmp 0x140001830
movsxd rax, ebx
cmp rdi, qword [r15 + rax*8]
je 0x14000165e
cmp byte [rdi], 0x2d
jne 0x14000165e
mov dword [rsp + 0x20], ecx
lea rdx, str.Bc:Dhp:Px:kqr:R:s:t:T:o:u:O:Vd:f:l:
inc rdi
mov rcx, r15
mov qword [0x14007b158], rdi
call fcn.1400011e0
cmp eax, 0xffffffff
je 0x140001651
lea rcx, [0x14007ecd4]
mov qword [0x14007b158], rcx
jmp 0x14000184d
mov ebx, dword [reloc.WS2_32.dll_accept]
mov rdi, qword [0x14007b158]
movsx esi, byte [rdi]
inc rdi
mov qword [0x14007b158], rdi
cmp esi, 0x3a
je 0x1400017c9
cmp esi, 0x2d
jne 0x140001682
cmp byte [rdi], 0
jne 0x1400017e2
mov edx, esi
lea rcx, str.Bc:Dhp:Px:kqr:R:s:t:T:o:u:O:Vd:f:l:
call qword [sym.imp.VCRUNTIME140.dll_strchr]
test rax, rax
je 0x1400017bc
cmp esi, 0x57
jne 0x140001725
cmp byte [rax + 1], 0x3b
jne 0x140001725
mov rax, qword [0x14007b158]
cmp byte [rax], 0
jne 0x1400016fb
mov eax, dword [reloc.WS2_32.dll_accept]
inc eax
mov dword [reloc.WS2_32.dll_accept], eax
cmp eax, r13d
jl 0x1400016ee
lea rax, [0x14007ecd5]
mov edx, esi
lea rcx, str.option_requires_an_argument_____c
mov qword [0x14007b158], rax
call fcn.140001060
mov eax, 0x3f
jmp 0x14000184d
cdqe
mov rcx, qword [r15 + rax*8]
mov qword [0x14007b158], rcx
lea rdx, str.Bc:Dhp:Px:kqr:R:s:t:T:o:u:O:Vd:f:l:
mov dword [rsp + 0x20], 0
mov rcx, r15
call fcn.1400011e0
lea rcx, [0x14007ecd6]
mov qword [0x14007b158], rcx
jmp 0x14000184d
cmp byte [rax + 1], 0x3a
je 0x140001744
mov rax, qword [0x14007b158]
cmp byte [rax], 0
jne 0x14000177e
inc dword [reloc.WS2_32.dll_accept]
mov eax, esi
jmp 0x14000184d
mov rcx, qword [0x14007b158]
mov qword [0x14007f550], 0
cmp byte [rcx], 0
je 0x140001785
mov qword [0x14007f550], rcx
mov edx, dword [reloc.WS2_32.dll_accept]
lea rax, [0x14007ecd8]
inc edx
mov qword [0x14007b158], rax
mov dword [reloc.WS2_32.dll_accept], edx
mov eax, esi
jmp 0x14000184d
cmp byte [rax + 2], 0x3a
je 0x140001762
mov edx, dword [reloc.WS2_32.dll_accept]
inc edx
mov dword [reloc.WS2_32.dll_accept], edx
cmp edx, r13d
jl 0x1400017ac
lea rax, [0x14007ecd7]
mov edx, esi
jmp 0x1400016d1
movsxd rax, edx
mov rcx, qword [r15 + rax*8]
mov qword [0x14007f550], rcx
jmp 0x140001768
mov ebx, dword [reloc.WS2_32.dll_accept]
mov rdi, qword [0x14007b158]
cmp esi, 0x2d
jne 0x1400017d5
cmp byte [rdi], 0
jne 0x1400017e2
jmp 0x14000184a
cmp byte [rdi], 0
jne 0x1400017e2
inc ebx
mov dword [reloc.WS2_32.dll_accept], ebx
mov edx, esi
lea rcx, str.unknown_option_____c
call fcn.140001060
mov eax, 0x3f
jmp 0x14000184d
movsxd rcx, ebx
mov eax, 1
inc ebx
mov dword [reloc.WS2_32.dll_accept], ebx
mov rdx, qword [r15 + rcx*8]
mov qword [0x14007f550], rdx
jmp 0x14000184d
lea rax, [0x14007ecd1]
mov qword [0x14007b158], rax
cmp ebp, 0xffffffff
jne 0x1400015fd
cmp esi, ebp
cmovne ebx, esi
mov dword [reloc.WS2_32.dll_accept], ebx
mov dword [0x14007b160], 0xffffffff
mov dword [0x14007b164], 0xffffffff
or eax, 0xffffffff
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret