Function at 0x1002730
Capabilities:
Create process on windows
Get common file path
Query environment variable
Set current directory
Set environment variable
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x72c
mov eax, dword [0x1006110]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x678], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x694], eax
mov eax, dword [ebp + 0x20]
push esi
mov dword [ebp - 0x6ac], eax
mov eax, dword [ebp + 0x24]
push edi
mov dword [ebp - 0x6a8], eax
xor eax, eax
mov dword [ebp - 0x688], eax
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, 0x800
push edi
push 0x40
mov dword [ebp - 0x690], ecx
mov dword [ebp - 0x68c], eax
mov dword [ebp - 0x674], eax
mov dword [ebp - 0x684], eax
mov dword [ebp - 0x67c], eax
mov dword [ebp - 0x680], eax
call esi
push eax
lea ecx, [ebp - 0x67c]
call fcn.01002447
cmp dword [ebp - 0x67c], 0
jne 0x10027cf
mov dword [ebp - 0x674], 0xe
jmp 0x1002bfb
push edi
push 0x40
call esi
push eax
lea ecx, [ebp - 0x680]
call fcn.01002447
cmp dword [ebp - 0x680], 0
je 0x10027c0
push edi
push 0x40
call esi
push eax
lea ecx, [ebp - 0x684]
call fcn.01002447
cmp dword [ebp - 0x684], 0
je 0x10027c0
mov esi, 0x400
push esi
push dword [ebp - 0x684]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
dec eax
cmp eax, 0x3ff
ja 0x100282d
push dword [ebp - 0x684]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x1002839
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x674], eax
cmp dword [ebp - 0x674], 0
jne 0x1002bfb
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
push dword [ebp - 0x67c]
push ebx
call edi
mov ebx, dword [ebp - 0x680]
test eax, eax
jbe 0x100286c
push esi
push ebx
push dword [ebp - 0x678]
call edi
test eax, eax
jne 0x100287f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x674], eax
jmp 0x1002bfb
mov ecx, dword [ebp - 0x690]
lea eax, [ebp - 0x68c]
push eax
push dword [ebp - 0x694]
call fcn.0100269a
test eax, eax
je 0x100286e
xor esi, esi
cmp dword [ebp + 0x28], esi
je 0x1002aac
xor eax, eax
mov dword [ebp - 0x6a4], esi
lea edi, [ebp - 0x6a0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x40
stosd dword es:[edi], eax
lea eax, [ebp - 0x728]
push esi
push eax
call sub.msvcrt.dll_memset
mov ecx, dword [ebp - 0x690]
add esp, 0xc
lea eax, [ebp - 0x678]
push eax
push dword [ebp - 0x67c]
mov dword [ebp - 0x72c], 0x44
mov dword [ebp - 0x688], esi
mov dword [ebp - 0x678], esi
call fcn.01002366
mov dword [ebp - 0x674], eax
cmp eax, esi
je 0x100291e
cmp dword [ebp - 0x678], esi
je 0x1002bfb
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1002bfb
mov dword [ebp - 0x700], 1
cmp dword [ebp + 0x1c], esi
je 0x1002931
xor eax, eax
jmp 0x100293c
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 6
inc eax
mov edi, dword [ebp - 0x678]
mov word [ebp - 0x6fc], ax
cmp edi, esi
lea eax, [ebp - 0x20c]
mov esi, 0x104
je 0x100295b
push edi
jmp 0x1002961
push dword [ebp - 0x67c]
push 0x1001778
push esi
push eax
call fcn.010024ff
add esp, 0x10
test eax, eax
je 0x100298f
jle 0x100297e
movzx eax, ax
or eax, 0x80070000
test edi, edi
mov dword [ebp - 0x674], eax
je 0x1002bfb
push edi
jmp 0x1002913
cmp word [ebx], 0
je 0x10029a7
push ebx
push esi
lea eax, [ebp - 0x20c]
push eax
call fcn.010024a5
test eax, eax
jne 0x1002974
push esi
lea eax, [ebp - 0x670]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x10029c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x100297e
push 0x1001728
lea eax, [ebp - 0x670]
push eax
push 0x100171c
lea eax, [ebp - 0x468]
push 0x12d
push eax
call fcn.010024ff
xor ebx, ebx
add esp, 0x14
cmp eax, ebx
je 0x10029fa
jle 0x10029f6
movzx eax, ax
or eax, 0x80070000
cmp edi, ebx
jmp 0x1002980
lea eax, [ebp - 0x6a4]
push eax
lea eax, [ebp - 0x72c]
push eax
push dword [ebp - 0x694]
lea eax, [ebp - 0x20c]
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
lea eax, [ebp - 0x468]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x1002a39
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x674], eax
jmp 0x1002a98
push 0xffffffffffffffff
push dword [ebp - 0x6a4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x688]
push eax
push dword [ebp - 0x6a4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x1002a66
mov eax, dword [ebp - 0x688]
jmp 0x1002a6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x674], eax
cmp dword [ebp - 0x6a4], ebx
je 0x1002a88
push dword [ebp - 0x6a4]
call esi
cmp dword [ebp - 0x6a0], ebx
je 0x1002a98
push dword [ebp - 0x6a0]
call esi
cmp edi, ebx
je 0x1002bd5
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1002bd5
mov esi, dword [ebp - 0x67c]
mov ecx, dword [ebp - 0x690]
push esi
call fcn.01002401
push 0x3c
pop edi
push edi
lea eax, [ebp - 0x6e8]
push 0
push eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x6e8], edi
xor ecx, ecx
xor edi, edi
add esp, 0xc
mov dword [ebp - 0x6e4], 0x800640
mov dword [ebp - 0x6d8], esi
inc ecx
cmp word [ebx], di
jne 0x1002b07
mov dword [ebp - 0x688], ecx
mov dword [ebp - 0x678], edi
lea eax, [ebp - 0x678]
jmp 0x1002b0d
lea eax, [ebp - 0x680]
mov eax, dword [eax]
mov dword [ebp - 0x6d4], eax
test byte [ebp - 0x688], cl
je 0x1002b31
cmp dword [ebp - 0x678], edi
je 0x1002b31
push dword [ebp - 0x678]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x694]
mov dword [ebp - 0x6d0], eax
cmp dword [ebp + 0x1c], edi
je 0x1002b4a
mov dword [ebp - 0x6cc], edi
jmp 0x1002b5b
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 6
inc eax
mov dword [ebp - 0x6cc], eax
lea eax, [ebp - 0x6e8]
push eax
call dword [ebp - 0x6ac]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov dword [ebp - 0x674], eax
cmp dword [ebp - 0x68c], edi
je 0x1002b91
push dword [ebp - 0x68c]
push 0x100121c
call esi
cmp ebx, edi
je 0x1002bd3
and dword [ebp - 0x674], 0
cmp dword [ebp + 0x14], 0
je 0x1002bc7
push 0xffffffffffffffff
push dword [ebp - 0x6b0]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 0x690]
call fcn.0100255e
push 0x100136c
push 0x1001370
call esi
push dword [ebp - 0x6b0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
cmp dword [ebp - 0x674], ebx
je 0x1002bfb
push 4
lea eax, [ebp - 0x674]
push eax
push 4
push 0
push 0x100139c
push dword [ebp - 0x6a8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp dword [ebp - 0x680], 0
mov esi, dword [ebp - 0x674]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x1002c18
push dword [ebp - 0x680]
call edi
cmp dword [ebp - 0x67c], 0
je 0x1002c29
push dword [ebp - 0x67c]
call edi
cmp dword [ebp - 0x684], 0
je 0x1002c3a
push dword [ebp - 0x684]
call edi
cmp dword [ebp - 0x68c], 0
je 0x1002c4b
push dword [ebp - 0x68c]
call edi
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.01004780
leave
ret 0x24