Function at 0x140003590
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov qword [rsp + 0xa8], r9
mov esi, ecx
mov r14, rdx
mov r13, r8
test r8, r8
je 0x1400038be
mov r9d, dword [0x14000a25c]
test r9d, r9d
je 0x140003758
cmp dword [0x14000a240], 0xffffffff
je 0x14000376c
mov eax, dword [0x14000f198]
test eax, eax
jne 0x14000376c
movzx edx, byte [r13]
cmp dl, 0x2d
je 0x1400037a0
mov r8d, dword [0x14000a240]
test r8d, r8d
jne 0x140003603
cmp dl, 0x2b
jne 0x140003614
and dword [rsp + 0xb8], 0xfffffffe
cmp dl, 0x2b
je 0x1400037a8
mov qword [0x14000f190], 0
test eax, eax
je 0x140003637
mov dword [0x14000a244], 0xffffffff
mov dword [0x14000a248], 0xffffffff
mov edi, dword [rsp + 0xb8]
mov r12d, dword [rsp + 0xb8]
lea rbp, [0x14000bc08]
and edi, 2
and r12d, 1
test eax, eax
je 0x1400036c9
mov dword [0x14000f198], 0
mov ebx, dword [0x14000a25c]
cmp ebx, esi
jge 0x140003880
movsxd rax, ebx
mov r15, qword [r14 + rax*8]
cmp byte [r15], 0x2d
mov qword [0x14000a250], r15
je 0x1400037b8
mov qword [0x14000a250], rbp
test edi, edi
jne 0x1400038e0
test r12d, r12d
je 0x1400038be
mov r15d, dword [0x14000a248]
cmp r15d, 0xffffffff
je 0x140003820
mov edx, dword [0x14000a244]
cmp edx, 0xffffffff
jne 0x140003838
add ebx, 1
mov dword [0x14000a25c], ebx
mov r9, qword [0x14000a250]
movzx eax, byte [r9]
test al, al
je 0x140003658
cmp qword [rsp + 0xa8], 0
je 0x140003706
movsxd rdx, dword [0x14000a25c]
cmp qword [r14 + rdx*8], r9
je 0x140003706
cmp al, 0x2d
je 0x140003b4d
test byte [rsp + 0xb8], 4
jne 0x140003911
lea rbx, [r9 + 1]
movsx r12d, al
mov qword [0x14000a250], rbx
cmp al, 0x3a
jne 0x140003968
cmp byte [r9 + 1], 0
jne 0x14000372b
add dword [0x14000a25c], 1
mov ecx, dword [0x14000a260]
test ecx, ecx
je 0x140003740
cmp byte [r13], 0x3a
jne 0x140003ae8
mov dword [0x14000a258], r12d
mov r12d, 0x3f
jmp 0x1400038c4
mov dword [0x14000f198], 1
mov dword [0x14000a25c], 1
xor edx, edx
xor r8d, r8d
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
movzx edx, byte [r13]
test eax, eax
setne al
movzx eax, al
mov dword [0x14000a240], eax
mov eax, dword [0x14000f198]
cmp dl, 0x2d
jne 0x1400035f2
or dword [rsp + 0xb8], 2
add r13, 1
jmp 0x140003614
movzx eax, byte [r15 + 1]
test al, al
jne 0x140003a6b
mov edx, 0x2d
mov rcx, r13
call sub.msvcrt.dll_strchr
test rax, rax
je 0x140003688
cmp dword [0x14000a248], 0xffffffff
je 0x140003b5f
cmp dword [0x14000a244], 0xffffffff
je 0x140003b42
lea rbx, [r15 + 1]
mov qword [0x14000a250], rbx
cmp byte [r15 + 1], 0
je 0x140003a28
mov r12d, 0x2d
jmp 0x14000372b
mov dword [0x14000a248], ebx
add ebx, 1
mov dword [0x14000a25c], ebx
jmp 0x1400036c9
mov ecx, r15d
mov r9, r14
mov r8d, ebx
mov dword [rsp + 0x38], edx
call fcn.1400030a0
mov ecx, dword [0x14000a25c]
mov edx, dword [rsp + 0x38]
mov dword [0x14000a244], 0xffffffff
mov eax, ecx
sub edx, r15d
add ecx, 1
sub eax, edx
mov dword [0x14000a25c], ecx
mov dword [0x14000a248], eax
mov eax, dword [0x14000f198]
jmp 0x140003654
mov esi, dword [0x14000a244]
lea rax, [0x14000bc08]
mov edi, dword [0x14000a248]
mov qword [0x14000a250], rax
cmp esi, 0xffffffff
jne 0x1400038f8
cmp edi, 0xffffffff
je 0x1400038aa
mov dword [0x14000a25c], edi
mov dword [0x14000a244], 0xffffffff
mov dword [0x14000a248], 0xffffffff
mov r12d, 0xffffffff
mov eax, r12d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add ebx, 1
mov qword [0x14000f190], r15
mov r12d, 1
mov dword [0x14000a25c], ebx
jmp 0x1400038c4
mov r9, r14
mov r8d, ebx
mov edx, esi
mov ecx, edi
sub esi, edi
call fcn.1400030a0
sub dword [0x14000a25c], esi
jmp 0x1400038aa
xor edx, edx
cmp al, 0x3a
je 0x14000392a
movsx edx, al
mov rcx, r13
call sub.msvcrt.dll_strchr
xor edx, edx
test rax, rax
setne dl
mov dword [rsp + 0x20], edx
mov r9, qword [rsp + 0xb0]
mov rdx, r13
mov rcx, r14
mov r8, qword [rsp + 0xa8]
call fcn.1400031f0
mov r12d, eax
cmp eax, 0xffffffff
je 0x140003ad8
lea rax, [0x14000bc08]
mov qword [0x14000a250], rax
jmp 0x1400038c4
cmp r12d, 0x2d
je 0x140003b6d
mov edx, r12d
mov rcx, r13
mov qword [rsp + 0x38], r9
call sub.msvcrt.dll_strchr
mov r9, qword [rsp + 0x38]
test rax, rax
je 0x14000371d
cmp qword [rsp + 0xa8], 0
movzx edx, byte [rax + 1]
je 0x140003a4b
cmp r12d, 0x57
jne 0x140003a4b
cmp dl, 0x3b
jne 0x140003a4b
cmp byte [r9 + 1], 0
jne 0x140003ba8
mov eax, dword [0x14000a25c]
add eax, 1
mov dword [0x14000a25c], eax
cmp eax, esi
jl 0x140003b9b
mov edx, dword [0x14000a260]
lea rax, [0x14000bc08]
mov qword [0x14000a250], rax
test edx, edx
je 0x140003a08
cmp byte [r13], 0x3a
je 0x140003a08
mov edx, 0x57
lea rcx, str.option_requires_an_argument_____c
call fcn.140003160
mov dword [0x14000a258], 0x57
cmp byte [r13], 0x3a
je 0x140003c13
mov r12d, 0x3f
jmp 0x1400038c4
mov edx, 0x2d
mov rcx, r13
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1400038be
movzx edx, byte [rax + 1]
mov r9, r15
mov r12d, 0x2d
cmp dl, 0x3a
je 0x140003afc
cmp byte [r9 + 1], 0
jne 0x1400038c4
add dword [0x14000a25c], 1
jmp 0x1400038c4
mov edi, dword [0x14000a248]
cmp edi, 0xffffffff
je 0x140003a83
cmp dword [0x14000a244], 0xffffffff
je 0x140003b37
lea r9, [r15 + 1]
mov qword [0x14000a250], r9
cmp al, 0x2d
jne 0x1400036d8
cmp byte [r15 + 2], 0
jne 0x1400036d8
mov esi, dword [0x14000a244]
lea r8d, [rbx + 1]
lea rax, [0x14000bc08]
mov dword [0x14000a25c], r8d
mov qword [0x14000a250], rax
cmp esi, 0xffffffff
je 0x1400038aa
mov r9, r14
jmp 0x1400038fe
mov r9, qword [0x14000a250]
movzx eax, byte [r9]
jmp 0x140003706
mov edx, r12d
lea rcx, str.unknown_option_____c
call fcn.140003160
jmp 0x140003740
mov qword [0x14000f190], 0
cmp byte [r9 + 1], 0
mov edx, dword [0x14000a25c]
je 0x140003b78
mov qword [0x14000f190], rbx
lea rax, [0x14000bc08]
add edx, 1
mov qword [0x14000a250], rax
mov dword [0x14000a25c], edx
jmp 0x1400038c4
mov dword [0x14000a244], ebx
jmp 0x140003a83
mov dword [0x14000a244], ebx
jmp 0x1400037f5
add r9, 1
xor edx, edx
mov qword [0x14000a250], r9
jmp 0x14000392a
lea rbx, [r15 + 1]
mov r9, r15
mov qword [0x14000a250], rbx
mov r15, r9
jmp 0x140003800
cmp byte [rax + 2], 0x3a
je 0x140003b1b
add edx, 1
mov dword [0x14000a25c], edx
cmp esi, edx
jle 0x140003bd3
movsxd rax, edx
mov rax, qword [r14 + rax*8]
mov qword [0x14000f190], rax
jmp 0x140003b1b
cdqe
mov rax, qword [r14 + rax*8]
mov qword [0x14000a250], rax
mov dword [rsp + 0x20], 0
mov r9, qword [rsp + 0xb0]
mov rdx, r13
mov rcx, r14
mov r8, qword [rsp + 0xa8]
call fcn.1400031f0
mov r12d, eax
jmp 0x140003955
lea rax, [0x14000bc08]
mov qword [0x14000a250], rax
mov eax, dword [0x14000a260]
test eax, eax
je 0x140003c01
cmp byte [r13], 0x3a
je 0x140003c01
mov edx, r12d
lea rcx, str.option_requires_an_argument_____c
call fcn.140003160
mov dword [0x14000a258], r12d
cmp byte [r13], 0x3a
jne 0x140003a1d
mov r12d, 0x3a
jmp 0x1400038c4