Function at 0x1400b5ce0
Capabilities:
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov rbx, qword [rcx]
mov qword [rbp + 0x58], rdx
mov rdi, rcx
test rbx, rbx
je 0x1400b60ab
mov r14, qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r12, rcx
mov r13d, 1
xor esi, esi
nop word [rax + rax]
mov edx, 0x3d
mov rcx, rbx
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1400b5d67
xor edx, edx
mov r9d, 0xffffffff
mov r8, rbx
mov ecx, 0xfde9
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call r14
test eax, eax
jle 0x1400b6030
cdqe
add r13, 1
add rsi, rax
mov rbx, qword [r12 + 8]
add r12, 8
test rbx, rbx
jne 0x1400b5d20
lea rcx, [rsi + rsi]
call fcn.14009f970
mov qword [rbp - 0x38], rax
test rax, rax
jne 0x1400b5d90
test rsi, rsi
jne 0x1400b60a1
lea rax, [r13*8 + 0xf]
and rax, 0xfffffffffffffff0
call fcn.140115230
mov r15, qword [rdi]
sub rsp, rax
lea rbx, [rsp + 0x30]
test r15, r15
je 0x1400b60df
mov r12, qword [rbp - 0x38]
mov r14, rbx
nop dword [rax]
mov edx, 0x3d
mov rcx, r15
call sub.msvcrt.dll_strchr
test rax, rax
je 0x1400b5e14
mov rax, r12
sub rax, qword [rbp - 0x38]
mov edx, esi
mov qword [rsp + 0x20], r12
sar rax, 1
mov r9d, 0xffffffff
mov r8, r15
mov ecx, 0xfde9
sub edx, eax
mov dword [rsp + 0x28], edx
xor edx, edx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x1400b6089
cdqe
mov qword [r14], r12
add r14, 8
lea r12, [r12 + rax*2]
mov r15, qword [rdi + 8]
add rdi, 8
test r15, r15
jne 0x1400b5dc0
mov qword [r14], 0
test rsi, rsi
jne 0x1400b605a
lea rdx, [r13 - 1]
mov r8d, 8
mov rcx, rbx
mov rdi, rbx
lea r9, [0x1400b5cd0]
xor r14d, r14d
lea r12, [0x14029eaa0]
call sub.msvcrt.dll_qsort
mov r13, qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
nop
mov r8, qword [rdi]
test r8, r8
je 0x1400b6000
lea rax, [r14 + r14*2]
lea rax, [r12 + rax*8]
mov edx, dword [rax + 0x10]
mov rcx, qword [rax + 8]
call fcn.1400b5b00
test eax, eax
js 0x1400b6000
add rdi, 8
test eax, eax
jne 0x1400b5e60
add r14, 1
cmp r14, 0xb
jne 0x1400b5e60
lea rcx, [rsi + rsi + 2]
xor r14d, r14d
call fcn.14009f970
mov qword [rbp - 0x40], rax
mov r15, rax
test rax, rax
jne 0x1400b5ee9
jmp 0x1400b60f4
mov rcx, r8
add rbx, 8
call sub.msvcrt.dll_wcslen
mov rdx, qword [rbx - 8]
mov rcx, r15
lea r8d, [rax + 1]
movsxd r8, r8d
lea r13, [r8 + r8]
mov r8, r13
call sub.msvcrt.dll_memcpy
add r15, r13
mov r8, qword [rbx]
test r8, r8
je 0x1400b5f40
cmp r14, 0xa
ja 0x1400b5ec0
lea rax, [r14 + r14*2]
lea rax, [r12 + rax*8]
mov edx, dword [rax + 0x10]
mov rcx, qword [rax + 8]
call fcn.1400b5b00
mov edi, eax
test eax, eax
js 0x1400b5f46
mov rcx, qword [rbx]
add rbx, 8
call sub.msvcrt.dll_wcslen
mov rdx, qword [rbx - 8]
mov rcx, r15
lea r8d, [rax + 1]
movsxd r8, r8d
lea r13, [r8 + r8]
mov r8, r13
call sub.msvcrt.dll_memcpy
cmp edi, 1
adc r14, 0
jmp 0x1400b5ee6
cmp r14, 0xa
ja 0x1400b5f60
movsxd rdi, dword [rbp + r14*4 - 0x30]
test edi, edi
jne 0x1400b5fa0
add r14, 1
lea r13, [rdi + rdi]
jmp 0x1400b5ee6
mov rax, r15
sub rax, qword [rbp - 0x40]
sar rax, 1
cmp rax, rsi
jne 0x1400b603b
xor eax, eax
mov rcx, qword [rbp - 0x38]
mov word [r15], ax
call fcn.14009f990
mov rax, qword [rbp + 0x58]
mov rsi, qword [rbp - 0x40]
mov qword [rax], rsi
xor eax, eax
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rax, [r14 + r14*2]
mov rcx, r15
lea r13, [r12 + rax*8]
mov rdx, qword [r13 + 8]
call sub.msvcrt.dll_wcscpy
mov rax, qword [r13 + 0x10]
mov r8d, esi
mov rcx, qword [r13]
lea r15, [r15 + rax*2]
mov rax, r15
sub rax, qword [rbp - 0x40]
mov rdx, r15
sar rax, 1
sub r8d, eax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [rdi - 1]
cmp edx, eax
je 0x1400b5f4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetEnvironmentVariableW
mov ecx, eax
call fcn.1400a4140
nop dword [rax + rax]
lea rax, [r14 + r14*2]
xor r8d, r8d
xor edx, edx
lea r15, [r12 + rax*8]
mov rcx, qword [r15]
call r13
mov dword [rbp + r14*4 - 0x30], eax
test eax, eax
je 0x1400b5e90
add rsi, qword [r15 + 0x10]
mov eax, eax
add rsi, rax
jmp 0x1400b5e90
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1400b5f8f
mov r8d, 0x333
lea rdx, str.src_win_process.c
lea rcx, str.env_len___size_t___ptr___dst_
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x1400b5f73
sub r12, qword [rbp - 0x38]
sar r12, 1
cmp r12, rsi
je 0x1400b5e31
mov r8d, 0x2e7
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]
jmp 0x1400b5e31
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp - 0x38]
mov ebx, eax
call fcn.14009f990
mov eax, ebx
jmp 0x1400b5f8f
mov eax, 0xe
jmp 0x1400b5f8f
xor ecx, ecx
xor esi, esi
mov r13d, 1
call fcn.14009f970
mov r15, qword [rdi]
sub rsp, 0x10
mov qword [rbp - 0x38], rax
lea rbx, [rsp + 0x30]
test r15, r15
jne 0x1400b5db5
mov qword [rbx], 0
jmp 0x1400b5e31
mov qword [rbx], 0
test rsi, rsi
jne 0x1400b606a
jmp 0x1400b5e31
mov rcx, qword [rbp - 0x38]
call fcn.14009f990
mov eax, 0xe
jmp 0x1400b5f8f