Function at 0x14005dfd0
Capabilities:
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov qword [rax + 8], rcx
push rbp
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x150
movaps xmmword [rax - 0x28], xmm6
movaps xmmword [rax - 0x38], xmm7
movaps xmmword [rax - 0x48], xmm8
movaps xmmword [rax - 0x58], xmm9
xor r15d, r15d
lea r9, [rbp - 0x3b]
mov r8d, 1
dec r9
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 [r9], r8b
mov r8d, edx
test edx, edx
jne 0x14005e012
lea r8, [rbp - 0x3b]
mov rdx, r9
lea rcx, [rsp + 0x50]
call fcn.14005ebc0
nop
mov r8, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
sub rax, r8
mov r14d, 8
lea rsi, [0x1401627f8]
cmp rax, r14
jb 0x14005e0ec
lea rax, [r8 + 8]
mov qword [rsp + 0x60], rax
lea rbx, [rsp + 0x50]
cmp rcx, 0xf
cmova rbx, qword [rsp + 0x50]
lea rax, [0x140162800]
cmp rax, rbx
jbe 0x14005e0af
lea rax, [rbx + r8]
cmp rsi, rax
ja 0x14005e0af
cmp rbx, rsi
ja 0x14005e0a7
mov rdi, r15
jmp 0x14005e0b2
mov rdi, rbx
sub rdi, rsi
jmp 0x14005e0b2
mov rdi, r14
lea rcx, [rbx + 8]
inc r8
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, rdi
mov rdx, rsi
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rbx + rdi]
mov r8, r14
sub r8, rdi
lea rdx, [rsi + 8]
add rdx, rdi
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rsp + 0x50]
jmp 0x14005e103
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rsi
mov rdx, r14
lea rcx, [rsp + 0x50]
call fcn.14005d360
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x30], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x40], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], send
mov byte [rax], 0
mov r8d, 3
lea rdx, [0x1401627f4]
lea rcx, [rsp + 0x30]
call fcn.140058080
movups xmm9, xmmword [rax]
movups xmmword [rbp - 0x18], xmm9
movups xmm8, xmmword [rax + 0x10]
movups xmmword [rbp - 8], xmm8
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], send
mov byte [rax], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x14005e1ad
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005e1a8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005e1a8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140111c68
movdqa xmm0, xmmword [0x140176050]
movdqu xmmword [rsp + 0x40], xmm0
mov byte [rsp + 0x30], 0
lea rcx, [rsp + 0x50]
call fcn.140057eb0
lea r9, [rbp - 0x3b]
mov r8d, r15d
dec r9
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 [r9], r8b
mov r8d, edx
test edx, edx
jne 0x14005e1d1
lea r8, [rbp - 0x3b]
mov rdx, r9
lea rcx, [rbp - 0x70]
call fcn.14005ebc0
nop
mov r8, qword [rbp - 0x60]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
sub rax, r8
lea rdi, str.km.left_
cmp rax, 8
jb 0x14005e29f
lea rax, [r8 + 8]
mov qword [rbp - 0x60], rax
lea rbx, [rbp - 0x70]
cmp rcx, 0xf
cmova rbx, qword [rbp - 0x70]
lea rax, [0x140162810]
cmp rax, rbx
jbe 0x14005e263
lea rax, [rbx + r8]
cmp rdi, rax
ja 0x14005e263
cmp rbx, rdi
ja 0x14005e25b
mov rsi, r15
jmp 0x14005e266
mov rsi, rbx
sub rsi, rdi
jmp 0x14005e266
mov rsi, r14
lea rcx, [rbx + 8]
inc r8
mov rdx, rbx
call sub.VCRUNTIME140.dll_memmove
mov r8, rsi
mov rdx, rdi
mov rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
lea rcx, [rbx + rsi]
sub r14, rsi
lea rdx, [rdi + 8]
add rdx, rsi
mov r8, r14
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rbp - 0x70]
jmp 0x14005e2b5
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rdi
mov rdx, r14
lea rcx, [rbp - 0x70]
call fcn.14005d360
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x80], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], send
mov byte [rax], 0
mov r8d, 3
lea rdx, [0x140162804]
lea rcx, [rsp + 0x70]
call fcn.140058080
movups xmm7, xmmword [rax]
movups xmmword [rbp - 0x38], xmm7
movups xmm6, xmmword [rax + 0x10]
movups xmmword [rbp - 0x28], xmm6
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], send
mov byte [rax], 0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0xf
jbe 0x14005e358
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005e353
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005e353
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140111c68
movdqa xmm0, xmmword [0x140176050]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
lea rcx, [rbp - 0x70]
call fcn.140057eb0
lea rdx, [rbp - 0x18]
movq rcx, xmm9
psrldq xmm8, 8
movq rax, xmm8
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
nop word [rax + rax]
inc r8
cmp byte [rdx + r8], 0
jne 0x14005e3b0
lea rcx, [rsp + 0x30]
call fcn.14005c1e0
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0xf
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x70]
mov r8d, dword [rsp + 0x40]
mov rcx, qword [0x14022d6a8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14005e419
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.14005e600
lea rdx, [0x14005e7d0]
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 0x14005e459
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005e454
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005e454
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140111c68
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp - 0x38]
movq rcx, xmm7
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
inc rbx
cmp byte [rdx + rbx], 0
jne 0x14005e490
mov r8, rbx
lea rcx, [rsp + 0x30]
call fcn.14005c1e0
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0xf
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], r15
lea r9, [rbp + 0x70]
mov r8d, dword [rsp + 0x40]
mov rcx, qword [0x14022d6a8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14005e4fb
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.14005e600
lea rdx, [0x14005e7d0]
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 0x14005e53b
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005e536
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005e536
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140111c68
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
mov rdx, qword [rbp - 0x20]
cmp rdx, 0xf
jbe 0x14005e586
inc rdx
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005e580
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005e580
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140111c68
nop
mov rdx, qword [rbp]
cmp rdx, 0xf
jbe 0x14005e5c4
inc rdx
mov rcx, qword [rbp - 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005e5bf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14005e5bf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140111c68
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
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 rbp
ret