Function at 0x403400
Capabilities:
Allocate or change rwx memory
Check if file exists
Create thread
Get file attributes
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c750
mov eax, dword fs:[0]
push eax
sub esp, 0x3d8
push ebx
push esi
push edi
lea edi, [ebp - 0x264]
mov ecx, 0x96
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x41200c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, 0x4130f7
call fcn.00409670
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x48], 0
mov esi, esp
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp esi, esp
call fcn.00409640
cmp eax, 0xffffffff
jne 0x403499
push str.____File_doesnt_exist_n
call fcn.00407050
add esp, 4
xor eax, eax
jmp 0x403db1
push str.___Attempting_to_open_file_handle_n
call fcn.00407050
add esp, 4
push 0xb8
lea ecx, [ebp - 0x108]
call fcn.00405120
push 1
push 0x40
push 0x24
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x108]
call fcn.00402050
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x108]
mov ecx, dword [eax + 4]
lea ecx, [ebp + ecx - 0x108]
mov esi, esp
call dword [sym.imp.MSVCP140D.dll_public:_bool___thiscall_std::ios_base::fail_void_const]
cmp esi, esp
call fcn.00409640
movzx edx, al
test edx, edx
je 0x403557
mov eax, dword [ebp - 0x108]
mov ecx, dword [eax + 4]
lea ecx, [ebp + ecx - 0x108]
mov esi, esp
call dword [sym.imp.MSVCP140D.dll_public:_int___thiscall_std::ios_base::rdstate_void_const]
cmp esi, esp
call fcn.00409640
push eax
push str.____Opening_the_file_failed:___X__n
call fcn.00407050
add esp, 8
lea ecx, [ebp - 0x108]
call fcn.004053f0
mov dword [ebp - 0x324], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x324]
jmp 0x403db1
mov esi, esp
lea eax, [ebp - 0x128]
push eax
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP140D.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
cmp esi, esp
call fcn.00409640
lea ecx, [ebp - 0x128]
call fcn.00402c80
mov dword [ebp - 0x3e4], eax
mov dword [ebp - 0x3e0], edx
cmp dword [ebp - 0x3e0], 0
jg 0x4035e0
jl 0x4035a1
cmp dword [ebp - 0x3e4], 0x1000
jae 0x4035e0
push str.____Filesize_is_invalid._n
call fcn.00407050
add esp, 4
lea ecx, [ebp - 0x108]
call fcn.004053f0
mov dword [ebp - 0x330], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x330]
jmp 0x403db1
push str.___Allocating_memory_for_the_dll._n
call fcn.00407050
add esp, 4
lea ecx, [ebp - 0x128]
call fcn.00402c80
push eax
call fcn.00409480
add esp, 4
mov dword [ebp - 0x33c], eax
mov eax, dword [ebp - 0x33c]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x403655
push str.____Memory_Allocation_Failed_n
call fcn.00407050
add esp, 4
lea ecx, [ebp - 0x108]
call fcn.004053f0
mov dword [ebp - 0x348], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x348]
jmp 0x403db1
mov eax, dword [ebp - 0x18]
push eax
push str.___Memory_allocated_at_location:__0x_p___attempting_to_read_file_contents_into_memory_n
call fcn.00407050
add esp, 8
mov esi, esp
push 0
push 0
push 0
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP140D.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
cmp esi, esp
call fcn.00409640
lea ecx, [ebp - 0x128]
call fcn.00402c80
mov esi, esp
push edx
push eax
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x108]
call dword [sym.imp.MSVCP140D.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___long_long___int64__]
cmp esi, esp
call fcn.00409640
lea ecx, [ebp - 0x108]
call fcn.004053f0
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x403731
push str.____File_is_not_a_valid_PE_file_Magic_Bytes_do_not_equal__MZ__n
call fcn.00407050
add esp, 4
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x354], eax
mov ecx, dword [ebp - 0x354]
push ecx
call fcn.004094a0
add esp, 4
cmp dword [ebp - 0x354], 0
jne 0x4036fa
mov dword [ebp - 0x3e0], 0
jmp 0x40370a
mov dword [ebp - 0x18], 0x8123
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x3e0], edx
mov dword [ebp - 0x360], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x360]
jmp 0x403db1
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x24]
add eax, 0x18
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
add eax, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
movzx ecx, word [eax]
cmp ecx, 0x14c
je 0x4037d5
mov eax, dword [ebp - 0x3c]
movzx ecx, word [eax]
push ecx
push str.____Invalid_Platform_in_target_DLL:___x__n
call fcn.00407050
add esp, 8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x36c], eax
mov ecx, dword [ebp - 0x36c]
push ecx
call fcn.004094a0
add esp, 4
cmp dword [ebp - 0x36c], 0
jne 0x40379e
mov dword [ebp - 0x3e0], 0
jmp 0x4037ae
mov dword [ebp - 0x18], 0x8123
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x3e0], edx
mov dword [ebp - 0x378], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x378]
jmp 0x403db1
xor eax, eax
mov dword [ebp - 0x13c], eax
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x134], eax
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x13c], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x138], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x38]
add ecx, 0xc
push ecx
push str.___Allocating_memory_in_the_size_of:__0x_x__in_remote_process._n
call fcn.00407050
add esp, 8
mov esi, esp
push 0x40
push 0x3000
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x38]
add ecx, 0xc
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x4038ca
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00409640
push eax
push str.____Memory_Allocation_Failed__0x_X__n
call fcn.00407050
add esp, 8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x384], eax
mov ecx, dword [ebp - 0x384]
push ecx
call fcn.004094a0
add esp, 4
cmp dword [ebp - 0x384], 0
jne 0x403893
mov dword [ebp - 0x3e0], 0
jmp 0x4038a3
mov dword [ebp - 0x18], 0x8123
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x3e0], edx
mov dword [ebp - 0x390], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x390]
jmp 0x403db1
mov eax, dword [ebp - 0x48]
push eax
push str.___Memory_Allocation_successful._Memory_located_at:__0x_p__n
call fcn.00407050
add esp, 8
push str.___Writing_the_Headers_of_our_DLL_into_target_process_n
call fcn.00407050
add esp, 4
mov esi, esp
push 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x3c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x48]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00409640
test eax, eax
jne 0x403954
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00409640
push eax
push str.____Error_Mapping_the_Headers_into_memory_please_read_error_code:__0x_X__n
call fcn.00407050
add esp, 8
mov dword [ebp - 0x39c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x39c]
jmp 0x403db1
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp - 0x24]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x148], eax
push str.___Attempting_to_write_our_sections_into_the_remote_process_n
call fcn.00407050
add esp, 4
mov dword [ebp - 0x154], 0
jmp 0x40399f
mov eax, dword [ebp - 0x154]
add eax, 1
mov dword [ebp - 0x154], eax
mov ecx, dword [ebp - 0x148]
add ecx, 0x28
mov dword [ebp - 0x148], ecx
mov eax, dword [ebp - 0x3c]
movzx ecx, word [eax + 2]
cmp dword [ebp - 0x154], ecx
je 0x403ad7
mov eax, dword [ebp - 0x148]
cmp dword [eax + 0x10], 0
je 0x403ad2
push 0x40d824
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x48]
add ecx, dword [eax + 0xc]
push ecx
push str.__at_location:__0x
mov edx, dword [ebp - 0x148]
push edx
push str.___Attempting_to_write_section:__
push str._5s_s_s_p_s
call fcn.00407050
add esp, 0x18
mov esi, esp
push 0
mov eax, dword [ebp - 0x148]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x148]
mov eax, dword [ebp - 0x18]
add eax, dword [edx + 0x14]
push eax
mov ecx, dword [ebp - 0x148]
mov edx, dword [ebp - 0x48]
add edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00409640
test eax, eax
jne 0x403ad2
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00409640
push eax
push str.____Error_Mapping_the_sections_error_code__0x_X__n
call fcn.00407050
add esp, 8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x3a8], eax
mov ecx, dword [ebp - 0x3a8]
push ecx
call fcn.004094a0
add esp, 4
cmp dword [ebp - 0x3a8], 0
jne 0x403a7d
mov dword [ebp - 0x3e0], 0
jmp 0x403a8d
mov dword [ebp - 0x18], 0x8123
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x3e0], edx
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x48]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x3b4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x3b4]
jmp 0x403db1
jmp 0x403981
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x48]
add ecx, dword [eax + 0x38]
push ecx
push str.___Sections_written_into_memory._n__Attempting_to_write_our_mapping_data_at_end_of_image_location:__0x_p__n
call fcn.00407050
add esp, 8
mov esi, esp
push 0
push 0xc
lea eax, [ebp - 0x13c]
push eax
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x48]
add edx, dword [ecx + 0x38]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00409640
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x160], ecx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x3c0], eax
mov ecx, dword [ebp - 0x3c0]
push ecx
call fcn.004094a0
add esp, 4
cmp dword [ebp - 0x3c0], 0
jne 0x403b4f
mov dword [ebp - 0x3e0], 0
jmp 0x403b5f
mov dword [ebp - 0x18], 0x8123
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x3e0], edx
push str.___Attemtping_to_allocate_memory_in_the_remote_process_for_our_Loader_Stub._n
call fcn.00407050
add esp, 4
mov esi, esp
push 0x40
push 0x3000
push 0x1000
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x16c], eax
cmp dword [ebp - 0x16c], 0
jne 0x403bf9
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00409640
push eax
push str.____Loader_Memory_Allocation_Failed__0x_X__n
call fcn.00407050
add esp, 8
mov esi, esp
mov eax, dword [ebp - 0x16c]
push eax
call dword [sym.imp.ucrtbased.dll_free]
add esp, 4
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x3cc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x3cc]
jmp 0x403db1
mov eax, dword [ebp - 0x16c]
push eax
push str.___Allocation_successful._Loaderstub_memory_location:__0x_p__n___Attempting_to_Write_LoaderStub_n
call fcn.00407050
add esp, 8
mov esi, esp
push 0
push 0x1000
push 0x4030b0
mov eax, dword [ebp - 0x16c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00409640
push str.___Creating_Thread_in_remote_process_that_will_start_the_loading_routine_n
call fcn.00407050
add esp, 4
mov esi, esp
push 0
push 0
mov eax, dword [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x16c]
push ecx
push 0
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x178], eax
cmp dword [ebp - 0x178], 0
jne 0x403cfc
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00409640
push eax
push str.____Thread_Creation_failed_exiting:__0x_x_
call fcn.00407050
add esp, 8
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x16c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00409640
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x48]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 0x3d8], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
mov eax, dword [ebp - 0x3d8]
jmp 0x403db1
push str.___Checking_for_completion_of_the_loading_routine_n
push 0x40daa4
call fcn.00407050
add esp, 8
mov dword [ebp - 0x184], 0
cmp dword [ebp - 0x184], 0
jne 0x403d7c
xor eax, eax
mov dword [ebp - 0x198], eax
mov dword [ebp - 0x194], eax
mov dword [ebp - 0x190], eax
mov esi, esp
push 0
push 0xc
lea eax, [ebp - 0x198]
push eax
mov ecx, dword [ebp - 0x48]
add ecx, dword [ebp - 0x160]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
cmp esi, esp
call fcn.00409640
mov eax, dword [ebp - 0x190]
mov dword [ebp - 0x184], eax
mov esi, esp
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, esp
call fcn.00409640
jmp 0x403d18
push str.___Loading_routine_successfully_completed._Cleaning_up__n
call fcn.00407050
add esp, 4
mov esi, esp
mov eax, dword [ebp - 0x178]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00409640
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x108]
call fcn.00402e00
push edx
mov ecx, ebp
push eax
lea edx, [0x403dec]
call fcn.004095e0
pop eax
pop edx
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.004096b0
add esp, 0x3e4
cmp ebp, esp
call fcn.00409640
mov esp, ebp
pop ebp
ret