Function at 0x140143470
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x478
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x68], rdx
mov qword [rsp + 0x70], r8
lea rdi, [rsp + 0x78]
mov rcx, rdi
call fcn.14014b290
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x20], rax
mov r12, qword [rsp + 0x80]
cmp qword [rsp + 0x78], 1
je 0x140143708
xor esi, esi
mov r8d, 0x400
mov rcx, rdi
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov r13d, 0x200
mov ebx, 2
xor r14d, r14d
cmp r13, 0x201
jae 0x140143509
jmp 0x1401435b0
cmp r13, rdi
mov r13, rdi
ja 0x140143609
cmp r13, 0x201
jb 0x1401435b0
mov rax, r13
sub rax, r14
mov rcx, rsi
sub rcx, r14
cmp rcx, rax
jae 0x140143596
add r14, rax
jb 0x1401436f4
lea rax, [rsi + rsi]
cmp rax, r14
cmova r14, rax
cmp r14, 4
mov ecx, 4
cmovbe r14, rcx
xor r8d, r8d
add r14, r14
setae r8b
add r8, r8
test rsi, rsi
je 0x140143562
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], 2
jmp 0x14014356b
mov qword [rsp + 0x28], 0
lea rcx, [rsp + 0x48]
mov rdx, r14
lea r9, [rsp + 0x28]
call fcn.140142a50
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
cmp qword [rsp + 0x48], 1
je 0x1401436ef
shr rsi, 1
mov r14, r13
mov rbp, r13
mov r15, rbx
jmp 0x1401435ba
mov ebp, 0x200
lea r15, [rsp + 0x78]
xor ecx, ecx
call sub.KERNEL32.dll_SetLastError
mov rcx, r12
mov rdx, r15
mov r8d, r13d
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov edi, eax
test eax, eax
jne 0x1401435de
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x14014363a
mov edi, edi
cmp r13, rdi
jne 0x1401434f0
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x1401434f0
add r13, r13
cmp r13, 0x201
jae 0x140143509
jmp 0x1401435b0
cmp rbp, rdi
jb 0x140143796
lea rcx, [rsp + 0x28]
mov rdx, r15
mov r8, rdi
call fcn.140148c60
mov rdi, qword [rsp + 0x28]
mov r15, qword [rsp + 0x30]
mov r14, qword [rsp + 0x38]
xor ebp, ebp
test rsi, rsi
jne 0x140143650
jmp 0x140143667
call sub.KERNEL32.dll_GetLastError
mov edi, eax
shl rdi, 0x20
mov bpl, 1
xor r15d, r15d
test rsi, rsi
je 0x140143667
test rbx, rbx
je 0x140143667
call sub.KERNEL32.dll_GetProcessHeap
mov rcx, rax
xor edx, edx
mov r8, rbx
call fcn.14021dfcd
test bpl, bpl
je 0x14014369e
movabs rax, 0xffffffff000000ff
and rax, rdi
xor ecx, ecx
movabs rdx, 0xcb00000000
xor esi, esi
cmp rax, rdx
setne sil
cmove rdi, rcx
mov rax, qword [rsp + 0x20]
test rax, rax
jne 0x1401436aa
jmp 0x1401436c6
xor esi, esi
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x1401436c6
test r12, r12
je 0x1401436c6
add rax, rax
je 0x1401436c6
call sub.KERNEL32.dll_GetProcessHeap
mov rcx, rax
xor edx, edx
mov r8, r12
call fcn.14021dfcd
test rsi, rsi
jne 0x140143710
mov rax, qword [rsp + 0x60]
mov qword [rax + 8], r15
mov qword [rax], rdi
mov qword [rax + 0x10], r14
add rsp, 0x478
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
test rsi, rsi
jne 0x1401436fb
call fcn.1400182c0
ud2
mov rcx, rbx
mov rdx, rsi
call fcn.1400182a0
ud2
mov rdi, r12
mov r15, qword [rsp + 0x20]
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], rdi
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [0x14014b6a0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x38], rax
lea rax, [0x14014b6c0]
mov qword [rsp + 0x40], rax
lea rax, [0x140274178]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x80], 2
mov qword [rsp + 0x88], 0
lea rax, [rsp + 0x28]
mov qword [rsp + 0x98], rax
mov qword [rsp + 0xa0], 2
lea rdx, str.library_std_srcenv.rsfailed_to_get_environment_variable__other_os_erroroperation_interruptedwrite_zerotimed_outinvalid_datainvalid_input_parameteroperation_would_blockentity_already_existsbroken_pipeaddress_not_availableaddress_in_usenot_connectedconnection_abortedconnection_resetconnection_refusedpermission_deniedentity_not_foundunexpected_end_of_file
lea rcx, [rsp + 0x78]
call fcn.14014b990
ud2
lea r8, str.library_std_src_syswindowsmod.rsthread__panicked_at__
mov rcx, rdi
mov rdx, rbp
call fcn.1400201a0
ud2