Function at 0x1002814
Capabilities:
Create process on windows
Delete file
Get common file path
Print debug messages
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x103797a
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0xa48c
call fcn.0102ce40
mov eax, dword [0x10482e0]
xor eax, esp
mov dword [esp + 0xa488], eax
push ebx
push esi
push edi
mov eax, dword [0x10482e0]
xor eax, esp
push eax
lea eax, [esp + 0xa4a0]
mov dword fs:[0], eax
lea eax, [esp + 0x84]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x84]
push eax
xor ebx, ebx
push ebx
push 0x103bccc
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [esp + 0x84]
push 0x2e
push eax
call fcn.0101b3c1
lea ecx, [esp + 0x294]
sub ecx, eax
push str..exe
sar ecx, 1
push ecx
push eax
call fcn.0101b3f1
add esp, 0x14
push ebx
push ebx
push 4
push ebx
push 1
push 0x10000000
lea eax, [esp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
jne 0x10028db
call fcn.010020cb
xor al, al
jmp 0x1002a97
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push eax
call edi
push dword [section..gms]
lea esi, [esp + 0x14]
call fcn.0100197d
mov dword [esp + 0xa4a8], ebx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], eax
mov esi, 0xa000
push ebx
push ebx
push dword [esp + 0x24]
push dword [esp + 0x1c]
call edi
cmp eax, 0xffffffff
je 0x1002a05
lea eax, [esp + 0x494]
push eax
push esi
lea eax, [esp + 0x18]
push eax
call fcn.01001a44
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
je 0x1002a14
push ebx
lea ecx, [esp + 0x28]
push ecx
push eax
lea eax, [esp + 0x4a0]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1002a14
add dword [esp + 0x1c], esi
cmp dword [esp + 0x28], esi
je 0x100290e
push dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
xor eax, eax
mov dword [esp + 0x2c], ebx
lea edi, [esp + 0x30]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x40
stosd dword es:[edi], eax
lea eax, [esp + 0x44]
push ebx
push eax
call fcn.010216d0
add esp, 0xc
lea eax, [esp + 0x28c]
push eax
push 0x104
mov dword [esp + 0x44], 0x44
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x294]
push eax
push ebx
push ebx
push 1
push ebx
push ebx
push ebx
lea eax, [esp + 0xa8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x1002a3c
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.010020cb
cmp dword [esp + 0x10], ebx
je 0x10028d4
push dword [esp + 0x10]
call esi
jmp 0x10028d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010020cb
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.010020cb
add esp, 4
cmp dword [esp + 0x10], ebx
je 0x10028d4
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10028d4
mov eax, dword [esp + 0x2c]
mov dword [0x104b298], eax
call fcn.010020cb
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0xffffffffffffffff
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x2c]
call esi
push dword [esp + 0x30]
call esi
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.0100144c
cmp dword [esp + 0x10], ebx
mov dword [0x104b298], ebx
je 0x1002a95
push dword [esp + 0x10]
call esi
mov al, 1
mov ecx, dword [esp + 0xa4a0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa488]
xor ecx, esp
call fcn.0101aef9
mov esp, ebp
pop ebp
ret