Function at 0x140002cf0
Capabilities:
Copy 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 - 0x37]
sub rsp, 0xc0
mov rax, qword [0x14000a040]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor r12d, r12d
lea rcx, [rbp - 1]
call fcn.140002a50
nop
mov rsi, qword [rbp + 0xf]
movabs r13, 0x7fffffffffffffff
mov rax, r13
sub rax, rsi
cmp rax, 4
jb 0x1400031f1
lea r15, [rbp - 1]
cmp qword [rbp + 0x17], 0xf
cmova r15, qword [rbp - 1]
xorps xmm0, xmm0
movups xmmword [rbp - 0x61], xmm0
mov qword [rbp - 0x51], r12
mov qword [rbp - 0x49], r12
lea r14, [rsi + 4]
mov ebx, send
lea rdi, [rbp - 0x61]
movabs rax, 0x8000000000000000
mov ecx, socket
cmp r14, rbx
jbe 0x140002df6
mov rbx, r14
or rbx, 0xf
cmp rbx, r13
jbe 0x140002dbd
mov rbx, r13
add rax, 0x27
mov rcx, rax
call fcn.140005210
test rax, rax
je 0x140003158
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140002df2
cmp rbx, rcx
cmovb rbx, rcx
lea rcx, [rbx + 1]
test rcx, rcx
jne 0x140002dd2
mov rdi, r12
jmp 0x140002df2
cmp rcx, 0x1000
jb 0x140002dea
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400031e5
jmp 0x140002d9e
call fcn.140005210
mov rdi, rax
mov qword [rbp - 0x61], rdi
mov qword [rbp - 0x51], r14
mov qword [rbp - 0x49], rbx
mov r8, rsi
mov rdx, r15
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov dword [rdi + rsi], 0x6578652e
mov byte [rdi + r14], 0
lea rcx, [rbp - 0x21]
call fcn.1400025e0
nop
lea rdx, [rbp - 0x21]
cmp qword [rbp - 9], 7
cmova rdx, qword [rbp - 0x21]
mov rax, qword [rbp - 0x11]
lea rsi, [rdx + rax*2]
lea rbx, [rbp - 0x21]
cmova rbx, qword [rbp - 0x21]
xorps xmm0, xmm0
movups xmmword [rbp - 0x41], xmm0
mov qword [rbp - 0x31], r12
cmp rbx, rsi
jne 0x140002e63
mov eax, send
mov qword [rbp - 0x29], rax
mov byte [rbp - 0x41], 0
jmp 0x140002f60
sub rsi, rbx
sar rsi, 1
mov qword [rbp - 0x29], send
cmp rsi, r13
ja 0x1400031df
mov edi, send
cmp rsi, rdi
jbe 0x140002f19
mov rdi, rsi
or rdi, 0xf
cmp rdi, r13
jbe 0x140002ecf
mov rdi, r13
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140005210
mov rcx, rax
test rax, rax
je 0x1400030b5
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x29], rdi
jmp 0x140002f1d
cmp rdi, 0x16
mov eax, socket
cmovb rdi, rax
lea rcx, [rdi + 1]
test rcx, rcx
jne 0x140002ef2
mov rax, r12
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x29], rdi
jmp 0x140002f1d
cmp rcx, 0x1000
jb 0x140002f0a
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400031eb
jmp 0x140002ea5
call fcn.140005210
mov qword [rbp - 0x41], rax
mov qword [rbp - 0x29], rdi
jmp 0x140002f1d
mov rax, qword [rbp - 0x41]
lea r8, [rbp - 0x41]
cmp rdi, 0xf
cmova r8, rax
mov rcx, r8
mov rdx, rsi
test rsi, rsi
je 0x140002f53
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rbx]
mov byte [rcx], al
lea rcx, [rcx + 1]
lea rbx, [rbx + 2]
sub rdx, 1
jne 0x140002f40
mov qword [rbp - 0x31], rsi
mov byte [r8 + rsi], 0
mov rax, qword [rbp - 0x29]
lea rdx, [rbp - 0x61]
cmp qword [rbp - 0x49], 0xf
cmova rdx, qword [rbp - 0x61]
lea rcx, [rbp - 0x41]
cmp rax, 0xf
cmova rcx, qword [rbp - 0x41]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140002fb1
lea rdx, str.Failed_to_duplicate_the_executable._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140003cd0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
jmp 0x140003024
lea rdx, str.Executable_successfully_duplicated_to:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140003cd0
lea rdx, [rbp - 0x61]
cmp qword [rbp - 0x49], 0xf
cmova rdx, qword [rbp - 0x61]
mov r8, qword [rbp - 0x51]
mov rcx, rax
call fcn.140004480
lea rdx, [0x140003eb0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rcx, [rbp - 0x61]
cmp qword [rbp - 0x49], 0xf
cmova rcx, qword [rbp - 0x61]
lea rdx, [0x1400076e4]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov rdi, rax
test rax, rax
jne 0x140003036
lea rdx, str.Failed_to_open_file_for_appending.
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140003cd0
lea rdx, [0x140003eb0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140003083
mov rbx, r12
nop dword [rax]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
and eax, 0x8000007f
jge 0x140003054
dec eax
or eax, 0xffffff80
inc eax
mov byte [rbp + rbx + 0x1f], al
inc rbx
cmp rbx, 9
jl 0x140003040
mov r9, rdi
mov edx, 1
mov r8d, send
lea rcx, [rbp + 0x1f]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
nop
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x1400030c1
inc rdx
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400030bc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400030bc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005254
mov qword [rbp - 0x31], r12
mov qword [rbp - 0x29], send
mov byte [rbp - 0x41], 0
mov rdx, qword [rbp - 9]
cmp rdx, 7
jbe 0x140003114
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000310f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000310f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005254
movdqa xmm0, xmmword [0x1400078a0]
movdqu xmmword [rbp - 0x11], xmm0
mov word [rbp - 0x21], r12w
mov rdx, qword [rbp - 0x49]
cmp rdx, 0xf
jbe 0x140003164
inc rdx
mov rcx, qword [rbp - 0x61]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000315f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000315f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005254
mov qword [rbp - 0x51], r12
mov qword [rbp - 0x49], send
mov byte [rbp - 0x61], 0
mov rdx, qword [rbp + 0x17]
cmp rdx, 0xf
jbe 0x1400031b2
inc rdx
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400031ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400031ad
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005254
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.1400051f0
lea r11, [rsp + 0xc0]
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
call fcn.1400022c0
nop
call fcn.140001160
nop
call fcn.140001160
nop
call fcn.1400022c0
int3