Function at 0x1000503c
Capabilities:
Create process on windows
Delete file
Get common file path
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x608
push ebx
push ebp
push esi
mov esi, dword [0x1000f5a8]
push edi
mov edi, dword [esi + 0x10]
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0xc]
lea eax, [esp + 0x18]
push eax
xor eax, eax
add ecx, esi
test edx, edx
setne al
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], edi
add eax, 0x67
push eax
call fcn.10005fa3
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.1000610d
lea eax, [esp + 0x410]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x208]
push eax
xor ebp, ebp
push ebp
push 0x1000d430
lea eax, [esp + 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [esp + 0x208]
push ebp
push 0x80
push 4
push ebp
push ebp
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
cmp esi, 0xffffffff
je 0x10005108
push ebp
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x20]
mov dword [esp + 0x20], ebp
push dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call ebx
lea ebp, [edi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.FM_d
lea eax, [esp + 0x90]
push 0x40
push eax
call fcn.1000ad60
add esp, 0x10
lea eax, [esp + 0x88]
push eax
push ebp
xor esi, esi
push esi
push 4
push esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x10005232
push ebp
push esi
push esi
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x1000522c
mov edx, dword [esp + 0x2c]
lea ecx, [ebp + 8]
mov esi, ecx
sub esi, ebp
push edi
mov dword [ebp], esi
mov dword [ebp + 4], edi
call fcn.1000adab
xor esi, esi
push 0x40
lea eax, [esp + 0x48]
push esi
push eax
call sub.ntdll.dll_memset
mov dword [esp + 0x3c], esi
xor eax, eax
lea edi, [esp + 0x40]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push dword [esp + 0x61c]
mov dword [esp + 0x44], 0x44
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
mov eax, dword [esp + 0x2c]
add eax, 8
push eax
push dword [esp + 0x2c]
lea eax, [esp + 0x118]
push str._d__d__d__d
push 0x80
push eax
call fcn.1000ad60
add esp, 0x1c
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x418]
push eax
push esi
push 0xc000000
push 1
push esi
push esi
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x10005225
push 0xffffffffffffffff
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x34]
call ebx
push dword [esp + 0x30]
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x18]
call ebx
lea ecx, [esp + 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [esp + 0x1c]
call fcn.1000ad9b
pop edi
pop esi
xor eax, eax
pop ebp
inc eax
pop ebx
add esp, 0x608
ret 4