Function at 0x140002940
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
mov r13, r9
mov r14, r8
mov r15, rdx
mov r12d, ecx
test r8, r8
je 0x140002e63
mov r8d, dword [0x14000c010]
mov eax, 1
test r8d, r8d
jne 0x140002991
mov dword [0x14000c678], eax
mov r8d, eax
mov dword [0x14000c010], eax
mov ecx, dword [0x14000c01c]
cmp ecx, 0xffffffff
je 0x1400029a5
cmp dword [0x14000c678], 0
je 0x1400029c7
lea rcx, str.POSIXLY_CORRECT
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r8d, dword [0x14000c010]
xor ecx, ecx
test rax, rax
setne cl
mov dword [0x14000c01c], ecx
movzx eax, byte [r14]
cmp al, 0x2d
jne 0x1400029db
mov ebp, dword [rsp + 0x88]
or ebp, 2
jmp 0x1400029fa
test ecx, ecx
jne 0x1400029ec
cmp al, 0x2b
je 0x1400029ec
mov ebp, dword [rsp + 0x88]
jmp 0x1400029fd
mov ebp, dword [rsp + 0x88]
and ebp, 0xfffffffe
cmp al, 0x2b
jne 0x1400029fd
inc r14
cmp dword [0x14000c678], 0
mov qword [0x14000c670], 0
je 0x140002a26
mov esi, 0xffffffff
mov dword [0x14000c00c], esi
mov edi, esi
mov dword [0x14000c008], esi
jmp 0x140002a32
mov edi, dword [0x14000c008]
mov esi, dword [0x14000c00c]
mov rbx, qword [section..data]
lea rcx, [0x1400095ae]
cmp dword [0x14000c678], 0
jne 0x140002a52
cmp byte [rbx], 0
jne 0x140002b9f
mov dword [0x14000c678], 0
cmp r8d, r12d
jge 0x140002e35
movsxd rax, r8d
mov rbx, qword [r15 + rax*8]
mov qword [section..data], rbx
cmp byte [rbx], 0x2d
jne 0x140002ab2
cmp byte [rbx + 1], 0
jne 0x140002b3b
mov edx, 0x2d
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov r8d, dword [0x14000c010]
lea rcx, [0x1400095ae]
mov edi, dword [0x14000c008]
mov esi, dword [0x14000c00c]
test rax, rax
jne 0x140002b34
mov qword [section..data], rcx
mov rbx, rcx
test bpl, 2
jne 0x140002e16
test bpl, 1
je 0x140002e63
cmp edi, 0xffffffff
jne 0x140002aee
mov edi, r8d
mov dword [0x14000c008], r8d
inc r8d
mov dword [0x14000c010], r8d
jmp 0x140002a40
cmp esi, 0xffffffff
je 0x140002b25
mov r9, r15
mov edx, esi
mov ecx, edi
call fcn.1400031e0
mov r8d, dword [0x14000c010]
lea rcx, [0x1400095ae]
mov eax, r8d
sub eax, esi
mov esi, 0xffffffff
add edi, eax
mov dword [0x14000c00c], esi
mov dword [0x14000c008], edi
inc r8d
mov dword [0x14000c010], r8d
jmp 0x140002a40
mov rbx, qword [section..data]
cmp edi, 0xffffffff
je 0x140002b4d
cmp esi, 0xffffffff
cmove esi, r8d
mov dword [0x14000c00c], esi
cmp byte [rbx + 1], 0
lea rax, [rbx + 1]
je 0x140002b9f
cmp byte [rax], 0x2d
mov rbx, rax
mov qword [section..data], rax
jne 0x140002b9f
cmp byte [rax + 1], 0
jne 0x140002b9f
inc r8d
mov qword [section..data], rcx
mov dword [0x14000c010], r8d
cmp esi, 0xffffffff
je 0x140002e4f
mov r9, r15
mov edx, esi
mov ecx, edi
call fcn.1400031e0
sub edi, esi
add dword [0x14000c010], edi
jmp 0x140002e4f
mov rsi, qword [rsp + 0x80]
test r13, r13
je 0x140002c1a
movsxd rax, r8d
cmp rbx, qword [r15 + rax*8]
je 0x140002c1a
movzx eax, byte [rbx]
cmp al, 0x2d
je 0x140002bc2
test bpl, 4
je 0x140002c1a
xor edi, edi
cmp al, 0x2d
jne 0x140002bd4
inc rbx
mov qword [section..data], rbx
jmp 0x140002bee
cmp al, 0x3a
je 0x140002bee
movsx edx, al
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
test rax, rax
mov eax, 1
cmovne edi, eax
mov r9, rsi
mov dword [rsp + 0x20], edi
mov r8, r13
mov rdx, r14
mov rcx, r15
call fcn.140002eb0
cmp eax, 0xffffffff
jne 0x140002cfc
mov r8d, dword [0x14000c010]
mov rbx, qword [section..data]
movsx edi, byte [rbx]
inc rbx
mov qword [section..data], rbx
cmp edi, 0x3a
je 0x140002dce
cmp edi, 0x2d
jne 0x140002c3e
cmp byte [rbx], 0
jne 0x140002dec
mov edx, edi
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x140002dc0
test r13, r13
je 0x140002d0f
cmp edi, 0x57
jne 0x140002d0f
cmp byte [rax + 1], 0x3b
jne 0x140002d0f
mov rax, qword [section..data]
cmp byte [rax], 0
jne 0x140002ce3
mov eax, dword [0x14000c010]
inc eax
mov dword [0x14000c010], eax
cmp eax, r12d
jl 0x140002cd6
cmp dword [0x14000c018], 0
lea rcx, [0x1400095ae]
mov qword [section..data], rcx
je 0x140002cb7
cmp byte [r14], 0x3a
je 0x140002cb7
mov edx, edi
lea rcx, str.option_requires_an_argument_____c
call fcn.1400032e0
mov dword [0x14000c014], 0x57
mov ecx, 0x3a
mov eax, 0x3f
cmp byte [r14], cl
cmove eax, ecx
jmp 0x140002e68
cdqe
mov rcx, qword [r15 + rax*8]
mov qword [section..data], rcx
mov r9, rsi
mov dword [rsp + 0x20], 0
mov r8, r13
mov rdx, r14
mov rcx, r15
call fcn.140002eb0
lea rcx, [0x1400095ae]
mov qword [section..data], rcx
jmp 0x140002e68
cmp byte [rax + 1], 0x3a
je 0x140002d32
mov rax, qword [section..data]
cmp byte [rax], 0
jne 0x140002db9
inc dword [0x14000c010]
mov eax, edi
jmp 0x140002e68
mov rcx, qword [section..data]
mov qword [0x14000c670], 0
cmp byte [rcx], 0
jne 0x140002d9e
cmp byte [rax + 2], 0x3a
je 0x140002da5
mov eax, dword [0x14000c010]
inc eax
mov dword [0x14000c010], eax
cmp eax, r12d
jl 0x140002d98
cmp dword [0x14000c018], 0
lea rcx, [0x1400095ae]
mov qword [section..data], rcx
je 0x140002d8d
cmp byte [r14], 0x3a
je 0x140002d8d
mov edx, edi
lea rcx, str.option_requires_an_argument_____c
call fcn.1400032e0
mov dword [0x14000c014], edi
jmp 0x140002cc1
cdqe
mov rcx, qword [r15 + rax*8]
mov qword [0x14000c670], rcx
inc dword [0x14000c010]
lea rcx, [0x1400095ae]
mov qword [section..data], rcx
mov eax, edi
jmp 0x140002e68
mov r8d, dword [0x14000c010]
mov rbx, qword [section..data]
cmp edi, 0x2d
jne 0x140002ddd
cmp byte [rbx], 0
jne 0x140002dec
jmp 0x140002e63
cmp byte [rbx], 0
jne 0x140002dec
inc r8d
mov dword [0x14000c010], r8d
cmp dword [0x14000c018], 0
je 0x140002e09
cmp byte [r14], 0x3a
je 0x140002e09
mov edx, edi
lea rcx, str.unknown_option_____c
call fcn.1400032e0
mov dword [0x14000c014], edi
mov eax, 0x3f
jmp 0x140002e68
movsxd rax, r8d
inc r8d
mov rcx, qword [r15 + rax*8]
mov eax, 1
mov qword [0x14000c670], rcx
mov dword [0x14000c010], r8d
jmp 0x140002e68
mov qword [section..data], rcx
cmp esi, 0xffffffff
jne 0x140002b86
cmp edi, esi
je 0x140002e4f
mov dword [0x14000c010], edi
mov dword [0x14000c00c], 0xffffffff
mov dword [0x14000c008], 0xffffffff
mov eax, 0xffffffff
mov rbx, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x70]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
ret