Function at 0x1800a3c60
Capabilities:
Query environment variable

Disassembly:
jmp 0x1800a3c60
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x70
lea rbp, [rsp + 0x30]
mov qword [rbp + 0x70], rbx
mov qword [rbp + 0x78], rsi
mov qword [rbp + 0x80], rdi
mov rax, qword [0x180118258]
xor rax, rbp
mov qword [rbp + 0x38], rax
mov rax, qword [0x180118088]
xor r12d, r12d
mov rdi, rcx
mov qword [rbp + 0x30], rdx
mov r15d, r12d
mov qword [rbp], r12
movabs rsi, 0xffffffffffffff0
lea rax, [rax*8]
lea rcx, [rax + 0xf]
lea r14d, [r12 + 1]
cmp rcx, rax
ja 0x1800a3ccb
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.180001848
sub rsp, rcx
mov rbx, rdi
lea rax, [rsp + 0x30]
mov qword [rbp + 0x18], rax
mov rax, qword [rdi]
test rax, rax
je 0x1800a3d69
mov edx, 0x3d
mov rcx, rax
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x1800a3d30
mov r8, qword [rbx]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], r12d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x1800a3d3a
cdqe
add r15, rax
mov qword [rbp], r15
inc r14
mov rax, qword [rbx + 8]
add rbx, 8
jmp 0x1800a3ce9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x38]
xor rcx, rbp
call fcn.180002752
mov rbx, qword [rbp + 0x70]
mov rsi, qword [rbp + 0x78]
mov rdi, qword [rbp + 0x80]
lea rsp, [rbp + 0x40]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rcx, [r15 + r15]
call fcn.180001aeb
mov qword [rbp + 0x20], rax
mov r12, rax
test rax, rax
je 0x1800a3f0e
lea rax, [r14*8]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1800a3d96
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.180001848
sub rsp, rcx
mov rbx, r12
lea r13, [rsp + 0x30]
mov qword [rbp + 0x10], r13
mov rsi, r13
mov rax, qword [rdi]
test rax, rax
je 0x1800a3e29
mov edx, 0x3d
mov rcx, rax
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x1800a3e0c
mov r8, qword [rdi]
mov eax, r15d
mov rcx, rbx
mov r9d, 0xffffffff
sub rcx, r12
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 0x1800a3e12
mov qword [rsi], rbx
add rsi, 8
cdqe
lea rbx, [rbx + rax*2]
add rdi, 8
jmp 0x1800a3db4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r12
mov ebx, eax
call fcn.180003bf2
mov eax, ebx
jmp 0x1800a3d40
xor edi, edi
lea rdx, [r14 - 1]
lea r9, [0x1800a4290]
mov qword [rsi], rdi
mov rcx, r13
lea r8d, [rdi + 8]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
mov ebx, edi
lea r14, [0x1800ed5b0]
cmp qword [0x180118088], rbx
lea r15, reloc.WS2_32.dll_ioctlsocket
mov qword [rbp + 8], r14
lea r12, str.HOMEDRIVE
jbe 0x1800a3eeb
mov rsi, r14
mov rdi, r15
mov r15, qword [rbp]
mov r14, r12
mov r12, qword [rbp + 0x18]
nop
mov r8, qword [r13]
test r8, r8
je 0x1800a3ea1
mov edx, dword [rdi]
mov rcx, qword [r14]
call fcn.180001bbd
test eax, eax
js 0x1800a3ea1
add r13, 8
test eax, eax
jne 0x1800a3ece
jmp 0x1800a3ebf
mov rcx, qword [rsi]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [r12 + rbx*4], eax
test eax, eax
je 0x1800a3ebf
mov eax, eax
add rax, qword [rdi]
add r15, rax
inc rbx
add r14, 0x18
add rsi, 0x18
add rdi, 0x18
cmp rbx, qword [0x180118088]
jb 0x1800a3e80
mov qword [rbp], r15
lea r12, str.HOMEDRIVE
lea r15, reloc.WS2_32.dll_ioctlsocket
xor edi, edi
mov r14, qword [rbp]
lea rcx, [r14*2 + 2]
call fcn.180001aeb
mov qword [rbp + 0x28], rax
test rax, rax
jne 0x1800a3f18
mov rcx, qword [rbp + 0x20]
call fcn.180003bf2
mov eax, select
jmp 0x1800a3d40
mov rsi, rax
lea r13, [0x1800ed5b0]
mov rbx, qword [rbp + 0x10]
mov r8, qword [rbx]
test r8, r8
jne 0x1800a3f5b
cmp rdi, qword [0x180118088]
jb 0x1800a3fd2
mov rcx, qword [rbp + 0x20]
xor eax, eax
mov word [rsi], ax
call fcn.180003bf2
mov rax, qword [rbp + 0x28]
mov rcx, qword [rbp + 0x30]
mov qword [rcx], rax
xor eax, eax
jmp 0x1800a3d40
cmp rdi, qword [0x180118088]
jb 0x1800a3fbb
mov r14d, 1
mov rdx, qword [rbx]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x1800a3f74
inc ebx
mov rcx, rsi
movsxd r8, ebx
add r8, r8
call sub.VCRUNTIME140.dll_memcpy
add qword [rbp + 0x10], 8
test r14d, r14d
jne 0x1800a3fab
inc rdi
add r12, 0x18
add r15, 0x18
add r13, 0x18
mov qword [rbp + 8], r13
mov r14, qword [rbp]
movsxd rax, ebx
lea rsi, [rsi + rax*2]
jmp 0x1800a3f22
mov edx, dword [r15]
mov rcx, qword [r12]
call fcn.180001bbd
mov r14d, eax
test eax, eax
jns 0x1800a3f6a
mov r14, qword [rbp]
mov rax, qword [rbp + 0x18]
mov ebx, dword [rax + rdi*4]
test ebx, ebx
je 0x1800a4024
mov r8, qword [r12]
mov r9, 0xffffffffffffffff
mov rdx, qword [r15]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov rax, qword [r15]
mov r8d, r14d
mov r14, qword [rbp + 8]
lea rsi, [rsi + rax*2]
mov rcx, qword [r14]
mov rax, rsi
sub rax, qword [rbp + 0x28]
mov rdx, rsi
sar rax, 1
sub r8d, eax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [rbx - 1]
cmp eax, ecx
jne 0x1800a404e
jmp 0x1800a4028
mov r14, qword [rbp + 8]
inc rdi
movsxd rax, ebx
add r12, 0x18
add r15, 0x18
add r14, 0x18
mov qword [rbp + 8], r14
mov r13, r14
mov r14, qword [rbp]
lea rsi, [rsi + rax*2]
jmp 0x1800a3f22
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, str.GetEnvironmentVariableW
call fcn.180002982
int3