Function at 0x1400c8620
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 0x1400c8d08
mov rax, qword [sym.imp.msvcrt.dll__errno]
mov qword [rbp - 0x28], rax
call rax
mov r8d, dword [0x1402a3940]
mov eax, dword [rax]
test r14, r14
cmove r14, qword [str.messages]
test r8d, r8d
mov dword [rbp - 0x2c], eax
je 0x1400c8a00
mov rbx, qword [0x1402a6808]
test rbx, rbx
jne 0x1400c86a3
jmp 0x1400c89e2
js 0x1400c89e0
mov rbx, qword [rbx]
test rbx, rbx
je 0x1400c89e2
lea rdx, [rbx + 0x18]
mov rcx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400c8691
mov r13, qword [rbx + 8]
movzx eax, byte [r13]
cmp al, 0x2f
je 0x1400c879a
cmp al, 0x5c
je 0x1400c879a
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x1400c86e1
cmp byte [r13 + 1], 0x3a
je 0x1400c879a
mov rcx, r13
mov r12d, 0x106
call sub.msvcrt.dll_strlen
mov r15, qword [rbp - 0x28]
lea rdi, [rax + 1]
jmp 0x1400c8717
call r15
cmp dword [rax], 0x22
jne 0x1400c8973
mov rax, r12
shr rax, 1
lea r12, [r12 + rax + 0x20]
lea rax, [r12 + rdi + 0x1e]
and rax, 0xfffffffffffffff0
call fcn.14015b3e0
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 0x1400c8700
xor edx, edx
mov rcx, rsi
call sub.msvcrt.dll_strchr
lea rdx, [0x1401a0c29]
nop word [rax + rax]
add rdx, 1
movzx ecx, byte [rdx - 1]
add rax, 1
test cl, cl
mov byte [rax - 1], cl
jne 0x1400c8760
add r13, 1
movzx edx, byte [r13 - 1]
test dl, dl
mov byte [rax - 1], dl
je 0x1400c8797
add r13, 1
movzx edx, byte [r13 - 1]
add rax, 1
test dl, dl
mov byte [rax - 1], dl
jne 0x1400c8783
mov r13, rsi
cmp dword [rbp + 0x78], 3
je 0x1400c89f3
jle 0x1400c8a10
cmp dword [rbp + 0x78], 5
lea r12, [0x1401a0c56]
je 0x1400c87e0
lea r12, [0x1401a0c4b]
jl 0x1400c87e0
cmp dword [rbp + 0x78], 0x6c1
lea r12, [0x1401a0c5e]
je 0x1400c87e0
lea r12, [0x1401a0c71]
nop word [rax + rax]
mov ecx, dword [rbp + 0x78]
mov rdx, r12
call fcn.1400cad10
xor edx, edx
test rax, rax
mov r15, rax
je 0x1400c8cf6
lea rdi, [0x1401a0c7c]
mov ecx, 2
mov rsi, r15
repe cmpsb byte [rsi], byte [rdi]
jne 0x1400c8c80
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.14015b3e0
sub rsp, rax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x18], rax
mov rcx, rax
jmp 0x1400c8853
mov rcx, rax
add r12, 1
movzx edx, byte [r12 - 1]
lea rax, [rcx + 1]
test dl, dl
mov byte [rax - 1], dl
jne 0x1400c8850
lea rdx, [0x1401a0c29]
jmp 0x1400c8878
mov rcx, rax
add rax, 1
add rdx, 1
movzx r8d, byte [rdx - 1]
test r8b, r8b
mov byte [rax - 1], r8b
jne 0x1400c8871
mov r8, qword [rbp - 0x38]
mov rdx, r14
call fcn.14015bed0
lea rdx, [0x1401a0c78]
nop dword [rax]
add rdx, 1
movzx ecx, byte [rdx - 1]
add rax, 1
test cl, cl
mov byte [rax - 1], cl
jne 0x1400c88a0
mov rcx, r15
call sub.msvcrt.dll_strlen
add rax, 0x1f
and rax, 0xfffffffffffffff0
call fcn.14015b3e0
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 0x1400c8ad0
test al, al
jne 0x1400c8a45
mov byte [r12], 0x43
mov byte [r12 + 1], 0
lea rdi, [0x1401a0c7c]
mov ecx, 2
mov rsi, r12
repe cmpsb byte [rsi], byte [rdi]
je 0x1400c8973
lea rdi, str.POSIX
mov ecx, 6
mov rsi, r12
repe cmpsb byte [rsi], byte [rdi]
je 0x1400c8973
mov r8, qword [rbp - 0x18]
mov r9, rbx
mov rdx, r12
mov rcx, r13
call fcn.1400d1130
test rax, rax
mov rsi, rax
je 0x1400c88e0
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.1400c7e50
test rax, rax
je 0x1400c8ae0
cmp rax, 0xffffffffffffffff
mov r9, rax
jne 0x1400c8b52
cmp dword [0x1402a3940], 1
je 0x1400c89a0
lea rcx, str.GETTEXT_LOG_UNTRANSLATED
call sub.msvcrt.dll_getenv
test rax, rax
je 0x1400c89a0
cmp byte [rax], 0
jne 0x1400c8cc6
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 0x1400c8cbd
mov eax, dword [rbp + 0x68]
test eax, eax
je 0x1400c8cbd
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, [0x1401a0cc0]
jne 0x1400c87a4
lea r12, [0x1401a0c3f]
jmp 0x1400c87e0
mov dword [0x1402a3940], 0xffffffff
jmp 0x1400c8680
cmp dword [rbp + 0x78], 1
lea r12, [0x1401a0c2b]
je 0x1400c87e0
lea r12, [0x1401a0c36]
jg 0x1400c87e0
mov ecx, dword [rbp + 0x78]
lea r12, [0x1401a0c6a]
test ecx, ecx
je 0x1400c87e0
jmp 0x1400c87d0
mov rdx, r12
jmp 0x1400c8a54
cmp al, 0x3a
je 0x1400c8a67
add rdx, 1
add r15, 1
mov byte [rdx - 1], al
movzx eax, byte [r15]
test al, al
jne 0x1400c8a50
cmp dword [0x1402a3940], 1
mov byte [rdx], 0
jne 0x1400c88ff
mov edx, 0x2f
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x1400c88e0
mov edx, 0x5c
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
jne 0x1400c88e0
movzx eax, byte [r12]
and eax, 0xffffffdf
sub eax, 0x41
cmp al, 0x19
ja 0x1400c88ff
cmp byte [r12 + 1], 0x3a
jne 0x1400c88ff
jmp 0x1400c88e0
add r15, 1
jmp 0x1400c88e0
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x1400c88e0
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 0x1400c8b22
add r12, 1
mov rcx, qword [rsi + r12*8 + 0x20]
test rcx, rcx
je 0x1400c8ce5
mov qword [rsp + 0x20], r13
mov r9d, 1
mov r8, r15
mov rdx, rbx
call fcn.1400c7e50
cmp rax, 0xffffffffffffffff
je 0x1400c8973
test rax, rax
je 0x1400c8b10
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 0x1400c8c06
mov rdx, qword [rbp + 0x58]
lea rcx, [rax + 0x28]
mov r8, rdi
call fcn.14015bed0
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, [0x1400c7de0]
mov r9, qword [rbp - 0x18]
lea rdx, [0x1402a3948]
mov qword [rbx + 0x10], rsi
mov rcx, rbx
mov dword [rbx + 8], eax
mov rax, qword [0x1402853c0]
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.14015c6c0
test rax, rax
mov r9, qword [rbp - 0x18]
je 0x1400c8bf6
cmp rbx, qword [rax]
je 0x1400c8c06
mov rcx, rbx
mov qword [rbp - 0x18], r9
call fcn.14016b6d8
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 0x1400c89c4
mov rdi, qword [rsi + 0x10]
mov edx, dword [rbp + 0x70]
mov rcx, qword [rdi + 0x80]
call fcn.1400c7c50
cmp eax, dword [rdi + 0x88]
mov ebx, eax
mov r9, qword [rbp - 0x18]
jae 0x1400c89c4
mov rsi, r9
add rsi, qword [rbp - 8]
mov rcx, r9
mov rdi, r9
sub ebx, 1
cmp ebx, 0xffffffff
je 0x1400c8d10
xor edx, edx
call sub.msvcrt.dll_strchr
lea rcx, [rax + 1]
cmp rcx, rsi
jb 0x1400c8c56
mov r9, rdi
jmp 0x1400c89c4
lea rcx, str.LANGUAGE
mov dword [rbp - 0x18], edx
call sub.msvcrt.dll_getenv
test rax, rax
mov edx, dword [rbp - 0x18]
je 0x1400c8c9c
cmp byte [rax], 0
jne 0x1400c8cb5
test edx, edx
je 0x1400c8810
call fcn.1400c8fc0
test rax, rax
cmovne r15, rax
jmp 0x1400c8810
mov r15, rax
jmp 0x1400c8810
mov r9, qword [rbp + 0x58]
jmp 0x1400c89c4
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.1400caea0
jmp 0x1400c89a0
mov r13, qword [rbp - 0x40]
mov r15, qword [rbp - 0x48]
mov r12, qword [rbp - 0x50]
jmp 0x1400c88e0
call fcn.1400cad20
mov edx, 1
mov r15, rax
jmp 0x1400c87f9
xor r9d, r9d
jmp 0x1400c89c4
mov r9, rcx
jmp 0x1400c89c4