Function at 0x402ea0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ecx, edi
mov edi, edi
mov bl, byte [ecx]
mov esi, ecx
push 0
push ecx
push 0
call fcn.00403670
mov ecx, eax
sub eax, edi
mov dword [ebp + 8], eax
cmp bl, 0xe9
je 0x402f15
cmp bl, 0xe0
je 0x402f15
cmp bl, 0xc2
je 0x402f15
cmp bl, 0xc3
je 0x402f15
cmp bl, 0xff
jne 0x402ee4
cmp byte [esi + 1], 0x25
jmp 0x402f0c
cmp bl, 0x26
je 0x402f02
cmp bl, 0x2e
je 0x402f02
cmp bl, 0x36
je 0x402f02
cmp bl, 0x3e
je 0x402f02
cmp bl, 0x64
je 0x402f02
cmp bl, 0x65
jne 0x402f0e
cmp byte [esi + 1], 0xff
jne 0x402f0e
cmp byte [esi + 2], 0x25
je 0x402f15
cmp eax, 5
jl 0x402eb0
jmp 0x402f1e
cmp eax, 5
jl 0x4030d1
cmp eax, 0x1a
jg 0x4030d1
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], 0x20
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x10], eax
je 0x402f6d
cmp dword [ebp - 8], 0
je 0x402f6d
push 0x20
push esi
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
test eax, eax
je 0x402f6d
lea eax, [ebp - 4]
push eax
push 0x40
push 0x20
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], eax
je 0x402fad
cmp dword [ebp - 0x18], 0
je 0x402fad
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
test eax, eax
je 0x402fad
lea eax, [ebp - 0x14]
push eax
push 0x40
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [ebp - 4], 0
je 0x403048
cmp dword [ebp - 0xc], 0
je 0x403048
cmp dword [ebp - 8], 0
je 0x403048
cmp dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0x40
je 0x403048
cmp dword [ebp - 0x18], 0
je 0x403048
cmp dword [ebp - 0x14], 0
je 0x403048
xor eax, eax
mov ecx, edi
mov edx, esi
test ebx, ebx
jle 0x403004
mov edi, edi
push 0
push ecx
push edx
call fcn.00403670
mov ecx, eax
sub eax, edi
lea edx, [eax + esi]
cmp eax, ebx
jl 0x402ff0
cmp eax, ebx
jne 0x403048
mov eax, ebx
mov byte [edx], 0xe9
sub eax, edx
add eax, 0xfffffffb
add eax, edi
mov dword [edx + 1], eax
mov eax, dword [ebp + 0x10]
sub eax, edi
mov byte [esi + 0x1f], bl
sub eax, 5
mov byte [edi], 0xe9
mov dword [edi + 1], eax
add ebx, 0xfffffffb
add edi, 5
test ebx, ebx
jle 0x403041
push ebx
push 0xcc
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, 1
jmp 0x40304a
xor esi, esi
cmp dword [ebp - 0x14], 0
mov edi, dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
je 0x40308d
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x40308d
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x40308d
push ecx
push eax
push dword [ebp - 0x20]
mov dword [ebp + 8], 0
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x403093
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
call ebx
jmp 0x403093
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [ebp - 4], 0
je 0x4030c8
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x4030c8
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x4030c8
push ecx
push eax
push dword [ebp - 0x10]
mov dword [ebp + 8], 0
call edi
test eax, eax
je 0x4030c8
lea eax, [ebp + 8]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret