Function at 0x140047220
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 [0x14006a040]
xor rax, rsp
mov qword [rbp - 8], rax
xor edi, edi
mov edx, 1
lea rcx, [rsp + 0x30]
call fcn.140044420
nop
lea r8, [rsp + 0x30]
lea rcx, [rsp + 0x70]
call fcn.14004cbb0
nop
mov r8d, 3
lea rdx, [0x14005d764]
mov rcx, rax
call fcn.140044380
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 0x1400472ed
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400472e8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400472e8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
movdqa xmm0, xmmword [0x14005e930]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
mov rdx, qword [rsp + 0x48]
cmp rdx, 0xf
jbe 0x140047347
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004733a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004733a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
movdqa xmm0, xmmword [0x14005e930]
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.140044420
nop
lea r8, [rsp + 0x50]
lea rcx, [rbp - 0x70]
call fcn.14004cbb0
nop
mov r8d, 3
lea rdx, [0x14005d764]
mov rcx, rax
call fcn.140044380
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 0x1400473ec
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400473e7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400473e7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
movdqa xmm0, xmmword [0x14005e930]
movdqu xmmword [rbp - 0x60], xmm0
mov byte [rbp - 0x70], 0
mov rdx, qword [rsp + 0x68]
cmp rdx, 0xf
jbe 0x140047445
inc rdx
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140047438
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140047438
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
movdqa xmm0, xmmword [0x14005e930]
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 0x140047486
lea rcx, [rsp + 0x30]
call fcn.1400425e0
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 [0x14006bab8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400474ef
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.140044600
lea rdx, [0x1400447e0]
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 0x14004752f
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004752a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14004752a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
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 0x140047560
mov r8, rbx
lea rcx, [rsp + 0x30]
call fcn.1400425e0
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 [0x14006bab8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400475cb
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.140044600
lea rdx, [0x1400447e0]
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 0x14004760c
inc rdx
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140047606
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140047606
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
nop
mov rdx, qword [rbp - 0x30]
cmp rdx, 0xf
jbe 0x14004764b
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140047645
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140047645
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 0xf
jbe 0x140047689
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140047684
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140047684
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140052ac0
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.140052730
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