Function at 0x1400a5720
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x80
mov rax, qword [0x140169040]
xor rax, rsp
mov qword [rsp + 0x78], rax
movzx edi, dl
mov rsi, rcx
nop word [rax + rax]
mov rcx, qword [rsi + 0x18]
lea rax, [rsi + 8]
mov rdx, qword [rsi + 0x20]
cmp rdx, 0xf
jbe 0x1400a5766
mov rax, qword [rsi + 8]
cmp rcx, 4
jne 0x1400a5778
cmp dword [rax], 0x6f725042
je 0x1400a5874
lea rax, [rsi + 8]
cmp rdx, 0xf
jbe 0x1400a5786
mov rax, qword [rsi + 8]
cmp rcx, 3
jne 0x1400a5945
cmp word [rax], 0x654e
jne 0x1400a5945
cmp byte [rax + 2], 0x74
jne 0x1400a5945
cmp qword [0x1401e0150], 0
jbe 0x1400a5945
inc dword [0x1401e0570]
mov dword [0x1401e0574], 0x9823ae8d
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov dword [0x1401e056c], eax
lea rdx, [rsi + 0x28]
mov ecx, dword [rdx]
mov eax, ecx
and eax, 0xfffffffe
or ecx, 1
test dil, dil
cmove ecx, eax
mov dword [rdx], ecx
test rdx, rdx
je 0x1400a5819
movups xmm0, xmmword [rdx]
movups xmmword [0x1401e0578], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [0x1401e0588], xmm1
movups xmm0, xmmword [rdx + 0x20]
movups xmmword [0x1401e0598], xmm0
movsd xmm1, qword [rdx + 0x30]
movsd qword [0x1401e05a8], xmm1
jmp 0x1400a584c
xorps xmm0, xmm0
xor eax, eax
movups xmmword [0x1401e0578], xmm0
movups xmmword [0x1401e0588], xmm0
movups xmmword [0x1401e0598], xmm0
mov qword [0x1401e05a8], rax
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [rax], socket
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo]
lea rcx, [0x1401e0140]
call fcn.1400a5240
test dil, dil
je 0x1400a5945
mov ecx, 0xa
call qword [sym.imp.KERNEL32.dll_Sleep]
xor dil, dil
jmp 0x1400a5750
xorps xmm0, xmm0
movups xmmword [rsp + 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x68], xmm1
mov r8d, recvfrom
lea rdx, str.km.click_0__r_n
lea rcx, [rsp + 0x58]
call fcn.1400224d0
nop
lea rdx, [rsp + 0x58]
cmp qword [rsp + 0x70], 0xf
cmova rdx, qword [rsp + 0x58]
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x40], xmm1
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], 0
jne 0x1400a58c6
lea rcx, [rsp + 0x30]
call fcn.1400224d0
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 0xf
cmova rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x40]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1400a5930
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.140037d30
lea rdx, [0x140037f00]
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
lea rcx, [rsp + 0x30]
call fcn.140022fc0
nop
lea rcx, [rsp + 0x58]
call fcn.140022fc0
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14011e4b0
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret