Function at 0x14001a170
Capabilities:
Set environment variable

Disassembly:
push rbx
sub rsp, 0xb0
mov rax, qword [0x1400b3010]
xor rax, rsp
mov qword [rsp + 0xa8], rax
mov rbx, rcx
mov qword [rsp + 0xa0], rcx
mov ecx, 0x8001
call qword [sym.imp.KERNEL32.dll_SetSearchPathMode]
test eax, eax
je 0x14001a327
lea rcx, [0x1400a24f4]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
test eax, eax
je 0x14001a344
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x14001a361
lea rdx, str.SetDefaultDllDirectories
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x14001a1fc
mov ecx, 0x800
call qword [case.0x140015ee6.0]
test eax, eax
je 0x14001a37e
xor edx, edx
lea rcx, str.PATH
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
je 0x14001a39b
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14001a3b8
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapSetInformation]
test eax, eax
je 0x14001a3d5
jmp 0x14001a247
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea rcx, [rsp + 0x78]
call fcn.14001a6a0
nop
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x80]
call fcn.14001a710
nop
mov edx, dword [rbx]
lea rcx, [rsp + 0x78]
call fcn.14001a780
mov ebx, dword [rbx + 4]
test ebx, ebx
je 0x14001a2e4
xor eax, eax
mov dword [rsp + 0xa0], eax
mov dword [rsp + 0x98], eax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x98]
lea edx, [r9 + 8]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x14001a3f2
cmp ebx, 1
jne 0x14001a40f
cmp dword [rsp + 0x98], 0
jne 0x14001a40f
mov rcx, qword [rsp + 0x80]
test rcx, rcx
je 0x14001a2f7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x14001a308
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
call fcn.14001ade0
nop
mov rcx, qword [rsp + 0xa8]
xor rcx, rsp
call fcn.140037180
add rsp, 0xb0
pop rbx
ret
lea rdx, str.SetSearchPathMode_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.SetDllDirectoryW_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.GetModuleHandleW_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.SetDefaultDllDirectories_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.SetEnvironmentVariableW_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.GetProcessHeap_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.HeapSetInformation_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.GetTokenInformation_TokenSessionId_failed
lea rcx, [rsp + 0x30]
call fcn.140003ad0
nop
lea rcx, [rsp + 0x30]
call fcn.14001a5f0
nop
lea rdx, str.Not_running_under_expected_session
lea rcx, [rsp + 0x60]
call fcn.140005a10
lea rdx, [0x1400b1a88]
lea rcx, [rsp + 0x60]
call fcn.14005d154
int3