Function at 0x140044da0
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 - 0x80]
sub rsp, 0x180
mov rax, qword [0x140066040]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov edi, edx
mov ebx, ecx
xor esi, esi
mov dword [rsp + 0x68], esi
xor edx, edx
mov r8d, 0xf8
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memset
lea rax, [0x14005aa38]
mov qword [rsp + 0x70], rax
lea rax, [0x14005a970]
mov qword [rbp - 0x80], rax
lea rcx, [rbp + 8]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
mov dword [rsp + 0x68], 1
xor r8d, r8d
lea rdx, [rbp - 0x78]
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64____ptr64]
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea r14, vtable.std::basic_stringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rsp + rcx + 0x70], r14
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea r8d, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], r8d
lea rcx, [rbp - 0x78]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x10], rsi
mov dword [rbp - 8], esi
lea rdx, str.km.move_
lea rcx, [rbp - 0x80]
call fcn.1400436e0
mov edx, ebx
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___int____ptr64]
mov rcx, rax
lea rdx, [0x14005a4dc]
call fcn.1400436e0
mov edx, edi
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___int____ptr64]
mov rcx, rax
lea rdx, [0x14005a4a8]
call fcn.1400436e0
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
movdqa xmm1, xmmword [0x14005b600]
movdqu xmmword [rsp + 0x40], xmm1
mov byte [rsp + 0x30], sil
mov dword [rsp + 0x68], 5
movups xmmword [rsp + 0x50], xmm0
mov ecx, dword [rbp - 8]
mov eax, ecx
and al, 0x22
cmp al, 2
je 0x140044f00
mov rax, qword [rbp - 0x38]
mov r8, qword [rax]
test r8, r8
je 0x140044f00
mov rax, qword [rbp - 0x58]
mov rdx, qword [rax]
cmp r8, qword [rbp - 0x10]
cmovb r8, qword [rbp - 0x10]
sub r8, rdx
jmp 0x140044f31
test cl, 4
jne 0x140044f27
mov rax, qword [rbp - 0x40]
mov rcx, qword [rax]
test rcx, rcx
je 0x140044f27
mov rax, qword [rbp - 0x60]
mov rdx, qword [rax]
mov rax, qword [rbp - 0x28]
movsxd r8, dword [rax]
sub r8, rdx
add r8, rcx
jmp 0x140044f31
mov r8, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x140044f41
lea rcx, [rsp + 0x30]
call fcn.140043300
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0xf
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x68]
mov r8d, dword [rsp + 0x40]
mov rcx, qword [0x140067a20]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140044f96
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.1400436e0
lea rdx, [0x1400438c0]
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 0x140044fd7
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140044fd1
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140044fd1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140050630
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x70], r14
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0x98]
mov dword [rsp + rcx + 0x6c], edx
lea rcx, [rbp - 0x78]
call fcn.140043200
lea rcx, [rbp - 0x70]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.1400502a0
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret