Function at 0x10017b68
Capabilities:
Get common file path
Get hostname
Get system information on windows
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc1c
push ebx
push esi
xor ebx, ebx
push 0x1ed8
push ebx
push 0x1002cf40
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
call sub.msvcrt.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x1002e994], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
add ecx, dword [0x1002e994]
mov eax, 0x1002d99c
call fcn.100125e7
push 0x105
mov esi, 0x1002e998
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x10017bd3
mov eax, esi
call fcn.1001342e
mov dword [0x1002eba4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.10017329
mov dword [0x1002d044], eax
push dword [eax]
call fcn.10017440
pop ecx
pop ecx
test eax, eax
je 0x10017bfd
mov dword [0x1002d348], 3
jmp 0x10017c10
call fcn.10017383
xor ecx, ecx
test eax, eax
setg cl
inc ecx
mov dword [0x1002d348], ecx
mov eax, dword [ebp + 8]
push edi
mov dword [0x1002d34c], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov edi, 0x1002d248
push edi
lea eax, [ebp - 8]
push eax
mov eax, dword [0x1002d044]
mov esi, 0x80
push 0x1002d148
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
push dword [eax]
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
test eax, eax
jne 0x10017c63
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LookupAccountSidW___err__u
push esi
push edi
call fcn.1001120a
add esp, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x20a
push dword [ebp + 0xc]
mov ebx, 0x1002d350
push ebx
call esi
mov eax, ebx
call fcn.1001342e
mov dword [0x1002d55c], eax
push 0x40
mov eax, ebx
call fcn.1001342e
push eax
mov edi, 0x1002d004
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
xor ecx, ecx
mov word [eax*2 + 0x1002cffc], cx
push 0x20
pop eax
mov esi, 0x1002cfe4
call fcn.100136cf
pop ecx
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
test eax, eax
je 0x10017cd8
cmp word [ecx*2 + 0x1002d350], 0x5c
jne 0x10017cd3
mov esi, ecx
inc ecx
cmp ecx, eax
jb 0x10017cc6
xor eax, eax
test esi, esi
je 0x10017cf3
mov cx, word [eax*2 + 0x1002d350]
mov word [eax*2 + 0x1002d560], cx
inc eax
cmp eax, esi
jb 0x10017cde
push 0x105
push 0x1002d560
xor ecx, ecx
mov ebx, 0x1002d790
push ebx
mov word [eax*2 + 0x1002d560], cx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x10020c38
push ebx
call esi
push edi
push ebx
call esi
mov edi, 0x241b
call fcn.10013190
push eax
push ebx
mov dword [ebp + 8], eax
call esi
lea eax, [ebp + 8]
call fcn.100132d0
push 0x1002d99c
push 0xa
push 0xf
pop eax
mov ebx, 0x1002d76a
call fcn.10013448
pop ecx
pop ecx
mov esi, 0x1002cfe4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
xor eax, eax
call fcn.10016df1
push eax
mov ebx, 0x1002e360
call fcn.10018496
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
add esp, 0xc
call edi
push eax
call fcn.1001748d
mov ebx, 0x9c
push ebx
movsx eax, al
push 0
mov esi, 0x1002cf40
push esi
mov dword [0x1002e370], eax
call sub.msvcrt.dll_memset
add esp, 0x10
push esi
mov dword [0x1002cf40], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
and dword [ebp + 8], 0
mov dword [0x1002ecec], eax
test eax, eax
je 0x10017de1
lea eax, [ebp + 8]
push eax
call edi
push eax
call dword [0x1002ecec]
mov eax, dword [ebp + 8]
mov dword [0x1002cfe0], eax
test eax, eax
je 0x10017df2
push 9
pop eax
jmp 0x10017e00
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
movzx eax, word [ebp - 0x30]
mov esi, 0x104
push esi
mov edi, 0x1002e374
push edi
mov word [0x1002cfdc], ax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
lea eax, [ebp - 0x258]
push eax
mov esi, str.SystemRoot
push esi
call ebx
test eax, eax
jne 0x10017e3a
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x209
mov esi, 0x1002e788
push esi
push str.USERPROFILE
call ebx
test eax, eax
jne 0x10017e75
push 0x10029d4c
push edi
push str._s_s
push 0x20a
push esi
call fcn.1001120a
add esp, 0x14
push esi
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x20a
push 0x1002e57e
mov edi, str.TEMP
push edi
call ebx
test eax, eax
jne 0x10017e93
push esi
push edi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x3f
lea eax, [ebp - 0x4c]
push eax
mov esi, str.SystemDrive
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
pop edi
test eax, eax
jne 0x10017eb6
push 0x10029d78
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp + 8]
push eax
push 0x1002ecf0
mov dword [ebp + 8], 0x7f
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov esi, 0x1002e360
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
xor eax, eax
call fcn.10016df1
mov ecx, eax
lea eax, [ebp - 0xc1c]
call fcn.100125e7
push 0x20
push 0x1002eba8
push eax
call fcn.1001274e
lea eax, [ebp - 0xc1c]
push eax
push 0x14
push 0x1e
pop eax
mov ebx, 0x1002ebc8
call fcn.10013448
add esp, 0x1c
call fcn.100178a7
mov dword [0x1002ebe8], eax
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret