Function at 0x1400c7d40
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 0x1400c80a5
mov rax, qword [rbp + 0x50]
mov r12, qword [rax + 0x10]
test r12, r12
je 0x1400c7eb0
cmp qword [r12 + 0x60], 0
mov ebx, dword [r12 + 0x28]
je 0x1400c7fe2
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.1400d1260
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 0x1400c7e53
mov r9d, dword [r12 + 0x18]
mov rax, qword [r12 + 0x30]
test r9d, r9d
lea rdx, [rax + rsi*8]
je 0x1400c7e90
mov eax, dword [rdx]
bswap eax
cmp dword [rbp - 0x38], eax
ja 0x1400c7e43
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 0x1400c7ed0
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 0x1400c7e61
bswap esi
test esi, esi
je 0x1400c7eb0
sub esi, 1
cmp ebx, esi
ja 0x1400c7e00
mov eax, esi
mov rcx, qword [rbp - 0x30]
sub eax, ebx
shl rax, 4
add rax, qword [r12 + 0x48]
cmp rcx, qword [rax]
jae 0x1400c7e43
mov dword [rbp - 0x40], r11d
mov rdx, qword [rax + 8]
jmp 0x1400c7e2e
mov eax, dword [rbp - 0x38]
cmp eax, dword [rdx]
ja 0x1400c7e43
mov rax, qword [r12]
mov edx, dword [rdx + 4]
jmp 0x1400c7e27
cmp r14, r15
mov r12, r14
ja 0x1400c803a
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 0x1400c8050
mov r8d, dword [r12 + 0x18]
mov rsi, qword [r12]
mov rax, qword [r12 + 0x38]
test r8d, r8d
je 0x1400c8090
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 0x1400c8076
cmp qword [rbp + 0x58], 0
je 0x1400c8305
mov rax, qword [rbp + 0x58]
mov rdi, qword [rax + 0x10]
test rdi, rdi
je 0x1400c8305
mov rax, qword [r12 + 0x78]
test rax, rax
mov qword [rbp - 0x30], rax
mov rax, qword [r12 + 0x70]
je 0x1400c839f
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 0x1400c7f81
sub r13, 0x18
test rbx, rbx
je 0x1400c80bb
mov rcx, qword [r13]
mov rdx, rdi
sub rbx, 1
mov r15, r13
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x1400c7f74
mov qword [rbp - 0x30], r15
mov rax, qword [rbp - 0x30]
mov ebx, dword [rbp - 0x38]
cmp qword [rax + 8], 0xffffffffffffffff
je 0x1400c8076
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1400c8219
cmp rax, 0xffffffffffffffff
je 0x1400c8364
mov rax, qword [rax + r14*8]
test rax, rax
je 0x1400c823b
mov rbx, qword [rax]
mov qword [rbp - 0x28], rbx
lea rsi, [rax + 8]
jmp 0x1400c8076
mov eax, ebx
mov dword [rbp - 0x30], ebx
xor r15d, r15d
mov rbx, r12
mov qword [rbp - 0x28], rax
mov r12, rax
jmp 0x1400c8027
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 0x1400c7ea0
je 0x1400c80b0
lea r15, [r14 + 1]
cmp r12, r15
jbe 0x1400c7eb0
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 0x1400c8000
mov edx, dword [rsi + r14*8 + 4]
jmp 0x1400c8009
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 0x1400c7f1e
mov rax, qword [rbp + 0x70]
mov rbx, qword [rbp - 0x28]
mov qword [rax], rbx
jmp 0x1400c7eb2
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 0x1400c806b
call fcn.1400c68b0
jmp 0x1400c7d78
mov r12, rbx
mov ebx, dword [rbp - 0x30]
jmp 0x1400c7ed9
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 0x1400c7f98
sub r13, 0x18
test rbx, rbx
jne 0x1400c80c6
mov ebx, dword [rbp - 0x38]
mov rax, qword [rbp - 0x48]
test rax, rax
je 0x1400c83e8
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 0x1400c8364
mov rcx, rdi
mov qword [r12 + 0x70], r13
call sub.msvcrt.dll__strdup
test rax, rax
mov rdi, rax
je 0x1400c8364
mov rax, qword [rbp - 0x30]
mov rdx, qword [rbp + 0x58]
lea r8, [0x14019fbbb]
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.1400c7d40
cmp rax, 0xffffffffffffffff
je 0x1400c8364
test rax, rax
je 0x1400c83db
lea rdx, str.charset
mov rcx, rax
call sub.msvcrt.dll_strstr
test rax, rax
je 0x1400c83db
lea r15, [rax + 8]
lea rdx, [0x14019fbc5]
mov rcx, r15
call sub.msvcrt.dll_strcspn
mov r8, rax
lea rax, [rax + 0x1f]
and rax, 0xfffffffffffffff0
call fcn.14015b2e0
sub rsp, rax
mov rdx, r15
lea r13, [rsp + 0x30]
mov rcx, r13
call fcn.14015bdd0
mov edx, 0x2f
mov byte [rax], 0
mov rcx, rdi
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1400c845c
mov rcx, rdi
mov rdx, r13
call fcn.1400e6820
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 0x1400c8076
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 0x1400c84f4
lea rbx, [rbp - 0x20]
mov rax, qword [0x1402a2938]
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 0x1400c82aa
test edi, edi
je 0x1400c832c
add edi, 1
mov rcx, r15
imul edx, edi, 0xff0
movsxd rdx, edx
mov qword [0x1402a2930], rdx
call sub.msvcrt.dll_realloc
mov r15, rax
test r15, r15
je 0x1400c834e
lea rax, [r15 + 8]
mov qword [0x1402a2938], r15
mov qword [rbp - 0x10], rax
mov rax, qword [0x1402a2930]
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], rbx
cmp rax, 7
jbe 0x1400c8270
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.1400e6db0
cmp rax, 0xffffffffffffffff
jne 0x1400c8402
call qword [sym.imp.msvcrt.dll__errno]
cmp dword [rax], 7
je 0x1400c8270
jmp 0x1400c7eb0
mov edx, dword [0x1402a2928]
test edx, edx
je 0x1400c8370
mov rdi, qword [0x1402a2920]
test rdi, rdi
jne 0x1400c7f3a
call fcn.1400c8d40
mov rdi, rax
jmp 0x1400c7f3a
mov ecx, 0xff0
mov qword [0x1402a2930], 0xff0
mov edi, 1
call sub.msvcrt.dll_malloc
mov r15, rax
jmp 0x1400c8296
mov qword [0x1402a2938], 0
mov qword [0x1402a2930], 0
mov rsi, 0xffffffffffffffff
jmp 0x1400c7eb2
lea rcx, str.OUTPUT_CHARSET
call sub.msvcrt.dll_getenv
test rax, rax
mov r13, rax
je 0x1400c8389
cmp byte [rax], 0
jne 0x1400c83a8
mov rdi, qword [0x1402a2920]
mov dword [0x1402a2928], 1
jmp 0x1400c8316
mov qword [rbp - 0x48], rax
jmp 0x1400c80ed
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 0x1400c83d2
mov r8, r15
mov rdx, r13
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov qword [0x1402a2920], rdi
jmp 0x1400c8390
mov rax, qword [rbp - 0x30]
mov rax, qword [rax + 8]
jmp 0x1400c81fd
mov rax, qword [rbp - 0x30]
lea rcx, [rax + rax*2 + 3]
shl rcx, 3
call sub.msvcrt.dll_malloc
mov r13, rax
jmp 0x1400c8112
mov rcx, qword [rbp - 0x10]
mov rax, qword [0x1402a2938]
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 [0x1402a2930]
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 [0x1402a2930], rdx
mov qword [0x1402a2938], rcx
jmp 0x1400c7fd9
mov r15, rdi
mov edx, dword [r15]
add r15, 4
lea eax, [rdx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x1400c845f
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.14015b2e0
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.1400e6820
mov rcx, qword [rbp - 0x30]
mov qword [rcx + 8], rax
jmp 0x1400c81fd
or rsi, 0xffffffffffffffff
mov qword [rbx + 0x10], rsi
jmp 0x1400c7eb2