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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, 1
push 0x402128
mov dword [ebp - 0xc], 0
call fcn.00401010
push str.__________________________n
call fcn.00401010
push str._Shelll_v1.0.0_n
call fcn.00401010
push str.__________________________n
call fcn.00401010
push 0x402128
call fcn.00401010
add esp, 0x14
cmp dword [ebp + 8], 2
jge 0x40112f
push str.USAGE_MODE:_n
call fcn.00401010
push str.ShellLoad.exe_path_n
call fcn.00401010
push str.ShellLoad.exe_path_method_n
call fcn.00401010
push 0x402128
call fcn.00401010
push str.METHODS:_n
call fcn.00401010
push str.1__Inline_ASM__default__n
call fcn.00401010
push str.2__C_Function_n
call fcn.00401010
push str.3__CallWindowProc_n_n
call fcn.00401010
push str.EXAMPLE__default_method_:_ShellLoad.exe__C:_shellcode.file___n
call fcn.00401010
push str.EXAMPLE__select_method_:_ShellLoad.exe__C:_shellcode.file__1_n
call fcn.00401010
push str._________________________n
call fcn.00401010
push str._n____ERROR:_No_parameter_passed._Path_to_shellcode_is_required._n_n
call fcn.00401010
add esp, 0x30
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004012b8
mov esp, ebp
pop ebp
ret
jle 0x40113f
push dword [edi + 8]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
add esp, 4
mov esi, eax
push dword [edi + 4]
push str.___Opening_file:__s_n
call fcn.00401010
add esp, 8
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x401198
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____ERROR:_Unable_to_open_file._Error__i_n
call fcn.00401010
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004012b8
mov esp, ebp
pop ebp
ret
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x10], edi
cmp edi, 0xffffffff
jne 0x4011d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____ERROR:_GetFileSize_error__i_n
call fcn.00401010
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004012b8
mov esp, ebp
pop ebp
ret
push edi
push str.___File_Size:__i_bytes_n
call fcn.00401010
push str.___Allocating_memory_buffer..._n
call fcn.00401010
add esp, 0xc
push 0x40
push 0x1000
push edi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
jne 0x401218
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____ERROR:_VirtualAlloc_error__i_n
jmp 0x4011b7
push str.___Reading_file..._n
call fcn.00401010
add esp, 4
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push 0
push eax
push dword [ebp - 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esi, 1
je 0x401284
sub esi, 1
je 0x401270
sub esi, 1
jne 0x401297
push str.___Executing_shellcode__method:_CallWindowProc__n
call fcn.00401010
add esp, 4
push esi
push esi
push esi
push esi
push edi
call dword [sym.imp.USER32.dll_CallWindowProcA]
mov dword [ebp - 0xc], eax
jmp 0x401297
push str.___Executing_shellcode__method:_C_Function__n
call fcn.00401010
add esp, 4
call edi
mov dword [ebp - 0xc], eax
jmp 0x401297
push str.___Executing_shellcode__method:_Inline_ASM__n
call fcn.00401010
add esp, 4
call dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
push str.___Shellcode_executed__n
call fcn.00401010
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, dword [ebp - 0xc]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004012b8
mov esp, ebp
pop ebp
ret