Function at 0x10017410
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 0x1002cf00
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 [0x1002e954], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
add ecx, dword [0x1002e954]
mov eax, 0x1002d95c
call fcn.10011f82
push 0x105
mov esi, 0x1002e958
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1001747b
mov eax, esi
call fcn.10012dc7
mov dword [0x1002eb64], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call fcn.10016bd1
mov dword [0x1002d004], eax
push dword [eax]
call fcn.10016ce8
pop ecx
pop ecx
test eax, eax
je 0x100174a5
mov dword [0x1002d308], 3
jmp 0x100174b8
call fcn.10016c2b
xor ecx, ecx
test eax, eax
setg cl
inc ecx
mov dword [0x1002d308], ecx
mov eax, dword [ebp + 8]
push edi
mov dword [0x1002d30c], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
mov edi, 0x1002d208
push edi
lea eax, [ebp - 8]
push eax
mov eax, dword [0x1002d004]
mov esi, 0x80
push 0x1002d108
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 0x1001750b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LookupAccountSidW___err__u
push esi
push edi
call fcn.10010bbc
add esp, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpynW]
push 0x20a
push dword [ebp + 0xc]
mov ebx, 0x1002d310
push ebx
call esi
mov eax, ebx
call fcn.10012dc7
mov dword [0x1002d51c], eax
push 0x40
mov eax, ebx
call fcn.10012dc7
push eax
mov edi, 0x1002cfc4
push edi
call esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
xor ecx, ecx
mov word [eax*2 + 0x1002cfbc], cx
push 0x20
pop eax
mov esi, 0x1002cfa4
call fcn.10013068
pop ecx
push ebx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
xor ecx, ecx
test eax, eax
je 0x10017580
cmp word [ecx*2 + 0x1002d310], 0x5c
jne 0x1001757b
mov esi, ecx
inc ecx
cmp ecx, eax
jb 0x1001756e
xor eax, eax
test esi, esi
je 0x1001759b
mov cx, word [eax*2 + 0x1002d310]
mov word [eax*2 + 0x1002d520], cx
inc eax
cmp eax, esi
jb 0x10017586
push 0x105
push 0x1002d520
xor ecx, ecx
mov ebx, 0x1002d750
push ebx
mov word [eax*2 + 0x1002d520], cx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x10020c40
push ebx
call esi
push edi
push ebx
call esi
mov edi, 0x2bce
call fcn.10012b29
push eax
push ebx
mov dword [ebp + 8], eax
call esi
lea eax, [ebp + 8]
call fcn.10012c69
push 0x1002d95c
push 0xa
push 0xf
pop eax
mov ebx, 0x1002d72a
call fcn.10012de1
pop ecx
pop ecx
mov esi, 0x1002cfa4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
xor eax, eax
call fcn.10016699
push eax
mov ebx, 0x1002e320
call fcn.10017d3e
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
add esp, 0xc
call edi
push eax
call fcn.10016d35
mov ebx, 0x9c
push ebx
movsx eax, al
push 0
mov esi, 0x1002cf00
push esi
mov dword [0x1002e330], eax
call sub.msvcrt.dll_memset
add esp, 0x10
push esi
mov dword [0x1002cf00], 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 [0x1002ecac], eax
test eax, eax
je 0x10017689
lea eax, [ebp + 8]
push eax
call edi
push eax
call dword [0x1002ecac]
mov eax, dword [ebp + 8]
mov dword [0x1002cfa0], eax
test eax, eax
je 0x1001769a
push 9
pop eax
jmp 0x100176a8
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, 0x1002e334
push edi
mov word [0x1002cf9c], 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 0x100176e2
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x209
mov esi, 0x1002e748
push esi
push str.USERPROFILE
call ebx
test eax, eax
jne 0x1001771d
push 0x10029ae8
push edi
push str._s_s
push 0x20a
push esi
call fcn.10010bbc
add esp, 0x14
push esi
push str.USERPROFILE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push 0x20a
push 0x1002e53e
mov edi, str.TEMP
push edi
call ebx
test eax, eax
jne 0x1001773b
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 0x1001775e
push 0x10029b14
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp + 8]
push eax
push 0x1002ecb0
mov dword [ebp + 8], 0x7f
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
mov esi, 0x1002e320
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
xor eax, eax
call fcn.10016699
mov ecx, eax
lea eax, [ebp - 0xc1c]
call fcn.10011f82
push 0x20
push 0x1002eb68
push eax
call fcn.100120e9
lea eax, [ebp - 0xc1c]
push eax
push 0x14
push 0x1e
pop eax
mov ebx, 0x1002eb88
call fcn.10012de1
add esp, 0x1c
call fcn.1001714f
mov dword [0x1002eba8], eax
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret