Function at 0x1400c7e50
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]
mov r10d, dword [rcx + 8]
mov qword [rbp + 0x50], rcx
mov qword [rbp + 0x58], rdx
mov qword [rbp + 0x60], r8
mov dword [rbp + 0x68], r9d
test r10d, r10d
jle 0x1400c81b5
mov rax, qword [rbp + 0x50]
mov r12, qword [rax + 0x10]
test r12, r12
je 0x1400c7fc0
cmp qword [r12 + 0x60], 0
mov ebx, dword [r12 + 0x28]
je 0x1400c80f2
mov rcx, qword [rbp + 0x60]
call sub.msvcrt.dll_strlen
mov rcx, qword [rbp + 0x60]
mov r14, rax
mov dword [rbp - 0x38], eax
call fcn.1400d1370
mov ecx, dword [r12 + 0x58]
xor edx, edx
mov r15d, eax
mov r9d, dword [r12 + 0x68]
mov r13, qword [r12 + 0x60]
div ecx
lea r8d, [rcx - 2]
mov eax, r15d
mov edi, edx
xor edx, edx
div r8d
mov eax, r14d
mov qword [rbp - 0x30], rax
mov eax, ecx
lea r15d, [rdx + 1]
mov r14d, r15d
sub eax, r15d
sub r14d, ecx
mov dword [rbp - 0x28], eax
mov r11d, r14d
mov r14d, r9d
jmp 0x1400c7f63
mov r9d, dword [r12 + 0x18]
mov rax, qword [r12 + 0x30]
test r9d, r9d
lea rdx, [rax + rsi*8]
je 0x1400c7fa0
mov eax, dword [rdx]
bswap eax
cmp dword [rbp - 0x38], eax
ja 0x1400c7f53
mov edx, dword [rdx + 4]
mov rax, qword [r12]
bswap edx
mov edx, edx
mov dword [rbp - 0x40], r11d
add rdx, rax
mov rcx, qword [rbp + 0x60]
call sub.msvcrt.dll_strcmp
test eax, eax
mov r11d, dword [rbp - 0x40]
je 0x1400c7fe0
cmp edi, dword [rbp - 0x28]
lea eax, [rdi + r11]
lea edx, [rdi + r15]
cmovb eax, edx
mov edi, eax
mov eax, edi
test r14d, r14d
mov esi, dword [r13 + rax*4]
je 0x1400c7f71
bswap esi
test esi, esi
je 0x1400c7fc0
sub esi, 1
cmp ebx, esi
ja 0x1400c7f10
mov eax, esi
mov rcx, qword [rbp - 0x30]
sub eax, ebx
shl rax, 4
add rax, qword [r12 + 0x48]
cmp rcx, qword [rax]
jae 0x1400c7f53
mov dword [rbp - 0x40], r11d
mov rdx, qword [rax + 8]
jmp 0x1400c7f3e
mov eax, dword [rbp - 0x38]
cmp eax, dword [rdx]
ja 0x1400c7f53
mov rax, qword [r12]
mov edx, dword [rdx + 4]
jmp 0x1400c7f37
cmp r14, r15
mov r12, r14
ja 0x1400c814a
nop dword [rax]
xor esi, esi
mov rax, rsi
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov eax, ebx
mov r14, rsi
mov qword [rbp - 0x28], rax
cmp r14, qword [rbp - 0x28]
jae 0x1400c8160
mov r8d, dword [r12 + 0x18]
mov rsi, qword [r12]
mov rax, qword [r12 + 0x38]
test r8d, r8d
je 0x1400c81a0
lea rdx, [rax + r14*8]
mov ecx, dword [rbp + 0x68]
mov eax, dword [rdx + 4]
bswap eax
mov eax, eax
add rsi, rax
mov eax, dword [rdx]
bswap eax
add eax, 1
test ecx, ecx
mov qword [rbp - 0x28], rax
je 0x1400c8186
cmp qword [rbp + 0x58], 0
je 0x1400c8415
mov rax, qword [rbp + 0x58]
mov rdi, qword [rax + 0x10]
test rdi, rdi
je 0x1400c8415
mov rax, qword [r12 + 0x78]
test rax, rax
mov qword [rbp - 0x30], rax
mov rax, qword [r12 + 0x70]
je 0x1400c84af
mov r15, qword [rbp - 0x30]
mov rcx, rax
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x38], ebx
lea rax, [r15 + r15*2]
mov rbx, r15
lea rax, [rcx + rax*8 - 0x18]
mov qword [rbp - 0x40], rax
mov r13, rax
jmp 0x1400c8091
sub r13, 0x18
test rbx, rbx
je 0x1400c81cb
mov rcx, qword [r13]
mov rdx, rdi
sub rbx, 1
mov r15, r13
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400c8084
mov qword [rbp - 0x30], r15
mov rax, qword [rbp - 0x30]
mov ebx, dword [rbp - 0x38]
cmp qword [rax + 8], 0xffffffffffffffff
je 0x1400c8186
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1400c8329
cmp rax, 0xffffffffffffffff
je 0x1400c8474
mov rax, qword [rax + r14*8]
test rax, rax
je 0x1400c834b
mov rbx, qword [rax]
mov qword [rbp - 0x28], rbx
lea rsi, [rax + 8]
jmp 0x1400c8186
mov eax, ebx
mov dword [rbp - 0x30], ebx
xor r15d, r15d
mov rbx, r12
mov qword [rbp - 0x28], rax
mov r12, rax
jmp 0x1400c8137
mov edx, dword [rsi + r14*8 + 4]
bswap edx
mov edx, edx
mov rcx, qword [rbp + 0x60]
add rdx, r13
call sub.msvcrt.dll_strcmp
test eax, eax
js 0x1400c7fb0
je 0x1400c81c0
lea r15, [r14 + 1]
cmp r12, r15
jbe 0x1400c7fc0
mov r13, qword [rbx]
mov edi, dword [rbx + 0x18]
mov rsi, qword [rbx + 0x30]
lea r14, [r12 + r15]
shr r14, 1
test edi, edi
jne 0x1400c8110
mov edx, dword [rsi + r14*8 + 4]
jmp 0x1400c8119
mov rax, r14
sub rax, qword [rbp - 0x28]
shl rax, 4
add rax, qword [r12 + 0x50]
mov rsi, qword [rax + 8]
mov rax, qword [rax]
mov qword [rbp - 0x28], rax
mov ecx, dword [rbp + 0x68]
test ecx, ecx
jne 0x1400c802e
mov rax, qword [rbp + 0x70]
mov rbx, qword [rbp - 0x28]
mov qword [rax], rbx
jmp 0x1400c7fc2
lea rax, [rax + r14*8]
mov edx, dword [rax + 4]
mov eax, dword [rax]
add eax, 1
add rsi, rdx
mov qword [rbp - 0x28], rax
jmp 0x1400c817b
call fcn.1400c69c0
jmp 0x1400c7e88
mov r12, rbx
mov ebx, dword [rbp - 0x30]
jmp 0x1400c7fe9
mov r8, qword [rbp - 0x30]
mov r13, qword [rbp - 0x40]
mov rbx, r8
mov rcx, qword [r13]
mov rdx, rdi
sub rbx, 1
mov r15, r13
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x1400c80a8
sub r13, 0x18
test rbx, rbx
jne 0x1400c81d6
mov ebx, dword [rbp - 0x38]
mov rax, qword [rbp - 0x48]
test rax, rax
je 0x1400c84f8
mov rcx, qword [rbp - 0x30]
lea rdx, [rcx + rcx*2 + 3]
mov rcx, rax
shl rdx, 3
call sub.msvcrt.dll_realloc
mov r13, rax
test r13, r13
je 0x1400c8474
mov rcx, rdi
mov qword [r12 + 0x70], r13
call sub.msvcrt.dll__strdup
test rax, rax
mov rdi, rax
je 0x1400c8474
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x58]
lea r8, [0x1401a0c1b]
mov rcx, qword [rbp + 0x50]
xor r9d, r9d
lea rax, [rax + rax*2]
lea rax, [r13 + rax*8]
mov qword [rax], rdi
mov qword [rax + 8], 0xffffffffffffffff
mov qword [rbp - 0x30], rax
lea rax, [rbp - 8]
mov qword [rsp + 0x20], rax
call fcn.1400c7e50
cmp rax, 0xffffffffffffffff
je 0x1400c8474
test rax, rax
je 0x1400c84eb
lea rdx, str.charset
mov rcx, rax
call sub.msvcrt.dll_strstr
test rax, rax
je 0x1400c84eb
lea r15, [rax + 8]
lea rdx, [0x1401a0c25]
mov rcx, r15
call sub.msvcrt.dll_strcspn
mov r8, rax
lea rax, [rax + 0x1f]
and rax, 0xfffffffffffffff0
call fcn.14015b3e0
sub rsp, rax
mov rdx, r15
lea r13, [rsp + 0x30]
mov rcx, r13
call fcn.14015bed0
mov edx, 0x2f
mov byte [rax], 0
mov rcx, rdi
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1400c856c
mov rcx, rdi
mov rdx, r13
call fcn.1400e6930
mov rcx, qword [rbp - 0x30]
mov qword [rcx + 8], rax
mov rcx, qword [rbp - 0x30]
mov qword [rcx + 0x10], 0
add qword [r12 + 0x78], 1
cmp rax, 0xffffffffffffffff
je 0x1400c8186
mov ecx, ebx
add ecx, dword [r12 + 0x40]
mov edx, 8
call sub.msvcrt.dll_calloc
mov rbx, qword [rbp - 0x30]
test rax, rax
mov qword [rbx + 0x10], rax
je 0x1400c8604
lea rbx, [rbp - 0x20]
mov rax, qword [0x1402a3938]
mov qword [rbp - 0x40], r14
xor r15d, r15d
xor edi, edi
lea r13, [rbp - 0x10]
mov qword [rbp - 0x38], rbx
lea rbx, [rbp - 8]
lea r12, [rbp - 0x18]
add rax, 8
mov r14, rbx
mov rbx, qword [rbp - 0x28]
jmp 0x1400c83ba
test edi, edi
je 0x1400c843c
add edi, 1
mov rcx, r15
imul edx, edi, 0xff0
movsxd rdx, edx
mov qword [0x1402a3930], rdx
call sub.msvcrt.dll_realloc
mov r15, rax
test r15, r15
je 0x1400c845e
lea rax, [r15 + 8]
mov qword [0x1402a3938], r15
mov qword [rbp - 0x10], rax
mov rax, qword [0x1402a3930]
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], rbx
cmp rax, 7
jbe 0x1400c8380
sub rax, 8
mov rdx, qword [rbp - 0x38]
mov r9, r13
mov qword [rbp - 8], rax
mov rax, qword [rbp - 0x30]
mov r8, r12
mov rcx, qword [rax + 8]
mov qword [rsp + 0x20], r14
call fcn.1400e6ec0
cmp rax, 0xffffffffffffffff
jne 0x1400c8512
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 7
je 0x1400c8380
jmp 0x1400c7fc0
mov edx, dword [0x1402a3928]
test edx, edx
je 0x1400c8480
mov rdi, qword [0x1402a3920]
test rdi, rdi
jne 0x1400c804a
call fcn.1400c8e50
mov rdi, rax
jmp 0x1400c804a
mov ecx, 0xff0
mov qword [0x1402a3930], 0xff0
mov edi, 1
call sub.msvcrt.dll_malloc
mov r15, rax
jmp 0x1400c83a6
mov qword [0x1402a3938], 0
mov qword [0x1402a3930], 0
mov rsi, 0xffffffffffffffff
jmp 0x1400c7fc2
lea rcx, str.OUTPUT_CHARSET
call sub.msvcrt.dll_getenv
test rax, rax
mov r13, rax
je 0x1400c8499
cmp byte [rax], 0
jne 0x1400c84b8
mov rdi, qword [0x1402a3920]
mov dword [0x1402a3928], 1
jmp 0x1400c8426
mov qword [rbp - 0x48], rax
jmp 0x1400c81fd
mov rcx, rax
call sub.msvcrt.dll_strlen
lea r15, [rax + 1]
mov rcx, r15
call sub.msvcrt.dll_malloc
test rax, rax
mov rdi, rax
je 0x1400c84e2
mov r8, r15
mov rdx, r13
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov qword [0x1402a3920], rdi
jmp 0x1400c84a0
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 8]
jmp 0x1400c830d
mov rax, qword [rbp - 0x30]
lea rcx, [rax + rax*2 + 3]
shl rcx, 3
call sub.msvcrt.dll_malloc
mov r13, rax
jmp 0x1400c8222
mov rcx, qword [rbp - 0x10]
mov rax, qword [0x1402a3938]
mov r14, qword [rbp - 0x40]
mov rdx, rcx
sub rdx, rax
lea rbx, [rdx - 8]
mov qword [rax], rbx
mov qword [rbp - 0x28], rbx
mov rbx, qword [rbp - 0x30]
mov r8, qword [rbx + 0x10]
mov rbx, qword [0x1402a3930]
sub rbx, rdx
mov qword [r8 + r14*8], rax
mov r8, rbx
mov rdx, rbx
and r8d, 7
and rdx, 0xfffffffffffffff8
add rcx, r8
mov qword [0x1402a3930], rdx
mov qword [0x1402a3938], rcx
jmp 0x1400c80e9
mov r15, rdi
mov edx, dword [r15]
add r15, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x1400c856f
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea rdx, [r15 + 2]
mov ecx, eax
cmove r15, rdx
add cl, al
sbb r15, 3
sub r15, rdi
lea rax, [r15 + 0x29]
and rax, 0xfffffffffffffff0
call fcn.14015b3e0
sub rsp, rax
mov r8, r15
mov rdx, rdi
lea r9, [rsp + 0x30]
mov rcx, r9
call sub.msvcrt.dll_memcpy
add r15, rax
mov r9, rax
movabs rax, 0x4c534e4152542f2f
mov qword [r15], rax
mov eax, 0x5449
mov rcx, r9
mov word [r15 + 8], ax
mov byte [r15 + 0xa], 0
mov rdx, r13
call fcn.1400e6930
mov rcx, qword [rbp - 0x30]
mov qword [rcx + 8], rax
jmp 0x1400c830d
or rsi, 0xffffffffffffffff
mov qword [rbx + 0x10], rsi
jmp 0x1400c7fc2