Function at 0x40143f
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
push esp
pop ebp
sub esp, 0x828
push ebx
push esi
push edi
sub eax, eax
mov word [ebp - 0x828], ax
push 0x400
xor edi, edi
lea eax, [ebp - 0x828]
push eax
push edi
pop ebx
push edi
pop esi
push edi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x828]
push edi
push 0x8000000
push 3
push edi
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
pop edi
cmp edi, 0xffffffff
je 0x4014e0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
pop ebx
mov ecx, ebx
mov dword [ebp - 0x14], eax
call fcn.00401720
push eax
pop esi
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
push esi
push edi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4014c8
cmp dword [ebp - 0x20], ebx
je 0x4014d9
push esi
pop ecx
call fcn.00401790
xor esi, esi
sub ebx, ebx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, esi
call fcn.00401271
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00401213
mov edi, dword [ebp - 0xc]
push 0x40
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 0x18], eax
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x1c], eax
add eax, 0x18
push 0x3000
add eax, ebx
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push eax
pop ebx
mov dword [ebp - 8], ebx
or ebx, ebx
je 0x401650
push 0x40
push edi
pop edx
push ebx
pop ecx
call fcn.00401730
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebx + 0x3c]
movzx eax, word [esi + 0x14]
add ecx, ebx
push eax
mov edx, esi
mov dword [ebp - 4], ecx
call fcn.00401730
movzx ecx, word [esi + 0x14]
mov edx, dword [ebp - 4]
movzx edi, word [esi + 6]
lea eax, [esi + 0x18]
add ecx, eax
movzx eax, word [edx + 0x14]
lea esi, [edx + 0x18]
add esi, eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edi
test edi, edi
je 0x4015b9
push ecx
pop ebx
sub ebx, esi
push 0x28
lea edx, [ebx + esi]
mov ecx, esi
call fcn.00401730
add esi, 0x28
dec edi
jne 0x40157f
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x28]
or edi, edi
je 0x4015b9
lea esi, [ecx + 0x14]
mov edx, dword [esi]
mov ecx, dword [esi - 8]
push dword [esi - 4]
add edx, dword [ebp - 0xc]
add ecx, ebx
call fcn.00401730
lea esi, [esi + 0x28]
dec edi
jne 0x4015a1
mov eax, dword [ebp - 4]
add eax, 0x18
push eax
mov edx, ebx
mov ecx, ebx
call fcn.0040167e
add ebx, dword [ebp - 0x1c]
push str.KERNEL32
push ebx
pop edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x402048
push eax
mov dword [edi], eax
call esi
mov dword [edi + 0xc], eax
push str.LoadLibraryA
push dword [edi]
call esi
mov dword [edi + 8], eax
push str.OutputDebugStringW
push dword [edi]
call esi
mov esi, dword [ebp - 0x10]
mov dword [edi + 4], eax
lea eax, [ebx + 0x18]
sub eax, edi
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x14]
push eax
mov edx, esi
lea ecx, [ebx + 0x18]
mov dword [edi + 0x14], eax
jmp 0x4792b4
push edi
pop ecx
call fcn.00401790
mov ecx, esi
jmp section..htext