Function at 0x42d420
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 + 0x80]
mov r15, qword [rcx]
mov r12, rcx
mov qword [rbp + 0x48], rdx
test r15, r15
je 0x42d760
mov r13, qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rsi, rcx
mov edi, 1
xor ebx, ebx
mov r14d, 0xffffffff
mov edx, 0x3d
mov rcx, r15
call sub.msvcrt.dll_strchr
test rax, rax
je 0x42d4a2
xor edx, edx
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, r14d
mov r8, r15
mov ecx, 0xfde9
call r13
test eax, eax
jle 0x42d4e0
cdqe
add rdi, 1
add rbx, rax
add rsi, 8
mov r15, qword [rsi]
test r15, r15
jne 0x42d462
lea rcx, [rbx + rbx]
call fcn.004109f0
test rax, rax
mov r15, rax
jne 0x42d4e8
test rbx, rbx
mov eax, 0xe
je 0x42d4e8
lea rsp, [rbp - 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x42d4c9
lea rax, [rdi*8]
add rax, 0x1e
and rax, 0xfffffffffffffff0
call fcn.00449bf0
mov r8, qword [r12]
sub rsp, rax
lea rax, [rsp + 0x30]
test r8, r8
mov r14, rax
mov qword [rbp - 0x50], rax
mov rsi, rax
je 0x42d586
mov r13, r15
nop dword [rax + rax]
mov edx, 0x3d
mov rcx, r8
mov qword [rbp - 0x48], r8
call sub.msvcrt.dll_strchr
test rax, rax
je 0x42d579
mov rax, r13
mov edx, ebx
mov qword [rsp + 0x20], r13
sub rax, r15
mov r9d, 0xffffffff
mov r8, qword [rbp - 0x48]
sar rax, 1
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 0x42d77b
cdqe
mov qword [r14], r13
add r14, 8
lea r13, [r13 + rax*2]
add r12, 8
mov r8, qword [r12]
test r8, r8
jne 0x42d520
mov qword [r14], 0
mov r14, qword [rbp - 0x50]
lea rdx, [rdi - 1]
lea r9, [0x0042d410]
mov r8d, 8
xor edi, edi
lea r12, [0x0044ea60]
mov rcx, r14
call sub.msvcrt.dll_qsort
jmp 0x42d5de
lea rax, [rdi + rdi*2]
lea rax, [r12 + rax*8]
mov edx, dword [rax + 0x10]
mov rcx, qword [rax + 8]
call fcn.0042d2d0
test eax, eax
js 0x42d5e6
add r14, 8
cmp eax, 1
adc rdi, 0
cmp rdi, 0xa
ja 0x42d614
mov r8, qword [r14]
test r8, r8
jne 0x42d5b5
lea rax, [rdi + rdi*2]
xor r8d, r8d
xor edx, edx
lea r13, [r12 + rax*8]
mov rcx, qword [r13]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
mov dword [rbp + rdi*4 - 0x40], eax
je 0x42d60e
add rbx, qword [r13 + 0x10]
mov eax, eax
add rbx, rax
add rdi, 1
jmp 0x42d5d8
lea rcx, [rbx + rbx + 2]
call fcn.004109f0
test rax, rax
mov qword [rbp - 0x50], rax
je 0x42d792
mov rdi, rax
xor r14d, r14d
jmp 0x42d658
call sub.msvcrt.dll_wcslen
lea r9d, [rax + 1]
mov rdx, qword [rsi]
mov rcx, rdi
add rsi, 8
movsxd r9, r9d
lea r13, [r9 + r9]
mov r8, r13
call sub.msvcrt.dll_memcpy
add rdi, r13
mov rcx, qword [rsi]
test rcx, rcx
je 0x42d6c0
cmp r14, 0xa
ja 0x42d633
lea rax, [r14 + r14*2]
mov r8, rcx
lea rax, [r12 + rax*8]
mov edx, dword [rax + 0x10]
mov rcx, qword [rax + 8]
call fcn.0042d2d0
test eax, eax
js 0x42d6c6
mov rcx, qword [rsi]
mov dword [rbp - 0x48], eax
add rsi, 8
call sub.msvcrt.dll_wcslen
lea r9d, [rax + 1]
mov rdx, qword [rsi - 8]
mov rcx, rdi
movsxd r9, r9d
lea r13, [r9 + r9]
mov r8, r13
call sub.msvcrt.dll_memcpy
mov r11d, dword [rbp - 0x48]
cmp r11d, 1
adc r14, 0
jmp 0x42d655
cmp r14, 0xa
ja 0x42d6e0
mov r13d, dword [rbp + r14*4 - 0x40]
test r13d, r13d
jne 0x42d700
movsxd r9, r13d
add r14, 1
lea r13, [r9 + r9]
jmp 0x42d655
xor eax, eax
mov rcx, r15
mov word [rdi], ax
call fcn.00410a10
mov rax, qword [rbp + 0x48]
mov rbx, qword [rbp - 0x50]
mov qword [rax], rbx
xor eax, eax
jmp 0x42d4c9
lea rax, [r14 + r14*2]
mov rcx, rdi
lea r11, [r12 + rax*8]
mov rdx, qword [r11 + 8]
mov qword [rbp - 0x48], r11
call sub.msvcrt.dll_wcscpy
mov r11, qword [rbp - 0x48]
mov r8d, ebx
mov rax, qword [r11 + 0x10]
mov rcx, qword [r11]
lea rdi, [rdi + rax*2]
mov rax, rdi
sub rax, qword [rbp - 0x50]
mov rdx, rdi
sar rax, 1
sub r8d, eax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea edx, [r13 - 1]
cmp eax, edx
je 0x42d6d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.GetEnvironmentVariableW
mov ecx, eax
call fcn.00416440
nop dword [rax]
xor ecx, ecx
xor ebx, ebx
mov edi, 1
call fcn.004109f0
mov r15, rax
mov eax, 8
jmp 0x42d4f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r15
mov ebx, eax
call fcn.00410a10
mov eax, ebx
jmp 0x42d4c9
mov rcx, r15
call fcn.00410a10
mov eax, 0xe
jmp 0x42d4c9