Function at 0x40f7a0
Capabilities:
Allocate or change rwx memory
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
call fcn.0040fab0
add esp, 8
test eax, eax
je 0x40f980
mov edx, dword [ebp + 0x10]
push edx
call fcn.0040fb40
add esp, 4
test eax, eax
je 0x40f94d
push 0x40
push 0x1000
mov eax, dword [ebp + 0x1c]
push eax
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40f92e
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f9a0
add esp, 0x18
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040fb70
add esp, 8
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x3c]
mov eax, dword [ebp + 0x18]
lea ecx, [edx + eax + 0x18]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov dword [edx + 0x1c], eax
push 0
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40f90f
mov dword [ebp - 0x2e8], 0x10002
lea edx, [ebp - 0x2e8]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
push 0
push 5
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x238]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push 0
push 4
lea ecx, [ebp - 0x238]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 0xffc
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 5
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0xc]
add edx, 0xff7
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov byte [ebp - 0x18], 0xe9
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x10]
sub edx, dword [ebp - 0x238]
sub edx, 5
mov dword [ebp - 0x17], edx
push 0
push 5
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x238]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x40f92c
push 0x10
push 0
push str.WriteProcessMemory_failed
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x40f94b
push 0x10
push 0
push str.Not_enough_memory.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x40f96a
push 0x10
push 0
push str.Load_failed._Consider_making_this_EXE_relocatable.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40f991
push 0x10
push 0
push str.Fail_to_open_target.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov esp, ebp
pop ebp
ret