Function at 0x180010864
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.18000ce90
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.18000e7b8
lea rdx, [r13 + 0x1a70]
mov r8d, 0x105
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x180010906
lea edx, [r12 + 0x5c]
lea rcx, [r13 + 0x1a70]
call fcn.18000cfb8
mov qword [r13 + 0x1c80], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
call fcn.18000fe40
mov qword [r13 + 0x108], rax
mov rcx, qword [rax]
call fcn.18000ffa4
test eax, eax
je 0x180010934
mov dword [r13 + 0x410], 3
jmp 0x18001094a
call fcn.18000fea0
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 0x1800109c2
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r8, str.LookupAccountSidW___err__u
mov edx, esi
mov r9d, eax
mov rcx, rdi
call fcn.18000e5ac
mov eax, 0x20a
lea rdi, [r13 + 0x420]
test r14b, 2
je 0x1800109e8
mov r8d, eax
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
jmp 0x180010a9b
test r14b, 4
je 0x180010a88
mov r8d, 0x105
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
mov r11, qword [rbx + 0x2ff]
mov qword [0x18002c4f8], r11
mov eax, dword [rbx + 0x307]
mov dword [0x18002c500], eax
mov rax, qword [rbx + 0x30b]
mov qword [0x18002c508], rax
mov eax, dword [rbx + 0x313]
mov dword [0x18002c510], eax
mov rax, qword [rbx + 0x317]
mov qword [0x18002c518], rax
mov eax, dword [rbx + 0x31f]
mov dword [0x18002c520], eax
mov rax, qword [rbx + 0x323]
mov qword [0x18002c528], rax
mov eax, dword [rbx + 0x32b]
mov dword [0x18002c530], eax
mov rax, qword [rbx + 0x32f]
mov qword [0x18002c538], rax
mov eax, dword [rbx + 0x337]
mov dword [0x18002c540], eax
jmp 0x180010a9b
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.18000cfb8
mov edx, ebx
mov rcx, rdi
mov qword [r13 + 0x630], rax
call fcn.18000cfb8
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.18000d2d4
lea rdx, [r13 + 0x638]
mov rcx, rdi
call fcn.18000cfec
lea rdx, [r13 + 0x638]
lea rcx, [r13 + 0x868]
mov r8d, 0x105
call qword [sym.imp.KERNEL32.dll_lstrcpynW]
lea rdx, [0x1800189ec]
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, 0x13e
call fcn.18000e054
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.18000e218
lea rcx, [r13 + 0x842]
lea r9, [r13 + 0xa74]
lea edx, [rbx - 0x52]
lea r8d, [rbx - 0x4d]
call fcn.18000d068
lea rcx, [r13 + 0xa4]
call qword [sym.imp.KERNEL32.dll_lstrlenA]
lea rcx, [r13 + 0xa4]
xor r8d, r8d
mov edx, eax
call fcn.18000e994
lea rdx, [r13 + 0x1438]
mov ecx, eax
call fcn.180011c60
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
call fcn.180010028
mov ebx, 0x9c
xor edx, edx
movsx ecx, al
mov r8d, ebx
mov dword [r13 + 0x1448], ecx
mov rcx, r13
call fcn.18000ce90
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.180010808
mov ecx, eax
mov dword [r13 + 0xa0], eax
call fcn.180010838
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 0x180010c79
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 0x180010cd6
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.18000e5ac
lea rdx, [r13 + 0x1860]
lea rcx, str.USERPROFILE
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea rdx, [r13 + 0x1656]
lea rcx, [0x18001ce68]
mov r8d, 0x20a
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x180010d08
lea rdx, [r13 + 0x1860]
lea rcx, [0x18001ce68]
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 0x180010d38
lea rdx, [0x18001ce54]
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.18000e994
lea rdx, [rbp + 0x1a0]
mov ecx, eax
call fcn.18000e7b8
lea rdx, [r13 + 0x1c88]
lea rcx, [rbp + 0x1a0]
mov r8d, 0x20
call fcn.18000e94c
mov edx, 0x14
lea rcx, [r13 + 0x1ca8]
lea r8d, [rdx + 0xa]
lea r9, [rbp + 0x1a0]
call fcn.18000d068
test r14b, 1
jne 0x180010dc9
call fcn.1800105ac
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, [0x18002a620]
jmp 0x180010864