Function at 0x1400c4c80
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
lea rbp, [rsp + 0x30]
mov qword [rbp + 0xa0], rbx
mov rax, qword [0x140136348]
xor rax, rbp
mov qword [rbp + 0x48], rax
mov rax, qword [rcx]
xor esi, esi
mov qword [rbp + 0x10], rdx
mov rdi, rcx
mov r12d, esi
mov rbx, rcx
lea r14d, [rsi + 1]
test rax, rax
je 0x1400c4d38
mov edx, 0x3d
mov rcx, rax
call fcn.1400cc400
test rax, rax
je 0x1400c4d05
mov r8, qword [rbx]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], esi
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x1400c4d0f
cdqe
add r12, rax
inc r14
mov rax, qword [rbx + 8]
add rbx, 8
jmp 0x1400c4cc3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x48]
xor rcx, rbp
call fcn.1400cb6d0
mov rbx, qword [rbp + 0xa0]
lea rsp, [rbp + 0x50]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, [r12 + r12]
call fcn.1400a8170
mov qword [rbp + 8], rax
mov r15, rax
test rax, rax
jne 0x1400c4d56
test r12, r12
jne 0x1400c4eaa
lea rax, [r14*8]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1400c4d71
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400cb9a0
sub rsp, rcx
mov rbx, r15
lea r13, [rsp + 0x30]
mov rsi, r13
mov rax, qword [rdi]
test rax, rax
je 0x1400c4e00
mov edx, 0x3d
mov rcx, rax
call fcn.1400cc400
test rax, rax
je 0x1400c4de3
mov r8, qword [rdi]
mov eax, r12d
mov rcx, rbx
mov r9d, 0xffffffff
sub rcx, r15
xor edx, edx
sar rcx, 1
sub eax, ecx
mov ecx, 0xfde9
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x1400c4de9
mov qword [rsi], rbx
add rsi, 8
cdqe
lea rbx, [rbx + rax*2]
add rdi, 8
jmp 0x1400c4d8b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r15
mov ebx, eax
call fcn.1400a7f70
mov eax, ebx
jmp 0x1400c4d15
xor ebx, ebx
lea rdx, [r14 - 1]
lea r9, [0x1400c50d0]
mov qword [rsi], rbx
mov rcx, r13
lea r8d, [rbx + 8]
call fcn.1400ea5d0
mov rsi, r13
lea rdi, [rbp + 0x18]
lea r14, [0x140115c80]
nop word [rax + rax]
mov r8, qword [rsi]
test r8, r8
je 0x1400c4e55
mov edx, dword [rbx + r14 + 0x10]
mov rcx, qword [rbx + r14 + 8]
call fcn.1400c4800
test eax, eax
js 0x1400c4e55
add rsi, 8
test eax, eax
jne 0x1400c4e7f
jmp 0x1400c4e77
mov rcx, qword [rbx + r14]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rdi], eax
test eax, eax
je 0x1400c4e77
mov rcx, qword [rbx + r14 + 0x10]
mov eax, eax
add rcx, rax
add r12, rcx
add rbx, 0x18
add rdi, 4
cmp rbx, 0x108
jb 0x1400c4e30
lea rcx, [r12*2 + 2]
call fcn.1400a8170
mov qword [rbp], rax
mov r15, rax
test rax, rax
jne 0x1400c4eb4
mov rcx, qword [rbp + 8]
call fcn.1400a7f70
mov eax, select
jmp 0x1400c4d15
mov r14, rax
xor eax, eax
mov esi, eax
mov edi, eax
nop dword [rax]
mov r8, qword [r13]
test r8, r8
jne 0x1400c4ef3
cmp rdi, 0x108
jb 0x1400c4f6a
mov rcx, qword [rbp + 8]
xor ebx, ebx
mov word [r14], bx
call fcn.1400a7f70
mov rax, qword [rbp + 0x10]
mov qword [rax], r15
xor eax, eax
jmp 0x1400c4d15
cmp rsi, 0xb
jb 0x1400c4f4a
mov r15d, 1
mov rdx, qword [r13]
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x1400c4f10
inc ebx
mov rcx, r14
movsxd r8, ebx
add r8, r8
call fcn.1400cc610
add r13, 8
test r15d, r15d
jne 0x1400c4f3a
inc rsi
add rdi, 0x18
mov r15, qword [rbp]
movsxd rax, ebx
lea r14, [r14 + rax*2]
jmp 0x1400c4ec0
lea rax, [0x140115c80]
mov edx, dword [rdi + rax + 0x10]
mov rcx, qword [rdi + rax + 8]
call fcn.1400c4800
mov r15d, eax
test eax, eax
jns 0x1400c4eff
mov r15, qword [rbp]
mov ebx, dword [rbp + rsi*4 + 0x18]
test ebx, ebx
je 0x1400c4f33
lea r9, [0x140115c80]
mov rdx, r14
mov rcx, qword [rdi + r9 + 8]
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rdx], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x1400c4f81
mov rax, qword [rdi + r9 + 0x10]
mov r8d, r12d
mov rcx, qword [rdi + r9]
lea r14, [r14 + rax*2]
mov rax, r14
mov rdx, r14
sub rax, r15
sar rax, 1
sub r8d, eax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [rbx - 1]
cmp eax, ecx
je 0x1400c4f33
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [0x140115fe0]
call fcn.1400b5650
int3