Function at 0x140002400
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x108]
sub rsp, 0x1d0
movaps xmmword [rax - 0x48], xmm6
movaps xmmword [rax - 0x58], xmm7
movaps xmmword [rax - 0x68], xmm8
movaps xmmword [rax - 0x78], xmm9
mov rax, qword [0x1400f10c0]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov ebx, edx
xor r13d, r13d
test cl, cl
je 0x140002ba9
mov qword [rbp + 0x18], r13
lea rcx, [rbp + 0x18]
call fcn.140004c60
lea r10, [rbp + 0x75]
mov r8d, 1
nop word [rax + rax]
dec r10
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
add r8b, 0x30
mov byte [r10], r8b
mov r8d, edx
test edx, edx
jne 0x140002470
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x75]
mov rdx, r10
lea rcx, [rsp + 0x78]
call fcn.140005840
nop
mov r8, qword [rbp - 0x78]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
sub rax, r8
lea rdx, [0x1400d5cd0]
mov edi, 8
lea r14, str.km.left_
cmp rax, rdi
jb 0x14000254b
lea rax, [r8 + 8]
mov qword [rbp - 0x78], rax
lea rbx, [rsp + 0x78]
cmp rcx, 0xf
cmova rbx, qword [rsp + 0x78]
cmp rdx, rbx
jbe 0x14000250e
lea rax, [rbx + r8]
cmp r14, rax
ja 0x14000250e
cmp rbx, r14
ja 0x140002506
mov rsi, r13
jmp 0x140002511
mov rsi, rbx
sub rsi, r14
jmp 0x140002511
mov rsi, rdi
inc r8
lea rcx, [rbx + 8]
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
mov r8, rdi
sub r8, rsi
lea rdx, [r14 + 8]
add rdx, rsi
lea rcx, [rbx + rsi]
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rsp + 0x78]
jmp 0x14000256b
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r14
xor r9d, r9d
movzx r8d, byte [rsp + 0x30]
mov rdx, rdi
lea rcx, [rsp + 0x78]
call fcn.140005b30
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x38], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x48], xmm1
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rax + 0x10], r13
mov byte [rax], 0
mov r8d, 3
lea rdx, [0x1400d5cc0]
lea rcx, [rsp + 0x38]
call fcn.1400048b0
movups xmm9, xmmword [rax]
movups xmmword [rbp + 0x40], xmm9
movups xmm8, xmmword [rax + 0x10]
movups xmmword [rbp + 0x50], xmm8
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rax], 0
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x140002615
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002610
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002610
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rsp + 0x48], xmm0
mov byte [rsp + 0x38], 0
mov rdx, qword [rbp - 0x70]
cmp rdx, 0xf
jbe 0x140002667
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002662
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002662
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], 0
lea rcx, [rbp + 0x18]
call fcn.140001cc0
movabs rcx, 0x7fffffffff67697f
mov esi, 0xff
mov rbx, qword [rbp + 0x18]
cmp rbx, rcx
je 0x1400026af
mov eax, 1
cmovl eax, esi
test al, al
jns 0x1400026af
add rbx, 0x989680
jmp 0x1400026b9
movabs rbx, 0x7fffffffffffffff
movabs r15, 0x4e94914effff
movabs r12, 0x431bde82d7b634db
nop dword [rax]
lea rcx, [rbp + 0x18]
call fcn.140001cc0
mov rax, qword [rbp + 0x18]
cmp rbx, rax
je 0x140002731
mov ecx, 1
cmovl ecx, esi
test cl, cl
jle 0x140002731
mov rcx, rbx
sub rcx, rax
cmp rcx, r15
jg 0x140002725
mov rax, r12
imul rcx
sar rdx, 0x12
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul rax, rdx, 0xf4240
cmp rax, rcx
jge 0x14000271c
inc rdx
mov ecx, edx
call sub.KERNEL32.dll_Sleep
jmp 0x1400026d0
mov ecx, 0x5265c00
call sub.KERNEL32.dll_Sleep
jmp 0x1400026d0
lea r10, [rbp + 0x75]
mov r8d, r13d
nop dword [rax + rax]
dec r10
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
add r8b, 0x30
mov byte [r10], r8b
mov r8d, edx
test edx, edx
jne 0x140002740
lea r9, [rsp + 0x30]
lea r8, [rbp + 0x75]
mov rdx, r10
lea rcx, [rbp - 0x68]
call fcn.140005840
nop
mov r8, qword [rbp - 0x58]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
sub rax, r8
cmp rax, 8
jb 0x14000280c
lea rax, [r8 + 8]
mov qword [rbp - 0x58], rax
lea rbx, [rbp - 0x68]
cmp rcx, 0xf
cmova rbx, qword [rbp - 0x68]
lea rax, [0x1400d5cd0]
cmp rax, rbx
jbe 0x1400027d0
lea rax, [rbx + r8]
cmp r14, rax
ja 0x1400027d0
cmp rbx, r14
ja 0x1400027c8
mov rsi, r13
jmp 0x1400027d3
mov rsi, rbx
sub rsi, r14
jmp 0x1400027d3
mov rsi, rdi
inc r8
lea rcx, [rbx + 8]
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, rsi
mov rdx, r14
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
sub rdi, rsi
lea rdx, [rsi + 8]
add rdx, r14
lea rcx, [rbx + rsi]
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rbp - 0x68]
jmp 0x14000282b
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r14
xor r9d, r9d
movzx r8d, byte [rsp + 0x30]
mov rdx, rdi
lea rcx, [rbp - 0x68]
call fcn.140005b30
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x58], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x68], xmm1
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rax + 0x10], r13
mov byte [rax], 0
mov r8d, 3
lea rdx, [0x1400d5cc0]
lea rcx, [rsp + 0x58]
call fcn.1400048b0
movups xmm7, xmmword [rax]
movups xmmword [rbp + 0x20], xmm7
movups xmm6, xmmword [rax + 0x10]
movups xmmword [rbp + 0x30], xmm6
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rax], 0
mov rdx, qword [rsp + 0x70]
cmp rdx, 0xf
jbe 0x1400028d1
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400028cc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400028cc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rsp + 0x68], xmm0
mov byte [rsp + 0x58], 0
mov rdx, qword [rbp - 0x50]
cmp rdx, 0xf
jbe 0x140002922
inc rdx
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000291d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000291d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rbp - 0x58], xmm0
mov byte [rbp - 0x68], 0
lea rdx, [rbp + 0x40]
movq rcx, xmm9
psrldq xmm8, 8
movq rax, xmm8
cmp rax, 0xf
cmova rdx, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
mov rbx, 0xffffffffffffffff
mov r8, rbx
nop word [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x140002970
lea rcx, [rsp + 0x38]
call fcn.140001f00
nop
lea rdx, [rsp + 0x38]
cmp qword [rsp + 0x50], 0xf
cmova rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x18]
mov r8d, dword [rsp + 0x48]
mov rcx, qword [0x1400f3048]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400029d9
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.140004a40
lea rdx, [0x140004c10]
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 + 0x50]
cmp rdx, 0xf
jbe 0x140002a19
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002a14
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002a14
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
lea rdx, [rbp + 0x20]
movq rcx, xmm7
psrldq xmm6, 8
movq rax, xmm6
cmp rax, 0xf
cmova rdx, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
inc rbx
cmp byte [rdx + rbx], 0
jne 0x140002a45
mov r8, rbx
lea rcx, [rsp + 0x38]
call fcn.140001f00
nop
lea rdx, [rsp + 0x38]
cmp qword [rsp + 0x50], 0xf
cmova rdx, qword [rsp + 0x38]
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x18]
mov r8d, dword [rsp + 0x48]
mov rcx, qword [0x1400f3048]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140002ab0
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.140004a40
lea rdx, [0x140004c10]
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 + 0x50]
cmp rdx, 0xf
jbe 0x140002af1
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002aeb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002aeb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
nop
mov rdx, qword [rbp + 0x38]
cmp rdx, 0xf
jbe 0x140002b30
inc rdx
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002b2a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002b2a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
nop
mov rdx, qword [rbp + 0x58]
cmp rdx, 0xf
jbe 0x140002b6b
inc rdx
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002b66
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002fca
call fcn.1400c2600
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.1400c20c0
lea r11, [rsp + 0x1d0]
mov rbx, qword [r11 + 0x40]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
movaps xmm8, xmmword [r11 - 0x30]
movaps xmm9, xmmword [r11 - 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, r8d
lea rcx, [rbp - 8]
call fcn.140001bf0
mov r12, rax
mov edx, ebx
lea rcx, [rbp - 0x28]
call fcn.140001bf0
mov rsi, rax
mov r8, qword [rax + 0x10]
mov rdx, qword [rax + 0x18]
mov rcx, rdx
sub rcx, r8
cmp rcx, 8
jb 0x140002c59
lea rax, [r8 + 8]
mov qword [rsi + 0x10], rax
mov rbx, rsi
cmp rdx, 0xf
jbe 0x140002bee
mov rbx, qword [rsi]
lea rax, [0x1400d5ce0]
mov edi, 8
lea r15, str.km.move_
cmp rax, rbx
jbe 0x140002c21
lea rax, [rbx + r8]
cmp r15, rax
ja 0x140002c21
cmp rbx, r15
ja 0x140002c19
mov r14, r13
jmp 0x140002c24
mov r14, rbx
sub r14, r15
jmp 0x140002c24
mov r14, rdi
inc r8
lea rcx, [rbx + 8]
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, r14
mov rdx, r15
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
sub rdi, r14
lea rdx, [r15 + 8]
add rdx, r14
lea rcx, [rbx + r14]
mov r8, rdi
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140002c85
mov edi, 8
mov qword [rsp + 0x28], rdi
lea r15, str.km.move_
mov qword [rsp + 0x20], r15
xor r9d, r9d
movzx r8d, byte [rsp + 0x30]
mov edx, edi
mov rcx, rsi
call fcn.140005b30
mov rsi, rax
xorps xmm0, xmm0
movups xmmword [rbp + 0x60], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x70], xmm1
movups xmm0, xmmword [rsi]
movups xmmword [rbp + 0x60], xmm0
movups xmm1, xmmword [rsi + 0x10]
movups xmmword [rbp + 0x70], xmm1
mov qword [rsi + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rsi + 0x10], r13
mov byte [rsi], 0
mov r8d, 1
lea rdx, [0x1400d5cd4]
lea rcx, [rbp + 0x60]
call fcn.1400048b0
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x50], xmm1
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rax + 0x10], r13
mov byte [rax], 0
mov r9, r12
lea r8, [rbp + 0x40]
movzx edx, byte [rsp + 0x30]
lea rcx, [rbp - 0x48]
call fcn.1400053e0
nop
mov r8d, 3
lea rdx, [0x1400d5cc0]
lea rcx, [rbp - 0x48]
call fcn.1400048b0
movups xmm7, xmmword [rax]
movups xmmword [rbp + 0x20], xmm7
movups xmm6, xmmword [rax + 0x10]
movups xmmword [rbp + 0x30], xmm6
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rax], 0
mov rdx, qword [rbp - 0x30]
cmp rdx, 0xf
jbe 0x140002d6e
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002d69
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002d69
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rbp - 0x38], xmm0
mov byte [rbp - 0x48], 0
mov rdx, qword [rbp + 0x58]
cmp rdx, 0xf
jbe 0x140002dbe
inc rdx
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002db8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002db8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
nop
mov rdx, qword [rbp + 0x78]
cmp rdx, 0xf
jbe 0x140002dfc
inc rdx
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002df7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002df7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rbp + 0x70], xmm0
mov byte [rbp + 0x60], 0
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x140002e4b
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002e46
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002e46
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rbp - 0x18], xmm0
mov byte [rbp - 0x28], 0
mov rdx, qword [rbp + 0x10]
cmp rdx, 0xf
jbe 0x140002e9a
inc rdx
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002e95
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002e95
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
movdqa xmm0, xmmword [0x1400dd1c0]
movdqu xmmword [rbp + 8], xmm0
mov byte [rbp - 8], 0
lea rdx, [rbp + 0x20]
movq rcx, xmm7
psrldq xmm6, 8
movq rax, xmm6
cmp rax, 0xf
cmova rdx, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
mov rbx, 0xffffffffffffffff
nop
inc rbx
cmp byte [rdx + rbx], 0
jne 0x140002ee0
mov r8, rbx
lea rcx, [rsp + 0x58]
call fcn.140001f00
nop
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0xf
cmova rdx, qword [rsp + 0x58]
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x18]
mov r8d, dword [rsp + 0x68]
mov rcx, qword [0x1400f3048]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140002f4b
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.140004a40
lea rdx, [0x140004c10]
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 + 0x70]
cmp rdx, 0xf
jbe 0x140002f8c
inc rdx
mov rcx, qword [rsp + 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002f86
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002f86
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400c2600
nop
mov rdx, qword [rbp + 0x38]
cmp rdx, 0xf
jbe 0x140002b6b
inc rdx
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002b66
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002b66
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3