Function at 0x1400c8510
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x88
lea rbp, [rsp + 0x80]
test rdx, rdx
mov r14, rcx
mov qword [rbp + 0x58], rdx
mov qword [rbp + 0x60], r8
mov dword [rbp + 0x68], r9d
je 0x1400c8bf8
mov rax, qword [sym.imp.msvcrt.dll__errno]
mov qword [rbp - 0x28], rax
call rax
mov r8d, dword [0x1402a2940]
mov eax, dword [rax]
test r14, r14
cmove r14, qword [str.messages]
test r8d, r8d
mov dword [rbp - 0x2c], eax
je 0x1400c88f0
mov rbx, qword [0x1402a5808]
test rbx, rbx
jne 0x1400c8593
jmp 0x1400c88d2
js 0x1400c88d0
mov rbx, qword [rbx]
test rbx, rbx
je 0x1400c88d2
lea rdx, [rbx + 0x18]
mov rcx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400c8581
mov r13, qword [rbx + 8]
movzx eax, byte [r13]
cmp al, 0x2f
je 0x1400c868a
cmp al, 0x5c
je 0x1400c868a
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x1400c85d1
cmp byte [r13 + 1], 0x3a
je 0x1400c868a
mov rcx, r13
mov r12d, 0x106
call sub.msvcrt.dll_strlen
mov r15, qword [rbp - 0x28]
lea rdi, [rax + 1]
jmp 0x1400c8607
call r15
cmp dword [rax], 0x22
jne 0x1400c8863
mov rax, r12
shr rax, 1
lea r12, [r12 + rax + 0x20]
lea rax, [r12 + rdi + 0x1e]
and rax, 0xfffffffffffffff0
call fcn.14015b2e0
sub rsp, rax
lea rsi, [rsp + 0x30]
call r15
mov edx, r12d
mov dword [rax], 0
mov rcx, rsi
call sub.msvcrt.dll__getcwd
test rax, rax
je 0x1400c85f0
xor edx, edx
mov rcx, rsi
call sub.msvcrt.dll_strchr
lea rdx, [0x14019fbc9]
nop word [rax + rax]
add rdx, 1
movzx ecx, byte [rdx - 1]
add rax, 1
test cl, cl
mov byte [rax - 1], cl
jne 0x1400c8650
add r13, 1
movzx edx, byte [r13 - 1]
test dl, dl
mov byte [rax - 1], dl
je 0x1400c8687
add r13, 1
movzx edx, byte [r13 - 1]
add rax, 1
test dl, dl
mov byte [rax - 1], dl
jne 0x1400c8673
mov r13, rsi
cmp dword [rbp + 0x78], 3
je 0x1400c88e3
jle 0x1400c8900
cmp dword [rbp + 0x78], 5
lea r12, [0x14019fbf6]
je 0x1400c86d0
lea r12, [0x14019fbeb]
jl 0x1400c86d0
cmp dword [rbp + 0x78], 0x6c1
lea r12, [0x14019fbfe]
je 0x1400c86d0
lea r12, [0x14019fc11]
nop word [rax + rax]
mov ecx, dword [rbp + 0x78]
mov rdx, r12
call fcn.1400cac00
xor edx, edx
test rax, rax
mov r15, rax
je 0x1400c8be6
lea rdi, [0x14019fc1c]
mov ecx, 2
mov rsi, r15
repe cmpsb byte [rsi], byte [rdi]
jne 0x1400c8b70
mov rcx, r14
call sub.msvcrt.dll_strlen
mov rcx, r12
mov rdi, rax
mov qword [rbp - 0x38], rax
call sub.msvcrt.dll_strlen
lea rax, [rdi + rax + 0x23]
and rax, 0xfffffffffffffff0
call fcn.14015b2e0
sub rsp, rax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x18], rax
mov rcx, rax
jmp 0x1400c8743
mov rcx, rax
add r12, 1
movzx edx, byte [r12 - 1]
lea rax, [rcx + 1]
test dl, dl
mov byte [rax - 1], dl
jne 0x1400c8740
lea rdx, [0x14019fbc9]
jmp 0x1400c8768
mov rcx, rax
add rax, 1
add rdx, 1
movzx r8d, byte [rdx - 1]
test r8b, r8b
mov byte [rax - 1], r8b
jne 0x1400c8761
mov r8, qword [rbp - 0x38]
mov rdx, r14
call fcn.14015bdd0
lea rdx, [0x14019fc18]
nop dword [rax]
add rdx, 1
movzx ecx, byte [rdx - 1]
add rax, 1
test cl, cl
mov byte [rax - 1], cl
jne 0x1400c8790
mov rcx, r15
call sub.msvcrt.dll_strlen
add rax, 0x1f
and rax, 0xfffffffffffffff0
call fcn.14015b2e0
sub rsp, rax
lea rax, [rbp - 8]
lea r12, [rsp + 0x30]
mov qword [rbp - 0x20], rax
nop dword [rax + rax]
movzx eax, byte [r15]
cmp al, 0x3a
je 0x1400c89c0
test al, al
jne 0x1400c8935
mov byte [r12], 0x43
mov byte [r12 + 1], 0
lea rdi, [0x14019fc1c]
mov ecx, 2
mov rsi, r12
repe cmpsb byte [rsi], byte [rdi]
je 0x1400c8863
lea rdi, str.POSIX
mov ecx, 6
mov rsi, r12
repe cmpsb byte [rsi], byte [rdi]
je 0x1400c8863
mov r8, qword [rbp - 0x18]
mov r9, rbx
mov rdx, r12
mov rcx, r13
call fcn.1400d1020
test rax, rax
mov rsi, rax
je 0x1400c87d0
mov rax, qword [rbp - 0x20]
mov r8, qword [rbp + 0x58]
mov r9d, 1
mov rdx, rbx
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.1400c7d40
test rax, rax
je 0x1400c89d0
cmp rax, 0xffffffffffffffff
mov r9, rax
jne 0x1400c8a42
cmp dword [0x1402a2940], 1
je 0x1400c8890
lea rcx, str.GETTEXT_LOG_UNTRANSLATED
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1400c8890
cmp byte [rax], 0
jne 0x1400c8bb6
nop word cs:[rax + rax]
mov rax, qword [rbp - 0x28]
call rax
cmp dword [rbp + 0x70], 1
mov edi, dword [rbp - 0x2c]
mov dword [rax], edi
je 0x1400c8bad
mov eax, dword [rbp + 0x68]
test eax, eax
je 0x1400c8bad
mov r9, qword [rbp + 0x60]
mov rax, r9
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor ebx, ebx
cmp dword [rbp + 0x78], 3
lea r13, [0x14019fc60]
jne 0x1400c8694
lea r12, [0x14019fbdf]
jmp 0x1400c86d0
mov dword [0x1402a2940], 0xffffffff
jmp 0x1400c8570
cmp dword [rbp + 0x78], 1
lea r12, [0x14019fbcb]
je 0x1400c86d0
lea r12, [0x14019fbd6]
jg 0x1400c86d0
mov ecx, dword [rbp + 0x78]
lea r12, [0x14019fc0a]
test ecx, ecx
je 0x1400c86d0
jmp 0x1400c86c0
mov rdx, r12
jmp 0x1400c8944
cmp al, 0x3a
je 0x1400c8957
add rdx, 1
add r15, 1
mov byte [rdx - 1], al
movzx eax, byte [r15]
test al, al
jne 0x1400c8940
cmp dword [0x1402a2940], 1
mov byte [rdx], 0
jne 0x1400c87ef
mov edx, 0x2f
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x1400c87d0
mov edx, 0x5c
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x1400c87d0
movzx eax, byte [r12]
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x1400c87ef
cmp byte [r12 + 1], 0x3a
jne 0x1400c87ef
jmp 0x1400c87d0
add r15, 1
jmp 0x1400c87d0
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x1400c87d0
xor edi, edi
mov qword [rbp - 0x40], r13
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x50], r12
mov r15, qword [rbp + 0x58]
mov r12, rdi
mov r13, qword [rbp - 0x20]
jmp 0x1400c8a12
add r12, 1
mov rcx, qword [rsi + r12*8 + 0x20]
test rcx, rcx
je 0x1400c8bd5
mov qword [rsp + 0x20], r13
mov r9d, 1
mov r8, r15
mov rdx, rbx
call fcn.1400c7d40
cmp rax, 0xffffffffffffffff
je 0x1400c8863
test rax, rax
je 0x1400c8a00
movsxd rdi, r12d
mov r9, rax
mov rsi, qword [rsi + rdi*8 + 0x20]
mov rcx, qword [rbp + 0x58]
mov qword [rbp - 0x18], r9
call sub.msvcrt.dll_strlen
mov r15, qword [rbp - 0x38]
lea rdi, [rax + 1]
lea rcx, [rdi + r15 + 0x29]
call sub.msvcrt.dll_malloc
test rax, rax
mov rbx, rax
mov r9, qword [rbp - 0x18]
je 0x1400c8af6
mov rdx, qword [rbp + 0x58]
lea rcx, [rax + 0x28]
mov r8, rdi
call fcn.14015bdd0
mov r10, rax
mov rax, r15
mov rdx, r14
add rax, 1
mov rcx, r10
mov r8, rax
call sub.msvcrt.dll_memcpy
mov qword [rbx], rax
mov eax, dword [rbp + 0x78]
lea r8, [0x1400c7cd0]
mov r9, qword [rbp - 0x18]
lea rdx, [0x1402a2948]
mov qword [rbx + 0x10], rsi
mov rcx, rbx
mov dword [rbx + 8], eax
mov rax, qword [0x140284360]
mov qword [rbx + 0x18], r9
mov eax, dword [rax]
mov dword [rbx + 0xc], eax
mov rax, qword [rbp - 8]
mov qword [rbx + 0x20], rax
call fcn.14015c5c0
test rax, rax
mov r9, qword [rbp - 0x18]
je 0x1400c8ae6
cmp rbx, qword [rax]
je 0x1400c8af6
mov rcx, rbx
mov qword [rbp - 0x18], r9
call fcn.14016b5d8
mov r9, qword [rbp - 0x18]
mov qword [rbp - 0x18], r9
mov rax, qword [rbp - 0x28]
call rax
mov edx, dword [rbp + 0x68]
mov edi, dword [rbp - 0x2c]
mov r9, qword [rbp - 0x18]
test edx, edx
mov dword [rax], edi
je 0x1400c88b4
mov rdi, qword [rsi + 0x10]
mov edx, dword [rbp + 0x70]
mov rcx, qword [rdi + 0x80]
call fcn.1400c7b40
cmp eax, dword [rdi + 0x88]
mov ebx, eax
mov r9, qword [rbp - 0x18]
jae 0x1400c88b4
mov rsi, r9
add rsi, qword [rbp - 8]
mov rcx, r9
mov rdi, r9
sub ebx, 1
cmp ebx, 0xffffffff
je 0x1400c8c00
xor edx, edx
call sub.msvcrt.dll_strchr
lea rcx, [rax + 1]
cmp rcx, rsi
jb 0x1400c8b46
mov r9, rdi
jmp 0x1400c88b4
lea rcx, str.LANGUAGE
mov dword [rbp - 0x18], edx
call sub.msvcrt.dll_getenv
test rax, rax
mov edx, dword [rbp - 0x18]
je 0x1400c8b8c
cmp byte [rax], 0
jne 0x1400c8ba5
test edx, edx
je 0x1400c8700
call fcn.1400c8eb0
test rax, rax
cmovne r15, rax
jmp 0x1400c8700
mov r15, rax
jmp 0x1400c8700
mov r9, qword [rbp + 0x58]
jmp 0x1400c88b4
mov edi, dword [rbp + 0x68]
mov r9, qword [rbp + 0x60]
mov rdx, r14
mov r8, qword [rbp + 0x58]
mov rcx, rax
mov dword [rsp + 0x20], edi
call fcn.1400cad90
jmp 0x1400c8890
mov r13, qword [rbp - 0x40]
mov r15, qword [rbp - 0x48]
mov r12, qword [rbp - 0x50]
jmp 0x1400c87d0
call fcn.1400cac10
mov edx, 1
mov r15, rax
jmp 0x1400c86e9
xor r9d, r9d
jmp 0x1400c88b4
mov r9, rcx
jmp 0x1400c88b4