Function at 0x140017930
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x3b0]
sub rsp, 0x4b0
mov rax, qword [0x1400bc040]
xor rax, rsp
mov qword [rbp + 0x3a0], rax
mov rsi, rdx
mov rdi, rcx
mov rbx, qword [0x1400e76a8]
movabs rax, 0x7fffffffffff
cmp qword [rbx], rax
jb 0x140017ca1
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
sub rax, qword [rbx + 0x78]
mov r14d, 1
cmp rax, 0x2710
jne 0x14001799a
xor cl, cl
jmp 0x1400179a3
mov ecx, 0xff
cmovge ecx, r14d
test cl, cl
jle 0x140017a63
lea r9, [rbx + 8]
movups xmm0, xmmword [r9]
movaps xmmword [rsp + 0x40], xmm0
movups xmm1, xmmword [r9 + 0x10]
movaps xmmword [rsp + 0x50], xmm1
movups xmm0, xmmword [r9 + 0x20]
movaps xmmword [rsp + 0x60], xmm0
movups xmm1, xmmword [r9 + 0x30]
movaps xmmword [rsp + 0x70], xmm1
mov edx, dword [rbx + 0x70]
bts edx, 0x1f
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x40
mov r8, qword [rbx]
mov rcx, qword [0x1400e76c0]
call qword [sym.imp.VMM.dll_VMMDLL_MemReadEx]
xor r8d, r8d
xor r9d, r9d
nop dword [rax]
mov ecx, r8d
and ecx, 3
add ecx, ecx
mov eax, r14d
shl eax, cl
mov ecx, r9d
shr rcx, 3
test byte [rcx + rbx + 8], al
je 0x140017a49
test byte [rsp + rcx + 0x40], al
jne 0x140017a49
mov edx, r8d
shr rdx, 3
movzx ecx, byte [rdx + rbx + 0x48]
mov eax, r8d
and eax, 7
bts ecx, eax
mov byte [rdx + rbx + 0x48], cl
inc r8d
add r9d, 2
cmp r9d, 0x200
jl 0x140017a10
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
mov qword [rbx + 0x78], rax
test byte [rbx + 9], 0x10
je 0x140017ca1
lea rcx, [rdi + 0x40]
lea rdx, [0x1400e7298]
call fcn.140021010
movsd xmm0, qword [rax]
movsd qword [rbp - 0x80], xmm0
mov r14d, dword [rax + 8]
movsd xmm0, qword [rdi + 0x78]
movsd qword [rbp - 0x70], xmm0
mov edi, dword [rdi + 0x80]
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
mov r8d, 4
lea rdx, [0x140096c54]
lea rcx, [rsp + 0x40]
call fcn.140030010
nop
lea rdx, [rsp + 0x40]
lea rcx, [rsi + 0x40]
call fcn.1400210e0
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0xf
jbe 0x140017b12
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140017b0d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140017b0d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008cc00
movss xmm4, dword [0x1400e2e4c]
movd xmm1, edi
mulss xmm1, xmm4
movss xmm0, dword [rbp - 0x6c]
mulss xmm0, xmm4
movd xmm3, r14d
addss xmm3, xmm1
movss xmm2, dword [rbp - 0x7c]
addss xmm2, xmm0
movss xmm1, dword [rbp - 0x70]
mulss xmm1, xmm4
addss xmm1, dword [rbp - 0x80]
lea rcx, [rbp - 0x70]
call fcn.1400165f0
movd xmm0, dword [0x1400e2e0c]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1400a65ec]
movss xmm1, dword [rbp - 0x6c]
subss xmm1, xmm0
movss xmm2, dword [0x1400e2e1c]
movaps xmm4, xmm2
mulss xmm4, xmm1
movd xmm0, dword [0x1400e2e18]
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [0x1400a65ec]
movss xmm1, dword [rbp - 0x70]
subss xmm1, xmm0
mulss xmm1, xmm2
cvttss2si edi, xmm1
cvttss2si ebx, xmm4
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp - 0x60]
call sub.VCRUNTIME140.dll_memset
mov r9d, ebx
mov r8d, edi
lea rdx, str.move__d__d__r_n
lea rcx, [rbp - 0x60]
call fcn.14002f6a0
xorps xmm0, xmm0
movups xmmword [rsp + 0x40], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x50], xmm1
lea rax, [rbp - 0x60]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x140017bf0
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x40]
call fcn.140030010
nop
lea rdx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0xf
cmova rdx, qword [rsp + 0x40]
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0x70]
mov r8d, dword [rsp + 0x50]
mov rcx, qword [0x1400e7070]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140017c61
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.14002e070
lea rdx, [0x14002e420]
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 + 0x58]
cmp rdx, 0xf
jbe 0x140017ca1
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140017c9c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140017c9c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008cc00
mov rcx, qword [rbp + 0x3a0]
xor rcx, rsp
call fcn.14008cbe0
lea r11, [rsp + 0x4b0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret