Function at 0x405728
Capabilities:
Create process on windows
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffb28
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x4d8], ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], edx
mov edi, eax
xor eax, eax
push ebp
push 0x405a81
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
test edi, edi
je 0x405a5b
lea eax, [ebp - 0x430]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov word [eax], 0x4c
add dword [ebp - 0x18], 2
mov eax, dword [ebp - 0x18]
mov dword [eax], 0x4d2
add dword [ebp - 0x18], 4
mov eax, dword [ebp - 0x18]
movzx edx, word [ebp - 0x14]
mov word [eax], dx
add dword [ebp - 0x18], 2
mov eax, dword [ebp - 0x18]
mov dword [eax], pe_nt_image_headers32
add dword [ebp - 0x18], 4
lea ecx, [ebp - 0x440]
mov edx, dword [edi]
add edx, edx
add edx, edx
lea eax, [edi + 0x194]
call fcn.00405278
lea edx, [ebp - 0x440]
mov ecx, 0x10
mov eax, dword [ebp - 0x18]
call fcn.0040447c
add dword [ebp - 0x18], 0x10
mov word [ebp - 0x1a], 0
lea ebx, [ebp - 0x412]
movzx eax, byte [edi]
mov byte [ebx], al
inc word [ebp - 0x1a]
inc ebx
mov eax, dword [edi]
dec eax
test eax, eax
jl 0x405802
inc eax
mov dword [ebp - 0x30], eax
xor esi, esi
mov eax, dword [edi + esi*4 + 4]
mov dword [ebx], eax
add ebx, 4
inc esi
dec dword [ebp - 0x30]
jne 0x4057f3
movzx eax, word [edi]
add eax, eax
add eax, eax
add word [ebp - 0x1a], ax
lea eax, [ebp - 4]
mov edx, 0x405a9c
call fcn.00403b38
mov eax, dword [ebp - 4]
test eax, eax
je 0x405826
sub eax, 4
mov eax, dword [eax]
mov esi, eax
mov eax, esi
mov byte [ebx], al
inc ebx
inc word [ebp - 0x1a]
mov eax, dword [ebp - 4]
call fcn.00403cc8
push eax
push ebx
call sub.kernel32.dll_lstrcpyA
add ebx, esi
add word [ebp - 0x1a], si
lea eax, [ebp - 8]
mov edx, 0x405a9c
call fcn.00403b38
mov eax, dword [ebp - 8]
test eax, eax
je 0x40585f
sub eax, 4
mov eax, dword [eax]
mov esi, eax
mov eax, esi
mov byte [ebx], al
inc ebx
inc word [ebp - 0x1a]
mov eax, dword [ebp - 8]
call fcn.00403cc8
push eax
push ebx
call sub.kernel32.dll_lstrcpyA
add ebx, esi
add word [ebp - 0x1a], si
xor eax, eax
mov dword [ebx], eax
add ebx, 4
add word [ebp - 0x1a], 4
lea eax, [ebp - 0x4d4]
xor ecx, ecx
mov edx, 0x94
call fcn.00402fd8
mov dword [ebp - 0x4d4], 0x94
lea eax, [ebp - 0x4d4]
push eax
call sub.kernel32.dll_GetVersionExA
mov eax, dword [ebp - 0x4d0]
mov dword [ebx], eax
add ebx, 4
mov eax, dword [ebp - 0x4cc]
mov dword [ebx], eax
add ebx, 4
mov eax, dword [ebp - 0x4c8]
mov dword [ebx], eax
add ebx, 4
add word [ebp - 0x1a], 0xc
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x324]
dec eax
test eax, eax
jl 0x40591d
inc eax
mov dword [ebp - 0x30], eax
xor esi, esi
imul eax, esi, 0x43
lea eax, [edi + eax*4 + 0x328]
push eax
call sub.kernel32.dll_lstrlenA
add eax, dword [ebp - 0x20]
inc eax
add eax, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x64
jae 0x40591d
inc dword [ebp - 0x24]
inc esi
dec dword [ebp - 0x30]
jne 0x4058f4
movzx eax, byte [ebp - 0x24]
mov byte [ebx], al
inc ebx
inc word [ebp - 0x1a]
mov eax, dword [ebp - 0x24]
dec eax
test eax, eax
jl 0x4059a1
inc eax
mov dword [ebp - 0x30], eax
xor esi, esi
imul eax, esi, 0x43
mov eax, dword [edi + eax*4 + 0x42c]
mov dword [ebx], eax
add ebx, 4
add word [ebp - 0x1a], 4
imul eax, esi, 0x43
mov eax, dword [edi + eax*4 + 0x430]
mov dword [ebx], eax
add ebx, 4
add word [ebp - 0x1a], 4
imul eax, esi, 0x43
lea eax, [edi + eax*4 + 0x328]
push eax
call sub.kernel32.dll_lstrlenA
mov byte [ebp - 0x25], al
movzx eax, byte [ebp - 0x25]
mov byte [ebx], al
inc ebx
inc word [ebp - 0x1a]
imul eax, esi, 0x43
lea eax, [edi + eax*4 + 0x328]
push eax
push ebx
call sub.kernel32.dll_lstrcpyA
movzx eax, byte [ebp - 0x25]
add ebx, eax
movzx eax, byte [ebp - 0x25]
add word [ebp - 0x1a], ax
inc esi
dec dword [ebp - 0x30]
jne 0x405936
cmp word [ebp - 0x1a], 0x3e2
jbe 0x4059af
mov word [ebp - 0x1a], 0x3e2
mov eax, dword [ebp - 0x18]
movzx edx, word [ebp - 0x1a]
mov word [eax], dx
movzx ebx, word [ebp - 0x1a]
add ebx, 0x1e
lea eax, [ebp - 0xc]
mov edx, 0x405ab8
call fcn.00403b38
push 0
push 0x80000000
push 2
push 0
push 1
push 0x40000000
mov eax, dword [ebp - 0xc]
call fcn.00403cc8
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
push 0
lea eax, [ebp - 0x2c]
push eax
push ebx
lea eax, [ebp - 0x430]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
push esi
call sub.kernel32.dll_CloseHandle
push 0x405acc
lea edx, [ebp - 0x4d8]
mov eax, ebx
call fcn.004052b4
push dword [ebp - 0x4d8]
push 0x405ae0
push dword [ebp - 0xc]
push 0x405aec
lea eax, [ebp - 0x10]
mov edx, 5
call fcn.00403c24
push 0
push 0
mov eax, dword [ebp - 0x10]
call fcn.00403cc8
push eax
push 0x405af0
push 0x405b04
push 0
call sub.shell32.dll_ShellExecuteA
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405a88
lea eax, [ebp - 0x4d8]
call fcn.00403aa0
lea eax, [ebp - 0x10]
mov edx, 4
call fcn.00403ac4
ret