Function at 0x401100
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Get file size
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x254
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x268]
mov ebx, ecx
test edi, edi
je 0x401137
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebx + 0x10]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x20]
mov edx, 1
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x270]
mov cx, word [esp + 0x26c]
test eax, eax
mov dword [esp + 0x10], 0xc
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], 0x44
mov dword [esp + 0x4c], edx
mov word [esp + 0x50], cx
je 0x401257
push 0
push 0x80
lea edx, [esp + 0x18]
push 2
push edx
push 3
push 0xc0000000
push eax
mov dword [esp + 0x68], 0x101
call esi
cmp eax, 0xffffffff
mov dword [ebx + 8], eax
jne 0x4011c8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x254
ret 0x10
push 0
push eax
mov dword [esp + 0x64], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x401257
mov eax, dword [ebx + 8]
push 2
push 0
push 0
push eax
call ebp
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x164]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xe4]
push ecx
call fcn.0040262e
lea edx, [esp + 0x68]
push edx
call fcn.004025aa
lea eax, [esp + 0xec]
lea ecx, [esp + 0x6c]
push eax
push ecx
lea edx, [esp + 0x174]
push str.__s__s__r_n
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x164]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebx + 8]
lea edx, [esp + 0x170]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x274]
test eax, eax
je 0x401337
mov edx, dword [esp + 0x4c]
mov ecx, 0x100
test ecx, edx
jne 0x401279
or edx, ecx
mov dword [esp + 0x4c], edx
push 0
push 0x80
lea ecx, [esp + 0x18]
push 4
push ecx
push 3
push 0xc0000000
push eax
call esi
cmp eax, 0xffffffff
mov dword [ebx + 4], eax
jne 0x4012a8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x254
ret 0x10
push 0
push eax
mov dword [esp + 0x68], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
je 0x401337
mov edx, dword [ebx + 4]
push 2
push 0
push 0
push edx
call ebp
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x164]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x64]
push eax
call fcn.0040262e
lea ecx, [esp + 0xe8]
push ecx
call fcn.004025aa
lea edx, [esp + 0x6c]
lea eax, [esp + 0xec]
push edx
push eax
lea ecx, [esp + 0x174]
push str.__s__s__r_n
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea edx, [esp + 0x1c]
lea eax, [esp + 0x164]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edx, dword [ebx + 4]
lea ecx, [esp + 0x16c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebx + 0x114]
mov eax, 0x20
test ecx, ecx
je 0x40134b
mov eax, 0x30
lea ecx, [ebx + 0x118]
lea edx, [esp + 0x20]
push ecx
push edx
push 0
push 0
push eax
lea eax, [esp + 0x24]
push 1
lea ecx, [esp + 0x28]
push eax
add ebx, 0x10
push ecx
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
neg eax
pop ebx
add esp, 0x254
ret 0x10