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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53e34b
mov eax, dword fs:[0]
push eax
sub esp, 0x118
mov eax, dword [0x59b0a0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0x124], eax
mov esi, ecx
test eax, eax
jne 0x406a31
push str.ERROR:_no_output_buffer_specified_n
call fcn.0052049c
add esp, 4
or eax, 0xffffffff
jmp 0x406c27
call fcn.0040844a
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x406a4d
push 0x80004005
call fcn.00401c40
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x118], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 4], 0
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406a80
sub ecx, edx
lea eax, [ebp - 0x114]
push ecx
push eax
lea ecx, [ebp - 0x118]
call fcn.00407c60
push str._run.data
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.00407790
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [ebp - 0x120]
mov ebx, eax
add edi, 0xfffffff0
or ecx, 0xffffffff
lea edx, [edi + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406af3
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
cmp ebx, 0xffffffff
jne 0x406b16
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esi + 0xc]
push str.Couldnt_open_shellcode_containing_file__s:__08x_n
call fcn.0052049c
add esp, 0xc
or edi, ebx
jmp 0x406bfe
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov dword [esi + 0x10], ecx
cmp ecx, 0xffffffff
jne 0x406b3e
push str.Couldnt_get_file_size_n
call fcn.0052049c
add esp, 4
or edi, 0xffffffff
jmp 0x406bfe
cmp dword [esi + 4], ecx
jbe 0x406b58
push str.Execution_offset_larger_than_file_size__n
call fcn.0052049c
add esp, 4
or edi, 0xffffffff
jmp 0x406bfe
mov eax, dword [esi + 8]
test eax, eax
je 0x406b67
add eax, 0xffff0000
mov dword [esi + 8], eax
push 0x40
push 0x3000
lea eax, [ecx + 0x10000]
push eax
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
jne 0x406b99
push dword [esi + 0x10]
push str.Couldnt_allocate__d_bytes_n
call fcn.0052049c
add esp, 8
or edi, 0xffffffff
jmp 0x406bfe
push 0
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x11c], 0
push eax
push dword [esi + 0x10]
lea eax, [edi + 0x10000]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x406bd3
push str.Couldnt_read_file_bytes_n
call fcn.0052049c
add esp, 4
or edi, 0xffffffff
jmp 0x406bfe
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x11c]
cmp ecx, eax
je 0x406bf4
push eax
push ecx
push str.Only_read__d_of__d_bytes__n
call fcn.0052049c
add esp, 0xc
or edi, 0xffffffff
jmp 0x406bfe
mov eax, dword [ebp - 0x124]
mov dword [eax], edi
xor edi, edi
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov esi, dword [ebp - 0x118]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x406c25
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051e66d
mov esp, ebp
pop ebp
ret