Function at 0x10017da7
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 0x1002df40
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 [0x1002f994], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
add ecx, dword [0x1002f994]
mov eax, 0x1002e99c
call fcn.100126ea
push 0x105
mov esi, 0x1002f998
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x10017e12
mov eax, esi
call fcn.10013531
mov dword [0x1002fba4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.10017568
mov dword [0x1002e044], eax
push dword [eax]
call fcn.1001767f
pop ecx
pop ecx
test eax, eax
je 0x10017e3c
mov dword [0x1002e348], 3
jmp 0x10017e4f
call fcn.100175c2
xor ecx, ecx
test eax, eax
setg cl
inc ecx
mov dword [0x1002e348], ecx
mov eax, dword [ebp + 8]
push edi
mov dword [0x1002e34c], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov edi, 0x1002e248
push edi
lea eax, [ebp - 8]
push eax
mov eax, dword [0x1002e044]
mov esi, 0x80
push 0x1002e148
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 0x10017ea2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LookupAccountSidW___err__u
push esi
push edi
call fcn.1001130f
add esp, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x20a
push dword [ebp + 0xc]
mov ebx, 0x1002e350
push ebx
call esi
mov eax, ebx
call fcn.10013531
mov dword [0x1002e55c], eax
push 0x40
mov eax, ebx
call fcn.10013531
push eax
mov edi, 0x1002e004
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
xor ecx, ecx
mov word [eax*2 + 0x1002dffc], cx
push 0x20
pop eax
mov esi, 0x1002dfe4
call fcn.100137d2
pop ecx
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
test eax, eax
je 0x10017f17
cmp word [ecx*2 + 0x1002e350], 0x5c
jne 0x10017f12
mov esi, ecx
inc ecx
cmp ecx, eax
jb 0x10017f05
xor eax, eax
test esi, esi
je 0x10017f32
mov cx, word [eax*2 + 0x1002e350]
mov word [eax*2 + 0x1002e560], cx
inc eax
cmp eax, esi
jb 0x10017f1d
push 0x105
push 0x1002e560
xor ecx, ecx
mov ebx, 0x1002e790
push ebx
mov word [eax*2 + 0x1002e560], cx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x10020c48
push ebx
call esi
push edi
push ebx
call esi
mov edi, 0x2529
call fcn.10013293
push eax
push ebx
mov dword [ebp + 8], eax
call esi
lea eax, [ebp + 8]
call fcn.100133d3
push 0x1002e99c
push 0xa
push 0xf
pop eax
mov ebx, 0x1002e76a
call fcn.1001354b
pop ecx
pop ecx
mov esi, 0x1002dfe4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
xor eax, eax
call fcn.10017030
push eax
mov ebx, 0x1002f360
call fcn.100186d5
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
add esp, 0xc
call edi
push eax
call fcn.100176cc
mov ebx, 0x9c
push ebx
movsx eax, al
push 0
mov esi, 0x1002df40
push esi
mov dword [0x1002f370], eax
call sub.msvcrt.dll_memset
add esp, 0x10
push esi
mov dword [0x1002df40], 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 [0x1002fcec], eax
test eax, eax
je 0x10018020
lea eax, [ebp + 8]
push eax
call edi
push eax
call dword [0x1002fcec]
mov eax, dword [ebp + 8]
mov dword [0x1002dfe0], eax
test eax, eax
je 0x10018031
push 9
pop eax
jmp 0x1001803f
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, 0x1002f374
push edi
mov word [0x1002dfdc], 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 0x10018079
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x209
mov esi, 0x1002f788
push esi
push str.USERPROFILE
call ebx
test eax, eax
jne 0x100180b4
push 0x10029f98
push edi
push str._s_s
push 0x20a
push esi
call fcn.1001130f
add esp, 0x14
push esi
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x20a
push 0x1002f57e
mov edi, str.TEMP
push edi
call ebx
test eax, eax
jne 0x100180d2
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 0x100180f5
push 0x10029fc4
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp + 8]
push eax
push 0x1002fcf0
mov dword [ebp + 8], 0x7f
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov esi, 0x1002f360
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
xor eax, eax
call fcn.10017030
mov ecx, eax
lea eax, [ebp - 0xc1c]
call fcn.100126ea
push 0x20
push 0x1002fba8
push eax
call fcn.10012851
lea eax, [ebp - 0xc1c]
push eax
push 0x14
push 0x1e
pop eax
mov ebx, 0x1002fbc8
call fcn.1001354b
add esp, 0x1c
call fcn.10017ae6
mov dword [0x1002fbe8], eax
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret