Function at 0x140045070
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdi
push rbp
lea rbp, [rax - 0x48]
sub rsp, 0x140
movaps xmmword [rax - 0x18], xmm6
movaps xmmword [rax - 0x28], xmm7
movaps xmmword [rax - 0x38], xmm8
movaps xmmword [rax - 0x48], xmm9
mov rax, qword [0x140066040]
xor rax, rsp
mov qword [rbp - 8], rax
xor edi, edi
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.1400434d0
nop
lea r8, [rsp + 0x30]
lea rcx, [rsp + 0x70]
call fcn.14004a310
nop
mov r8d, 3
lea rdx, [0x14005a4a8]
mov rcx, rax
call fcn.140043430
movups xmm8, xmmword [rax]
movups xmmword [rbp - 0x28], xmm8
movups xmm6, xmmword [rax + 0x10]
movups xmmword [rbp - 0x18], xmm6
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], sendto
mov byte [rax], dil
mov rdx, qword [rbp - 0x78]
cmp rdx, 0xf
jbe 0x14004513d
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140045138
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140045138
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
movdqa xmm0, xmmword [0x14005b5a0]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x140045197
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004518a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004518a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
movdqa xmm0, xmmword [0x14005b5a0]
movdqu xmmword [rsp + 0x40], xmm0
mov byte [rsp + 0x30], 0
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
xor edx, edx
lea rcx, [rsp + 0x50]
call fcn.1400434d0
nop
lea r8, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.14004a310
nop
mov r8d, 3
lea rdx, [0x14005a4a8]
mov rcx, rax
call fcn.140043430
movups xmm9, xmmword [rax]
movups xmmword [rbp - 0x48], xmm9
movups xmm7, xmmword [rax + 0x10]
movups xmmword [rbp - 0x38], xmm7
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], sendto
mov byte [rax], 0
mov rdx, qword [rbp - 0x58]
cmp rdx, 0xf
jbe 0x14004523c
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140045237
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140045237
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
movdqa xmm0, xmmword [0x14005b5a0]
movdqu xmmword [rbp - 0x60], xmm0
mov byte [rbp - 0x70], 0
mov rdx, qword [rsp + 0x68]
cmp rdx, 0xf
jbe 0x140045295
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140045288
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140045288
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
movdqa xmm0, xmmword [0x14005b5a0]
movdqu xmmword [rsp + 0x60], xmm0
mov byte [rsp + 0x50], 0
lea rdx, [rbp - 0x28]
movq rcx, xmm8
psrldq xmm6, 8
movq rax, xmm6
cmp rax, 0xf
cmova rdx, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp byte [rdx + r8], 0
jne 0x1400452d6
lea rcx, [rsp + 0x30]
call fcn.1400416b0
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0xf
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x50]
mov r8d, dword [rsp + 0x40]
mov rcx, qword [0x140067a20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14004533f
lea rdx, str.Failed_to_write_to_serial_port_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400436b0
lea rdx, [0x140043890]
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]
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x14004537f
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004537a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004537a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
lea rdx, [rbp - 0x48]
movq rcx, xmm9
psrldq xmm7, 8
movq rax, xmm7
cmp rax, 0xf
cmova rdx, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
nop dword [rax + rax]
inc rbx
cmp byte [rdx + rbx], 0
jne 0x1400453b0
mov r8, rbx
lea rcx, [rsp + 0x30]
call fcn.1400416b0
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0xf
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rdi
lea r9, [rbp - 0x50]
mov r8d, dword [rsp + 0x40]
mov rcx, qword [0x140067a20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14004541b
lea rdx, str.Failed_to_write_to_serial_port_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400436b0
lea rdx, [0x140043890]
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]
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x14004545c
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140045456
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140045456
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
nop
mov rdx, qword [rbp - 0x30]
cmp rdx, 0xf
jbe 0x14004549b
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140045495
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140045495
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x1400454d9
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400454d4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400454d4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050060
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14004fcd0
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
movaps xmm8, xmmword [r11 - 0x30]
movaps xmm9, xmmword [r11 - 0x40]
mov rsp, r11
pop rbp
ret