Function at 0x140038ce8
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
test ecx, ecx
je 0x140038d1d
mov r12, rdx
test rdx, rdx
je 0x140038d1d
mov r13, r9
mov rsi, r8
mov rax, r8
or rax, r9
jne 0x140038d42
mov dword [0x1401994d8], 0x3f
mov edi, 0x3f
mov eax, edi
add rsp, 0x88
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov ebx, ecx
mov r14d, dword [0x14019f138]
mov edi, 0xffffffff
cmp r14d, ecx
jge 0x140038d2c
movsxd rax, r14d
mov rcx, qword [r12 + rax*8]
test rcx, rcx
je 0x140038d2c
lea rdx, [0x140141a91]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x140038db9
test r14d, r14d
jne 0x140038d91
mov dword [0x14019f138], 1
mov qword [0x14019f140], 1
mov r14d, 1
test rsi, rsi
je 0x140038dc8
movzx eax, byte [rsi]
cmp eax, 0x2d
je 0x140038da3
cmp eax, 0x2b
jne 0x140038dc8
xor ecx, ecx
cmp al, 0x2d
sete cl
mov eax, 2
sub eax, ecx
mov dword [rbp + 4], eax
inc rsi
jmp 0x140038de1
inc r14d
mov dword [0x14019f138], r14d
jmp 0x140038d2c
lea rcx, str.POSIXLY_CORRECT
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
xor ecx, ecx
test rax, rax
setne cl
add ecx, ecx
mov dword [rbp + 4], ecx
mov r11d, dword [rbp + 0x78]
mov r15, qword [0x14019f140]
cmp r15, 1
jne 0x140038eed
mov eax, dword [rbp + 4]
cmp eax, 2
je 0x140038ea4
cmp eax, 1
je 0x140038ec8
test eax, eax
jne 0x140038eed
mov qword [rbp - 8], r15
movsxd rax, r14d
mov qword [rbp - 0x10], rax
mov rcx, qword [r12 + rax*8]
test rcx, rcx
je 0x140038dbc
test r11d, r11d
setne al
mov dl, byte [rcx]
cmp dl, 0x2b
sete r8b
xor r15d, r15d
cmp dl, 0x2d
je 0x140039333
mov rdx, r14
and al, r8b
jne 0x140039336
mov rax, qword [rbp - 0x10]
lea r8, [r12 + rax*8]
add r8, 8
mov r9d, edx
xor r15d, r15d
mov r14, rdx
lea eax, [r9 + r15]
inc eax
mov dword [0x14019f138], eax
mov rcx, qword [r8 + r15*8]
test rcx, rcx
je 0x140038dbc
test r11d, r11d
setne al
mov r10b, byte [rcx]
cmp r10b, 0x2b
sete dl
inc r15
cmp r10b, 0x2d
je 0x140038e99
and al, dl
je 0x140038e63
mov rdx, r14
add r14d, r15d
jmp 0x140039336
movsxd rax, r14d
mov rax, qword [r12 + rax*8]
test rax, rax
je 0x140038eed
mov al, byte [rax]
cmp al, 0x2d
je 0x140038eed
test r11d, r11d
je 0x140038d2c
cmp al, 0x2b
je 0x140038eed
jmp 0x140038d2c
movsxd rax, r14d
mov rax, qword [r12 + rax*8]
test rax, rax
je 0x140038eed
mov cl, byte [rax]
cmp cl, 0x2d
je 0x140038eed
test r11d, r11d
je 0x14003937d
cmp cl, 0x2b
jne 0x14003937d
xor eax, eax
mov qword [rbp - 0x10], rax
xor edi, edi
mov edx, 0xffffffff
movsxd rax, r14d
test r13, r13
mov qword [rbp - 0x18], rdi
je 0x140038fb1
mov qword [rbp - 8], rax
mov rdi, qword [r12 + rax*8]
lea rdx, [0x140141a91]
mov r8d, 2
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
je 0x140038f4f
cmp dword [rbp + 0x78], 0
je 0x140038fa4
cmp byte [rdi], 0x2b
mov edx, 0xffffffff
jne 0x140038fa9
mov rax, r15
mov r15d, 1
cmp rax, 1
je 0x140038f66
mov r15, rax
jmp 0x140038fa9
cmp r15, 1
jne 0x140038fa4
mov qword [0x14019f140], 2
mov r15d, 2
mov qword [rbp - 0x48], rsi
lea rcx, [rdi + r15]
mov qword [rbp - 0x20], rcx
mov edx, 0x3d
call sub.VCRUNTIME140.dll_strchr
test rax, rax
mov qword [rbp - 0x30], r14
mov qword [rbp - 0x40], rdi
mov qword [rbp - 0x28], r12
je 0x1400391c4
mov qword [rbp - 0x38], rax
mov rsi, rax
mov rcx, qword [rbp - 0x20]
sub rsi, rcx
jmp 0x1400391dd
mov edx, 0xffffffff
mov rdi, qword [rbp - 0x18]
mov rax, qword [rbp - 8]
test rsi, rsi
je 0x140039064
mov dword [rbp - 8], edx
mov rdi, qword [r12 + rax*8]
movsx edx, byte [rdi + r15]
mov rcx, rsi
mov esi, edx
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x14003906c
mov r8, r15
mov qword [rbp - 0x40], rdi
lea rcx, [rdi + r15]
xor esi, esi
cmp byte [rax + 1], 0x3a
jne 0x140038ff8
xor esi, esi
cmp byte [rax + 2], 0x3a
sete sil
inc esi
inc rcx
mov qword [rbp - 0x38], rcx
movsx ecx, byte [rax]
mov dword [0x1401994d8], ecx
mov cl, 1
mov rdi, qword [rbp - 0x18]
mov edx, dword [rbp - 8]
mov r15, r8
test esi, esi
je 0x1400390dd
cmp esi, 1
je 0x14003918e
cmp esi, 2
jne 0x140039064
xor eax, eax
mov rbx, qword [rbp - 0x38]
cmp byte [rbx], 0x3d
sete al
cmp byte [rbx + rax], 0
mov ecx, dword [rbp + 4]
je 0x14003910a
add rbx, rax
mov qword [0x14019f130], rbx
mov qword [0x14019f140], 1
mov esi, 1
mov al, 1
jmp 0x140039121
mov ecx, dword [rbp + 4]
jmp 0x140039115
cmp dword [0x1401994d4], 0
je 0x1400390ac
mov ebx, esi
mov rsi, qword [r12]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
lea rdx, str._s:_invalid_option_______c_n
mov rcx, rax
mov r8, rsi
mov r9d, ebx
call fcn.140014500
mov r15, qword [0x14019f140]
movsxd r14, dword [0x14019f138]
mov rdi, qword [r12 + r14*8]
lea rax, [r15 + 1]
mov qword [0x14019f140], rax
cmp byte [rdi + r15 + 1], 0
jne 0x140038d1d
inc r14d
mov dword [0x14019f138], r14d
mov qword [0x14019f140], 1
jmp 0x140038d1d
mov eax, 1
test cl, cl
je 0x1400390fd
mov rax, qword [rbp - 0x40]
cmp byte [rax + r15 + 1], 0
lea rcx, [r15 + 1]
mov eax, 1
cmovne rax, rcx
mov qword [0x14019f140], rax
mov r15, rax
mov ecx, dword [rbp + 4]
mov qword [0x14019f130], 0
cmp r15, 1
sete al
mov esi, 1
test ecx, ecx
jne 0x140039145
test al, al
je 0x140039145
test edi, edi
je 0x140039145
mov r14, qword [rbp - 0x10]
lea rcx, [r12 + r14*8]
mov ebx, edx
mov edx, edi
mov r8d, esi
call fcn.14003945d
mov edx, ebx
jmp 0x140039149
test al, al
je 0x140039152
add esi, r14d
mov dword [0x14019f138], esi
test edx, edx
js 0x140039183
mov rax, qword [rbp + 0x70]
test rax, rax
je 0x140039161
mov dword [rax], edx
mov ecx, edx
shl rcx, 5
mov rax, qword [r13 + rcx + 0x10]
mov edi, dword [r13 + rcx + 0x18]
test rax, rax
je 0x140038d2c
mov dword [rax], edi
xor edi, edi
jmp 0x140038d2c
mov edi, dword [0x1401994d8]
jmp 0x140038d2c
xor esi, esi
mov rcx, qword [rbp - 0x38]
cmp byte [rcx], 0x3d
sete sil
cmp byte [rcx + rsi], 0
je 0x140039269
add rcx, rsi
mov qword [0x14019f130], rcx
mov qword [0x14019f140], 1
mov esi, 1
jmp 0x140039293
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rsi, rax
add rax, rdi
mov qword [rbp - 0x38], rax
sub rsi, r15
mov rcx, qword [rbp - 0x20]
mov rdi, qword [r13]
test rdi, rdi
mov edx, 0xffffffff
mov rax, qword [rbp - 8]
je 0x140039254
mov qword [rbp - 0x50], r15
mov qword [rbp - 0x20], r13
add r13, 0x20
mov r14d, 0xffffffff
xor r15d, r15d
mov r12, rcx
mov rdx, rdi
mov r8, rsi
call sub.api_ms_win_crt_string_l1_1_0.dll_strncmp
test eax, eax
je 0x14003921f
mov edx, r14d
mov rax, qword [rbp - 8]
jmp 0x14003923c
mov rcx, rdi
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
cmp rsi, rax
je 0x14003929d
mov edx, r15d
test r14d, r14d
mov rax, qword [rbp - 8]
jns 0x1400392e1
mov rdi, qword [r13]
inc r15d
add r13, 0x20
mov r14d, edx
test rdi, rdi
mov rcx, r12
jne 0x140039204
jmp 0x1400392a4
mov r14, qword [rbp - 0x30]
mov rdi, qword [rbp - 0x18]
mov r12, qword [rbp - 0x28]
mov rsi, qword [rbp - 0x48]
jmp 0x140038fb1
lea ecx, [r14 + 1]
cmp ecx, ebx
jge 0x1400393a2
movsxd rax, ecx
mov rax, qword [r12 + rax*8]
mov qword [0x14019f130], rax
mov qword [0x14019f140], 1
mov esi, 2
mov al, 1
mov ecx, dword [rbp + 4]
jmp 0x140039121
mov edx, r15d
mov rax, qword [rbp - 8]
test edx, edx
mov r14, qword [rbp - 0x30]
mov rdi, qword [rbp - 0x18]
mov r15, qword [rbp - 0x50]
mov rsi, qword [rbp - 0x48]
js 0x1400392d4
mov eax, edx
shl rax, 5
mov r13, qword [rbp - 0x20]
mov esi, dword [r13 + rax + 8]
xor ecx, ecx
xor eax, eax
mov r12, qword [rbp - 0x28]
jmp 0x140039014
mov r13, qword [rbp - 0x20]
mov r12, qword [rbp - 0x28]
jmp 0x140038fb1
cmp dword [0x1401994d4], 0
je 0x140038d1d
mov eax, r14d
shl rax, 5
mov rcx, qword [rbp - 0x20]
mov rbx, qword [rcx + rax]
mov rax, qword [rbp - 0x28]
mov rsi, qword [rax]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rbx
lea rdx, str._s:_option___s_is_ambiguous__could_be_____s_or_____s__n
mov rcx, rax
mov r8, rsi
mov r9, qword [rbp - 0x40]
call fcn.140014500
jmp 0x140038d1d
mov rdx, r14
mov qword [rbp - 0x30], rdx
lea rdx, [0x140141a91]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x140039356
mov rdi, r15
mov r15, qword [rbp - 8]
jmp 0x140038ef5
mov rax, qword [rbp - 0x10]
lea rcx, [r12 + rax*8]
mov edx, r15d
mov r8d, 1
call fcn.14003945d
mov rax, qword [rbp - 0x30]
inc eax
mov dword [0x14019f138], eax
jmp 0x140038d2c
inc r14d
mov dword [0x14019f138], r14d
mov qword [0x14019f130], rax
mov dword [0x1401994d8], 1
mov edi, 1
jmp 0x140038d2c
cmp dword [0x1401994d4], 0
je 0x14003941c
mov rsi, rax
mov rdi, qword [r12]
mov ecx, 2
mov ebx, edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
lea rdx, str._s:_argument_required_for_option__
mov rcx, rax
mov r8, rdi
call fcn.140014500
test ebx, ebx
js 0x1400393fd
mov eax, ebx
shl rax, 5
mov rsi, qword [r13 + rax]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
lea rdx, str.___s_n
mov rcx, rax
mov r8, rsi
call fcn.140014500
jmp 0x14003941c
movsx esi, byte [rsi]
mov ecx, 2
call sub.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func
lea rdx, [0x140147a4a]
mov rcx, rax
mov r8d, esi
call fcn.140014500
inc dword [0x14019f138]
mov dword [0x1401994d8], 0x3a
mov edi, 0x3a
jmp 0x140038d2c