Function at 0x402ba0
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42523e
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x435014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, main
sub eax, 0x402b60
mov dword [ebp - 0x58], eax
cmp dword [ebp + 8], 3
jge 0x402beb
call fcn.00402a30
or eax, 0xffffffff
jmp 0x40308e
mov byte [ebp - 0x49], 0
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
lea ecx, [ebp - 0xb8]
call fcn.00403510
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x9c]
mov dword [ebp - 0xa0], ecx
mov dword [ebp - 4], 0
push str.attach
mov edx, dword [ebp - 0xa0]
push edx
call fcn.00406800
add esp, 8
mov byte [ebp - 0x4a], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xb8]
call fcn.00403400
movzx eax, byte [ebp - 0x4a]
test eax, eax
je 0x402c59
mov byte [ebp - 0x49], 1
jmp 0x402cc6
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx]
push eax
lea ecx, [ebp - 0xd0]
call fcn.00403510
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 4], 1
push str.detach
mov edx, dword [ebp - 0x68]
push edx
call fcn.00406800
add esp, 8
mov byte [ebp - 0x4b], al
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xd0]
call fcn.00403400
movzx eax, byte [ebp - 0x4b]
test eax, eax
je 0x402cb7
mov byte [ebp - 0x49], 0
jmp 0x402cc6
call fcn.00402a30
mov eax, 0xffffff9c
jmp 0x40308e
push str._pid
lea ecx, [ebp - 0x100]
call fcn.00403510
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x70], ecx
mov dword [ebp - 4], 2
mov edx, 4
shl edx, 1
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + edx]
push ecx
lea ecx, [ebp - 0xe8]
call fcn.00403510
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x74]
push eax
call fcn.00406820
add esp, 8
mov byte [ebp - 0x4c], al
lea ecx, [ebp - 0xe8]
call fcn.00403400
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x100]
call fcn.00403400
movzx ecx, byte [ebp - 0x4c]
test ecx, ecx
je 0x402d49
call fcn.00402a30
mov eax, 0xfffffffe
jmp 0x40308e
mov edx, 4
imul eax, edx, 3
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax]
push edx
call fcn.0040fd05
add esp, 4
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
jne 0x402d91
push 0x406740
push str.you_passed_zero_pid
push 0x435fe8
call fcn.00406410
add esp, 8
mov ecx, eax
call fcn.00403240
mov eax, 0xfffffffd
jmp 0x40308e
lea eax, [ebp - 0x2c]
push eax
call fcn.00402a70
add esp, 4
mov dword [ebp - 4], 3
call fcn.00402910
movzx ecx, al
test ecx, ecx
jne 0x402dec
push 0x406740
push str.cant_get_priv
push 0x435fe8
call fcn.00406410
add esp, 8
mov ecx, eax
call fcn.00403240
mov dword [ebp - 0x78], 0xfffffffc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x78]
jmp 0x40308e
mov edx, dword [ebp - 0x60]
push edx
push 0
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x402e50
push 0x406740
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cant_open_the_process
push 0x435fe8
call fcn.00406410
add esp, 8
mov ecx, eax
call fcn.004030b0
mov ecx, eax
call fcn.00403240
mov dword [ebp - 0x7c], 0xfffffffb
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x7c]
jmp 0x40308e
push 0x40
push 0x3000
push 0x1060
push 0
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x402ead
push 0x406740
push str.cannot_allocate_memory
push 0x435fe8
call fcn.00406410
add esp, 8
mov ecx, eax
call fcn.00403240
mov dword [ebp - 0x80], 0xfffffff9
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x80]
jmp 0x40308e
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x58]
push edx
push 0x402b60
mov eax, dword [ebp - 0x54]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x2c]
call fcn.00403320
push eax
lea ecx, [ebp - 0x2c]
call fcn.00403340
push eax
mov eax, dword [ebp - 0x54]
add eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp dword [ebp - 0x14], 0
jne 0x402f3e
push 0x406740
push str.cant_write_to_process_memory
push 0x435fe8
call fcn.00406410
add esp, 8
mov ecx, eax
call fcn.00403240
mov dword [ebp - 0x84], 0xfffffff8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x84]
jmp 0x40308e
mov edx, dword [ebp - 0x54]
add edx, dword [ebp - 0x58]
mov dword [ebp - 0x88], edx
push 0
push 0
mov eax, dword [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x54]
push ecx
push 0
push 0
mov edx, dword [ebp - 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x402fc0
push 0x406740
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannot_create_remote_thread
push 0x435fe8
call fcn.00406410
add esp, 8
mov ecx, eax
call fcn.004030b0
mov ecx, eax
call fcn.00403240
mov dword [ebp - 0x8c], 0xfffffff7
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x8c]
jmp 0x40308e
push 0x3e8
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x48], 0
lea ecx, [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x5c]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
jne 0x40300c
mov dword [ebp - 0x90], 0xfffffff5
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x90]
jmp 0x40308e
cmp dword [ebp - 0x48], 0
je 0x40306f
mov eax, dword [ebp - 0x48]
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004028e0
add esp, 8
lea edx, [ebp - 0x44]
mov dword [ebp - 0x94], edx
push 0
push 0x431681
mov ecx, dword [ebp - 0x94]
call fcn.00403340
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov dword [ebp - 0x98], 0xfffffff6
lea ecx, [ebp - 0x44]
call fcn.00403400
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
mov eax, dword [ebp - 0x98]
jmp 0x40308e
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.00403400
jmp 0x40308c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409fa4
mov esp, ebp
pop ebp
ret