Function at 0x1400034c0
Capabilities:
Copy file

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, 0xb0
mov rax, qword [0x14000d040]
xor rax, rsp
mov qword [rbp + 0x2f], rax
xor r12d, r12d
lea rcx, [rbp + 0xf]
call fcn.140002b70
nop
mov rsi, qword [rbp + 0x1f]
movabs r13, 0x7fffffffffffffff
mov rax, r13
sub rax, rsi
cmp rax, 4
jb 0x140003946
lea r15, [rbp + 0xf]
cmp qword [rbp + 0x27], 0xf
cmova r15, qword [rbp + 0xf]
xorps xmm0, xmm0
movups xmmword [rbp - 0x51], xmm0
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x39], r12
lea r14, [rsi + 4]
mov ebx, send
lea rdi, [rbp - 0x51]
movabs rax, 0x8000000000000000
mov ecx, socket
cmp r14, rbx
jbe 0x1400035c6
mov rbx, r14
or rbx, 0xf
cmp rbx, r13
jbe 0x14000358d
mov rbx, r13
add rax, 0x27
mov rcx, rax
call fcn.140006d50
test rax, rax
je 0x1400038ad
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x1400035c2
cmp rbx, rcx
cmovb rbx, rcx
lea rcx, [rbx + 1]
test rcx, rcx
jne 0x1400035a2
mov rdi, r12
jmp 0x1400035c2
cmp rcx, 0x1000
jb 0x1400035ba
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x14000393a
jmp 0x14000356e
call fcn.140006d50
mov rdi, rax
mov qword [rbp - 0x51], rdi
mov qword [rbp - 0x41], r14
mov qword [rbp - 0x39], 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 - 0x11]
call fcn.140002700
nop
lea rdx, [rbp - 0x11]
cmp qword [rbp + 7], 7
cmova rdx, qword [rbp - 0x11]
mov rax, qword [rbp - 1]
lea rsi, [rdx + rax*2]
lea rbx, [rbp - 0x11]
cmova rbx, qword [rbp - 0x11]
xorps xmm0, xmm0
movups xmmword [rbp - 0x31], xmm0
mov qword [rbp - 0x21], r12
cmp rbx, rsi
jne 0x140003633
mov eax, send
mov qword [rbp - 0x19], rax
mov byte [rbp - 0x31], 0
jmp 0x140003730
sub rsi, rbx
sar rsi, 1
mov qword [rbp - 0x19], send
cmp rsi, r13
ja 0x140003934
mov edi, send
cmp rsi, rdi
jbe 0x1400036e9
mov rdi, rsi
or rdi, 0xf
cmp rdi, r13
jbe 0x14000369f
mov rdi, r13
movabs rax, 0x8000000000000000
add rax, 0x27
mov rcx, rax
call fcn.140006d50
mov rcx, rax
test rax, rax
je 0x14000380a
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x19], rdi
jmp 0x1400036ed
cmp rdi, 0x16
mov eax, socket
cmovb rdi, rax
lea rcx, [rdi + 1]
test rcx, rcx
jne 0x1400036c2
mov rax, r12
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x19], rdi
jmp 0x1400036ed
cmp rcx, 0x1000
jb 0x1400036da
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140003940
jmp 0x140003675
call fcn.140006d50
mov qword [rbp - 0x31], rax
mov qword [rbp - 0x19], rdi
jmp 0x1400036ed
mov rax, qword [rbp - 0x31]
lea r8, [rbp - 0x31]
cmp rdi, 0xf
cmova r8, rax
mov rcx, r8
mov rdx, rsi
test rsi, rsi
je 0x140003723
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 0x140003710
mov qword [rbp - 0x21], rsi
mov byte [r8 + rsi], 0
mov rax, qword [rbp - 0x19]
lea rdx, [rbp - 0x51]
cmp qword [rbp - 0x39], 0xf
cmova rdx, qword [rbp - 0x51]
lea rcx, [rbp - 0x31]
cmp rax, 0xf
cmova rcx, qword [rbp - 0x31]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x140003791
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.140005500
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]
lea rdx, [0x1400056e0]
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 0x1400037d8
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.140005500
lea rdx, [rbp - 0x51]
cmp qword [rbp - 0x39], 0xf
cmova rdx, qword [rbp - 0x51]
mov r8, qword [rbp - 0x41]
mov rcx, rax
call fcn.140005de0
lea rdx, [0x1400056e0]
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 - 0x51]
call fcn.140002ea0
nop
mov rdx, qword [rbp - 0x19]
cmp rdx, 0xf
jbe 0x140003816
inc rdx
mov rcx, qword [rbp - 0x31]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003811
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003811
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
mov qword [rbp - 0x21], r12
mov qword [rbp - 0x19], send
mov byte [rbp - 0x31], 0
mov rdx, qword [rbp + 7]
cmp rdx, 7
jbe 0x140003869
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x11]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003864
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003864
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
movdqa xmm0, xmmword [0x140009aa0]
movdqu xmmword [rbp - 1], xmm0
mov word [rbp - 0x11], r12w
mov rdx, qword [rbp - 0x39]
cmp rdx, 0xf
jbe 0x1400038b9
inc rdx
mov rcx, qword [rbp - 0x51]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400038b4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400038b4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
mov qword [rbp - 0x41], r12
mov qword [rbp - 0x39], send
mov byte [rbp - 0x51], 0
mov rdx, qword [rbp + 0x27]
cmp rdx, 0xf
jbe 0x140003907
inc rdx
mov rcx, qword [rbp + 0xf]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003902
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003902
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140006d94
mov rcx, qword [rbp + 0x2f]
xor rcx, rsp
call fcn.140006d30
lea r11, [rsp + 0xb0]
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.140002320
nop
call fcn.1400011c0
nop
call fcn.1400011c0
nop
call fcn.140002320
int3