Function at 0x6da0e0
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x80]
mov r12, qword [rcx]
sub rsp, 0x60
mov rdi, rcx
mov qword [rbp + 0x28], rdx
lea r14, [rsp + 0x30]
test r12, r12
je 0x6da499
mov rbx, rcx
mov r13d, 1
xor esi, esi
mov r15d, 0xffffffff
mov edx, 0x3d
mov rcx, r12
call sub.msvcrt.dll_strchr
test rax, rax
je 0x6da16c
xor edx, edx
mov dword [rsp + 0x28], 0
mov r9d, r15d
mov r8, r12
mov qword [rsp + 0x20], 0
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
test eax, eax
jle 0x6da450
cdqe
add r13, 1
add rsi, rax
add rbx, 8
mov r12, qword [rbx]
test r12, r12
jne 0x6da125
lea rcx, [rsi + rsi]
call fcn.006c2830
mov r12, rax
test rax, rax
jne 0x6da192
test rsi, rsi
jne 0x6da48f
lea rax, [r13*8 + 0xf]
and rax, 0xfffffffffffffff0
call fcn.00911360
mov r8, qword [rdi]
sub rsp, rax
lea rbx, [rsp + 0x30]
mov r15, rbx
test r8, r8
je 0x6da4cb
mov qword [rbp - 0x40], r12
nop
mov edx, 0x3d
mov rcx, r8
mov qword [rbp - 0x38], r8
call sub.msvcrt.dll_strchr
test rax, rax
je 0x6da219
mov rax, r12
sub rax, qword [rbp - 0x40]
mov ecx, esi
xor edx, edx
sar rax, 1
mov qword [rsp + 0x20], r12
mov r9d, 0xffffffff
mov r8, qword [rbp - 0x38]
sub ecx, eax
mov dword [rsp + 0x28], ecx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
test eax, eax
jle 0x6da477
cdqe
mov qword [r15], r12
add r15, 8
lea r12, [r12 + rax*2]
add rdi, 8
mov r8, qword [rdi]
test r8, r8
jne 0x6da1c0
mov qword [r15], 0
test rsi, rsi
je 0x6da257
sub r12, qword [rbp - 0x40]
sar r12, 1
cmp r12, rsi
je 0x6da257
mov r8d, 0x2e6
lea rdx, str.src_win_process.c
lea rcx, str.env_len__0__env_len___size_t___ptr___dst_copy_
call qword [sym.imp.msvcrt.dll__assert]
lea rdx, [r13 - 1]
mov r8d, 8
mov rcx, rbx
mov rdi, rbx
lea r9, [0x006da0d0]
xor r15d, r15d
lea r12, [0x00d12c60]
call sub.msvcrt.dll_qsort
jmp 0x6da2a9
lea rax, [r15 + r15*2]
lea rax, [r12 + rax*8]
mov edx, dword [rax + 0x10]
mov rcx, qword [rax + 8]
call fcn.006d9f00
test eax, eax
js 0x6da2b1
add rdi, 8
cmp eax, 1
adc r15, 0
cmp r15, 0xb
je 0x6da2e3
mov r8, qword [rdi]
test r8, r8
jne 0x6da280
lea rax, [r15 + r15*2]
xor r8d, r8d
xor edx, edx
lea r13, [r12 + rax*8]
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
mov dword [r14 + r15*4], eax
test eax, eax
je 0x6da2d9
add rsi, qword [r13 + 0x10]
mov eax, eax
add rsi, rax
add r15, 1
cmp r15, 0xb
jne 0x6da2a9
lea rcx, [rsi + rsi + 2]
xor r15d, r15d
call fcn.006c2830
mov qword [rbp - 0x48], rax
mov rdi, rax
test rax, rax
jne 0x6da32a
jmp 0x6da4e4
mov rcx, r8
add rbx, 8
call sub.msvcrt.dll_wcslen
mov rdx, qword [rbx - 8]
mov rcx, rdi
lea r9d, [rax + 1]
movsxd r9, r9d
lea r13, [r9 + r9]
mov r8, r13
call sub.msvcrt.dll_memcpy
add rdi, r13
mov r8, qword [rbx]
test r8, r8
je 0x6da390
cmp r15, 0xa
ja 0x6da301
lea rax, [r15 + r15*2]
lea rax, [r12 + rax*8]
mov edx, dword [rax + 0x10]
mov rcx, qword [rax + 8]
call fcn.006d9f00
test eax, eax
js 0x6da396
mov rcx, qword [rbx]
mov dword [rbp - 0x38], eax
add rbx, 8
call sub.msvcrt.dll_wcslen
mov rdx, qword [rbx - 8]
mov rcx, rdi
lea r9d, [rax + 1]
movsxd r9, r9d
lea r13, [r9 + r9]
mov r8, r13
call sub.msvcrt.dll_memcpy
mov r11d, dword [rbp - 0x38]
cmp r11d, 1
adc r15, 0
jmp 0x6da327
cmp r15, 0xa
ja 0x6da3b0
mov r13d, dword [r14 + r15*4]
test r13d, r13d
jne 0x6da3f0
movsxd r9, r13d
add r15, 1
lea r13, [r9 + r9]
jmp 0x6da327
mov rax, rdi
sub rax, qword [rbp - 0x48]
sar rax, 1
cmp rax, rsi
jne 0x6da458
xor eax, eax
mov rcx, qword [rbp - 0x40]
mov word [rdi], ax
call fcn.006c2850
mov rax, qword [rbp + 0x28]
mov rsi, qword [rbp - 0x48]
mov qword [rax], rsi
xor eax, eax
lea rsp, [rbp - 0x28]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rax, [r15 + r15*2]
mov rcx, rdi
lea r11, [r12 + rax*8]
mov rdx, qword [r11 + 8]
mov qword [rbp - 0x38], r11
call sub.msvcrt.dll_wcscpy
mov r11, qword [rbp - 0x38]
mov r8d, esi
mov rax, qword [r11 + 0x10]
mov rcx, qword [r11]
lea rdi, [rdi + rax*2]
mov rax, rdi
sub rax, qword [rbp - 0x48]
mov rdx, rdi
sar rax, 1
sub r8d, eax
call qword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
lea edx, [r13 - 1]
cmp edx, eax
je 0x6da39f
call qword [sym.imp.KERNEL32.DLL_GetLastError]
lea rdx, str.GetEnvironmentVariableW
mov ecx, eax
call fcn.006c7230
call qword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x6da3de
mov r8d, 0x332
lea rdx, str.src_win_process.c
lea rcx, str.env_len___size_t___ptr___dst_
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6da3c3
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov rcx, qword [rbp - 0x40]
mov ebx, eax
call fcn.006c2850
mov eax, ebx
jmp 0x6da3de
mov eax, 0xe
jmp 0x6da3de
xor ecx, ecx
call fcn.006c2830
sub rsp, 0x10
mov r8, qword [rdi]
lea rbx, [rsp + 0x30]
mov r12, rax
mov r15, rbx
test r8, r8
je 0x6da4f7
mov rbx, r15
mov qword [rbp - 0x40], r12
mov r13d, 1
xor esi, esi
jmp 0x6da1c0
mov qword [rbx], 0
mov qword [rbp - 0x40], r12
test rsi, rsi
jne 0x6da23d
jmp 0x6da257
mov rcx, qword [rbp - 0x40]
call fcn.006c2850
mov eax, 0xe
jmp 0x6da3de
mov qword [rbx], 0
mov r13d, 1
xor esi, esi
mov qword [rbp - 0x40], rax
jmp 0x6da257