Function at 0x18001d4a0
Capabilities:
Get common file path
Get hostname
Query environment variable
Set environment variable

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb70]
sub rsp, 0xc70
mov rbx, r8
mov rsi, rdx
xor r12d, r12d
xor edx, edx
mov r8d, 0x1f28
mov r14d, r9d
mov dword [rbp + 0xbb0], r12d
mov dword [rbp + 0xbc8], r12d
mov r13, rcx
call fcn.1800199b0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [r13 + 0x1a6c], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rdx, [r13 + 0xa74]
add eax, dword [r13 + 0x1a6c]
mov ecx, eax
call fcn.18001a758
lea rdx, [r13 + 0x1a70]
mov r8d, 0x105
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x18001cfba
lea edx, [r12 + 0x5c]
lea rcx, [r13 + 0x1a70]
call fcn.18001a0dc
mov qword [r13 + 0x1c80], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
call fcn.18001c4f4
mov qword [r13 + 0x108], rax
mov rcx, qword [rax]
call fcn.18001c658
test eax, eax
je 0x18001cfe8
mov dword [r13 + 0x410], 3
jmp 0x18001cffe
call fcn.18001c554
mov ecx, r12d
test eax, eax
setg cl
inc ecx
mov dword [r13 + 0x410], ecx
mov rdx, qword [r13 + 0x108]
mov qword [r13 + 0x418], rsi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
mov esi, 0x80
lea rax, [rbp + 0xbc8]
mov dword [rbp + 0xbb0], esi
mov dword [rbp + 0xbc8], esi
mov rdx, qword [rdx]
mov qword [rsp + 0x28], rax
lea rdi, [r13 + 0x310]
lea r8, [r13 + 0x210]
lea r9, [rbp + 0xbb0]
xor ecx, ecx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
jne 0x18001d076
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.LookupAccountSidW___err__u
mov edx, esi
mov r9d, eax
mov rcx, rdi
call fcn.180019b14
mov eax, 0x20a
lea rdi, [r13 + 0x420]
test r14b, 2
je 0x18001d09c
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x18001d14f
test r14b, 4
je 0x18001d13c
mov r8d, 0x105
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
mov r11, qword [rbx + 0x2ff]
mov qword [0x180033088], r11
mov eax, dword [rbx + 0x307]
mov dword [0x180033090], eax
mov rax, qword [rbx + 0x30b]
mov qword [0x180033098], rax
mov eax, dword [rbx + 0x313]
mov dword [0x1800330a0], eax
mov rax, qword [rbx + 0x317]
mov qword [0x1800330a8], rax
mov eax, dword [rbx + 0x31f]
mov dword [0x1800330b0], eax
mov rax, qword [rbx + 0x323]
mov qword [0x1800330b8], rax
mov eax, dword [rbx + 0x32b]
mov dword [0x1800330c0], eax
mov rax, qword [rbx + 0x32f]
mov qword [0x1800330c8], rax
mov eax, dword [rbx + 0x337]
mov dword [0x1800330d0], eax
jmp 0x18001d14f
mov rcx, qword [r13 + 0x418]
mov r8d, eax
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, 0x5c
mov rcx, rdi
mov edx, ebx
call fcn.18001a0dc
mov edx, ebx
mov rcx, rdi
mov qword [r13 + 0x630], rax
call fcn.18001a0dc
lea r8d, [rbx - 0x1c]
lea rcx, [r13 + 0xc4]
mov rdx, rax
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rcx, [r13 + 0xc4]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
lea r8d, [rbx - 0x3c]
lea rcx, [r13 + 0xc4]
movsxd rdx, eax
mov word [r13 + rdx*2 + 0xbc], r12w
lea rdx, [r13 + 0xa4]
call fcn.18001a400
lea rdx, [r13 + 0x638]
mov rcx, rdi
call fcn.18001a110
lea rdx, [r13 + 0x638]
lea rcx, [r13 + 0x868]
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rdx, [0x180023854]
lea rcx, [r13 + 0x868]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rdx, [r13 + 0xc4]
lea rcx, [r13 + 0x868]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
mov ecx, 0x188c
call fcn.180019d9c
lea rcx, [r13 + 0x868]
mov rdx, rax
mov qword [rbp + 0xbb8], rax
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rcx, [rbp + 0xbb8]
call fcn.180019f60
lea rcx, [r13 + 0x842]
lea r9, [r13 + 0xa74]
lea edx, [rbx - 0x52]
lea r8d, [rbx - 0x4d]
call fcn.18001a18c
lea rcx, [r13 + 0xa4]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [r13 + 0xa4]
xor r8d, r8d
mov edx, eax
call fcn.18001a934
lea rdx, [r13 + 0x1438]
mov ecx, eax
call fcn.18001e310
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
call fcn.18001c6dc
mov ebx, 0x9c
xor edx, edx
movsx ecx, al
mov r8d, ebx
mov dword [r13 + 0x1448], ecx
mov rcx, r13
call fcn.1800199b0
mov rcx, r13
mov dword [r13], ebx
call qword [sym.imp.KERNEL32.dll_GetVersionExA]
lea rcx, str.kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea rdx, str.IsWow64Process
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [r13 + 0x1dd0], rax
call fcn.18001cebc
mov ecx, eax
mov dword [r13 + 0xa0], eax
call fcn.18001ceec
mov ebx, 0x104
mov word [r13 + 0x9c], ax
mov edx, ebx
lea rcx, [r13 + 0x144c]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea rdx, [rbp - 0x70]
lea rcx, str.SystemRoot
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x18001d32d
lea rdx, [r13 + 0x144c]
lea rcx, str.SystemRoot
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [r13 + 0x1860]
lea rcx, str.USERPROFILE
mov r8d, 0x209
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x18001d38a
lea rax, str.TEMP
lea r9, [r13 + 0x144c]
lea r8, str._s_s
lea rcx, [r13 + 0x1860]
mov edx, 0x20a
mov qword [rsp + 0x20], rax
call fcn.180019b14
lea rdx, [r13 + 0x1860]
lea rcx, str.USERPROFILE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [r13 + 0x1656]
lea rcx, [0x18002a6f0]
mov r8d, 0x20a
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x18001d3bc
lea rdx, [r13 + 0x1860]
lea rcx, [0x18002a6f0]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [rsp + 0x50]
lea rcx, str.SystemDrive
mov r8d, 0x3f
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jne 0x18001d3ec
lea rdx, [0x18002a6dc]
lea rcx, str.SystemDrive
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea rcx, [r13 + 0x1dd8]
lea rdx, [rbp + 0xbb8]
mov dword [rbp + 0xbb8], 0x7f
call qword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea rcx, [r13 + 0x1438]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [r13 + 0x1438]
xor r8d, r8d
mov edx, eax
call fcn.18001a934
lea rdx, [rbp + 0x1a0]
mov ecx, eax
call fcn.18001a758
lea rdx, [r13 + 0x1c88]
lea rcx, [rbp + 0x1a0]
mov r8d, 0x20
call fcn.18001a8ec
mov edx, 0x14
lea rcx, [r13 + 0x1ca8]
lea r8d, [rdx + 0xa]
lea r9, [rbp + 0x1a0]
call fcn.18001a18c
test r14b, 1
jne 0x18001d47d
call fcn.18001cc60
mov dword [r13 + 0x1cc8], eax
mov eax, 1
mov rbx, qword [rsp + 0xcc0]
add rsp, 0xc70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r9d, r8d
mov r8, rdx
mov rdx, rcx
lea rcx, [0x1800311b0]
jmp 0x18001cf18