Function at 0x4010b5
Capabilities:
Check if file exists
Create process on windows
Delete file
Get common file path
Get file attributes
Query environment variable
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10b4
call fcn.004281a0
mov eax, dword [0x43e054]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov dword [ebp - 0x1050], eax
mov eax, dword [ebp + 0x14]
xor ebx, ebx
push 0x3c
mov dword [ebp - 0x1064], eax
lea eax, [ebp - 0x10a8]
push ebx
push eax
mov dword [ebp - 0x10b0], 0x44
mov dword [ebp - 0x10ac], ebx
call fcn.0041aab0
xor eax, eax
mov dword [ebp - 0x1060], ebx
lea edi, [ebp - 0x105c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x401135
xor eax, eax
jmp 0x4013b3
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x828]
push esi
push eax
call fcn.00417e21
mov edi, dword [ebp + 8]
add esp, 0xc
lea eax, [ebp - 0x620]
push eax
push esi
mov word [ebp - 0x1080], di
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x438ca4
push 0x435860
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.00417b76
add esp, 0x10
lea eax, [ebp - 0x104c]
push eax
lea eax, [ebp - 0x418]
push eax
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4011c3
push esi
lea eax, [ebp - 0x210]
push eax
push 1
push ebx
push 0x435894
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x210]
push 0x2e
push eax
call fcn.00417b94
xor ecx, ecx
push str.64.exe
mov word [eax], cx
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.00417da4
lea eax, [ebp - 0x210]
push eax
call section..text
add esp, 0x18
test al, al
jne 0x401267
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x401267
push esi
lea eax, [ebp - 0x418]
push eax
push str._TEMP_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x210]
push 0x5c
push eax
call fcn.00417b94
push eax
lea eax, [ebp - 0x418]
push esi
push eax
call fcn.00417da4
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x210]
push esi
push eax
call fcn.00417e21
lea eax, [ebp - 0x210]
push eax
call section..text
add esp, 0x24
test al, al
je 0x40112e
mov dword [ebp - 0x1084], 1
mov word [ebp - 0x1080], di
mov eax, 0x4358e4
cmp dword [ebp - 0x1050], ebx
je 0x4012ae
cmp byte [0x44040b], bl
jne 0x401292
mov eax, 0x4358ec
push dword [ebp - 0x1050]
lea ecx, [ebp - 0x828]
push ecx
push eax
lea eax, [ebp - 0x210]
push eax
push str.__s___s__e___s___s
jmp 0x4012fb
cmp dword [ebp + 0x10], ebx
je 0x4012d9
cmp byte [0x44040b], bl
jne 0x4012c0
mov eax, 0x4358ec
push dword [ebp + 0x10]
lea ecx, [ebp - 0x828]
push ecx
push eax
lea eax, [ebp - 0x210]
push eax
push str.__s___s__e___s___p__d
jmp 0x4012fb
cmp byte [0x44040b], bl
jne 0x4012e6
mov eax, 0x4358ec
push ebx
lea ecx, [ebp - 0x828]
push ecx
push eax
lea eax, [ebp - 0x210]
push eax
push str.__s___s__e___s_
lea eax, [ebp - 0x1048]
push 0x410
push eax
call fcn.00417b76
add esp, 0x1c
lea eax, [ebp - 0x1060]
push eax
lea eax, [ebp - 0x10b0]
push eax
lea eax, [ebp - 0x620]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x1048]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp al, bl
jne 0x401367
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov esi, str.Error_launching_64_bit_image
xor edi, edi
call fcn.0040b6a1
pop ecx
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40112e
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push dword [ebp - 0x1064]
call dword [sym.imp.USER32.dll_ShowWindow]
push 0xffffffffffffffff
push dword [ebp - 0x1060]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x1060]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x105c]
call esi
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004179b6
leave
ret