Function at 0x42d160
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
mov rax, qword [rdx + 0x20]
cmp rax, qword [rdx + 0xc]
mov rsi, qword [rdx + 0x16]
mov r15, rcx
mov rbx, rdx
je 0x42d850
cmp rax, rsi
jne 0x42d630
movzx eax, word [rdx + 5]
mov word [rsi + 0x10], ax
movzx eax, byte [rbx + 0xb]
lea r13, str.default
mov qword [rsp + 0xb0], 2
movzx r9d, byte [rbx + 1]
lea rdi, [rsp + 0xb0]
mov qword [rsp + 0xb8], 0
movzx r8d, word [rbx + 5]
mov rcx, rdi
mov qword [rsp + 0xc0], 0
lea rdx, str.send_bin_frameNo_d_Afn_02X_Pn_d_Fn_d_con_d_r_n
mov qword [rsp + 0xc8], r13
mov r12, qword [0x00527378]
mov dword [rsp + 0x30], eax
movzx eax, byte [rbx + 4]
mov dword [rsp + 0x28], eax
movzx eax, word [rbx + 2]
mov dword [rsp + 0x20], eax
call r12
mov rbp, qword [rbx + 0x28]
xor r10d, r10d
mov word [rbp], r10w
movzx eax, byte [rbx + 7]
mov byte [rbp + 2], al
lea rax, [rsp + 0x78]
mov rcx, rax
mov qword [rsp + 0x48], rax
call qword [0x005272e0]
mov edx, 0xb
mov r14, qword [0x00527278]
lea rcx, str.dd_hh:mm:ss
call r14
lea rcx, [rsp + 0x80]
mov qword [rsp + 0xb0], rax
mov r8, rdi
mov rdx, qword [rsp + 0x48]
mov qword [rsp + 0x50], rcx
call qword [0x005273e0]
mov rcx, rdi
call fcn.00491270
lea rax, [rsp + 0x88]
mov rdx, qword [rsp + 0x50]
mov qword [rsp + 0x58], rax
mov rcx, rax
call qword [0x00527270]
mov rax, qword [rsp + 0x88]
mov edx, dword [rax]
cmp edx, 1
jbe 0x42d83a
movsx r8d, byte [rax + 0xb]
mov edx, dword [rax + 4]
mov rcx, qword [rsp + 0x58]
shr r8d, 0x1f
add edx, 1
call qword [0x005270d8]
mov rcx, qword [rsp + 0x88]
mov rdx, qword [rcx + 0x10]
lea rax, [rsp + 0x68]
add rcx, rdx
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
lea r8, [rsp + 0x74]
lea rdx, str._hhu__hhu:_hhu:_hhu
call fcn.0042c3b0
mov r8d, dword [rsp + 0x68]
mov ecx, 0x66666667
mov eax, r8d
imul ecx
mov eax, r8d
sar eax, 0x1f
sar edx, 2
sub edx, eax
mov eax, edx
lea edx, [rdx + rdx*4]
shl eax, 4
add edx, edx
sub r8d, edx
or r8d, eax
mov byte [rbp + 3], r8b
mov r8d, dword [rsp + 0x6c]
mov eax, r8d
imul ecx
mov eax, r8d
sar eax, 0x1f
sar edx, 2
sub edx, eax
mov eax, edx
lea edx, [rdx + rdx*4]
shl eax, 4
add edx, edx
sub r8d, edx
or r8d, eax
mov byte [rbp + 4], r8b
mov r8d, dword [rsp + 0x70]
mov eax, r8d
imul ecx
mov eax, r8d
sar eax, 0x1f
sar edx, 2
sub edx, eax
mov eax, edx
lea edx, [rdx + rdx*4]
shl eax, 4
add edx, edx
sub r8d, edx
or r8d, eax
mov byte [rbp + 5], r8b
mov r8d, dword [rsp + 0x74]
mov eax, r8d
imul ecx
mov eax, r8d
sar eax, 0x1f
sar edx, 2
sub edx, eax
mov eax, edx
lea edx, [rdx + rdx*4]
shl eax, 4
add edx, edx
sub r8d, edx
mov edx, 0xffffffff
or r8d, eax
mov byte [rbp + 6], r8b
movzx eax, byte [rbx + 9]
mov byte [rbp + 7], al
mov r10, qword [rbx + 0x28]
lea rax, [r10 + 8]
mov qword [rbx + 0x30], rax
sub rax, qword [rbx + 0x20]
sub eax, 6
test ax, ax
mov word [rsi + 1], ax
mov word [rsi + 3], ax
je 0x42d415
lea r8, [rsi + 6]
movzx eax, ax
sub eax, 1
lea r9, [rsi + rax + 7]
nop dword [rax]
movzx eax, byte [r8]
mov ecx, 8
xor edx, eax
nop dword [rax + rax]
movzx eax, dx
sar eax, 1
mov r11d, eax
xor r11w, 0xa001
and edx, 1
mov edx, r11d
cmove edx, eax
sub ecx, 1
jne 0x42d3f0
add r8, 1
cmp r9, r8
jne 0x42d3e0
mov byte [r10 + 0xa], 0x16
mov rax, qword [rbx + 0x28]
mov rcx, rdi
mov word [r10 + 8], dx
lea rdx, str.send_data
mov qword [rsp + 0xb0], 2
mov qword [rsp + 0xb8], 0
add rax, 0xb
mov qword [rsp + 0xc8], r13
mov qword [rbx + 0x30], rax
mov qword [rsp + 0xc0], 0
call r12
mov rax, qword [0x005270d0]
cmp word [rbx + 0x1e], 0
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rax
je 0x42d6f9
lea rax, [rsp + 0x98]
xor esi, esi
lea r13, [rsp + 0x90]
mov qword [rsp + 0x40], rax
jmp 0x42d59d
movsxd rcx, dword [rax + 4]
mov r8d, dword [rax + 8]
lea edx, [rcx + 2]
and r8d, 0x7fffffff
cmp edx, r8d
jbe 0x42d4d4
mov r8d, 1
mov rcx, rdi
call qword [0x00527248]
mov rax, qword [rsp + 0xb0]
movsxd rcx, dword [rax + 4]
lea edx, [rcx + 1]
mov dword [rax + 4], edx
add rax, qword [rax + 0x10]
mov edx, 0x20
lea rax, [rax + rcx*2]
xor ecx, ecx
mov word [rax], dx
mov rdx, rdi
mov word [rax + 2], cx
mov rcx, r13
call qword [0x00527298]
mov rcx, qword [rsp + 0xb0]
mov eax, dword [rcx]
test eax, eax
je 0x42d691
cmp eax, 0xffffffff
je 0x42d525
lock sub dword [rcx], 1
mov rcx, qword [rsp + 0xb0]
je 0x42d691
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx]
test eax, eax
je 0x42d6b4
cmp eax, 0xffffffff
je 0x42d54e
lock sub dword [rcx], 1
mov rcx, qword [rsp + 0xa8]
je 0x42d6b4
mov rcx, qword [rsp + 0xa0]
mov eax, dword [rcx]
test eax, eax
je 0x42d6d7
cmp eax, 0xffffffff
je 0x42d577
lock sub dword [rcx], 1
mov rcx, qword [rsp + 0xa0]
je 0x42d6d7
mov rax, qword [rbx + 0x20]
mov rcx, qword [rsp + 0x40]
movsx edx, byte [rax + rsi]
call qword [0x005270e8]
movzx edx, word [rbx + 0x1e]
lea eax, [rsi + 1]
add rsi, 1
cmp edx, eax
jle 0x42d710
lea rcx, [0x004a0d91]
mov edx, 2
call r14
mov qword [rsp + 0xa0], rax
mov rax, qword [rbx + 0x20]
mov r9d, 0x30
lea rbp, [rsp + 0xa8]
lea r12, [rsp + 0xa0]
mov rcx, rbp
mov rdx, r12
movzx r8d, byte [rax + rsi]
mov word [rsp + 0x28], r9w
mov r9d, 2
mov dword [rsp + 0x20], 0x10
call qword [0x005273a8]
mov rdx, qword [rsp + 0xa8]
mov qword [rsp + 0xb0], rdx
mov eax, dword [rdx]
add eax, 1
cmp eax, 1
ja 0x42d6f0
mov rax, qword [rsp + 0xb0]
mov edx, dword [rax]
cmp edx, 1
jbe 0x42d4a2
mov edx, dword [rax + 4]
add edx, 2
jmp 0x42d4b9
lea rax, str.default
mov qword [rsp + 0xb0], 2
mov qword [rsp + 0xc8], rax
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0xb8], 0
lea rdx, str.node__head_err_r_n
mov qword [rsp + 0xc0], 0
call qword [0x00527378]
mov eax, 1
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rsp + 0xa8]
mov eax, dword [rcx]
test eax, eax
jne 0x42d537
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
mov rcx, qword [rsp + 0xa0]
mov eax, dword [rcx]
test eax, eax
jne 0x42d560
mov r8d, 8
mov edx, 2
call qword [0x005270c8]
jmp 0x42d577
lock add dword [rdx], 1
jmp 0x42d611
lea rax, [rsp + 0x98]
lea r13, [rsp + 0x90]
mov qword [rsp + 0x40], rax
nop
mov rax, qword [r15 + 0x40]
mov edx, 7
mov rcx, rdi
mov rsi, qword [rax + 0x108]
call qword [0x00527478]
mov rdx, rdi
mov rcx, rsi
mov rsi, qword [0x00527c08]
call rsi
mov rcx, r15
call fcn.0042cc80
mov rax, qword [r15 + 0x40]
lea rbp, [rsp + 0xa8]
mov r8d, 0xd
lea rdx, [0x004a0d94]
mov rcx, rbp
mov r12, qword [rax + 0x108]
call qword [0x00527268]
mov rdx, r13
mov rcx, rbp
call qword [0x00527298]
lea r8, [0x004a0da2]
mov rdx, rbp
mov rcx, rdi
call fcn.00491630
mov rdx, rdi
mov rcx, r12
call qword [0x00527c30]
mov rcx, rdi
call fcn.00491270
mov rcx, rbp
call fcn.00491270
mov rax, qword [r15 + 0x40]
mov edx, 0x386487
mov rcx, rdi
mov rbp, qword [rax + 0x108]
call qword [0x00527480]
mov rdx, rdi
mov rcx, rbp
call rsi
mov rcx, qword [rsp + 0x98]
mov qword [rsp + 0xb0], rcx
call fcn.00491310
mov rdx, rdi
mov rcx, r15
call fcn.0042c940
mov rcx, rdi
call fcn.00453540
mov rcx, qword [rbx + 0x16]
test rcx, rcx
je 0x42d802
call fcn.004530b0
mov qword [rbx + 0x16], 0
mov rcx, qword [rsp + 0x40]
call fcn.00453540
mov rcx, r13
call fcn.00491270
mov rcx, qword [rsp + 0x58]
call fcn.00453540
mov rcx, qword [rsp + 0x50]
call fcn.00491270
mov rcx, qword [rsp + 0x48]
call qword [0x005272f8]
xor eax, eax
jmp 0x42d67d
mov rdx, qword [rax + 0x10]
mov rcx, rax
cmp rdx, 0x18
jne 0x42d2a2
jmp 0x42d2c8
mov byte [rsi], 0x68
lea r8, [rsp + 0x65]
mov byte [rsi + 5], 0x68
mov ecx, dword [rcx + 0x3a0]
mov dword [rsi + 6], ecx
movzx ecx, word [r15 + 0x3a4]
mov word [rsi + 0xa], cx
movzx edx, byte [r15 + 0x3a6]
mov byte [rsi + 0xd], 0x20
mov byte [rsi + 0xc], dl
movzx edx, byte [rsi + 0xe]
mov eax, edx
and edx, 0x3f
and eax, 0x7f
mov byte [rsi + 0xe], al
or eax, 0x40
cmp byte [rbx], 0
mov byte [rsi + 0xf], 1
cmovne eax, edx
movzx edx, byte [rsi + 0x13]
or eax, 0x20
mov byte [rsi + 0xe], al
movzx eax, word [rbx + 5]
or edx, 0xffffffe0
mov word [rsi + 0x10], ax
movzx eax, byte [rbx + 1]
mov byte [rsi + 0x13], dl
mov byte [rsi + 0x12], al
movzx eax, byte [rbx + 0xb]
and eax, 1
shl eax, 4
mov ecx, eax
mov eax, edx
and eax, 0xffffffef
or eax, ecx
movzx ecx, word [rbx + 2]
mov byte [rsi + 0x13], al
movzx edx, byte [rbx + 8]
and eax, 0xfffffff0
and edx, 0xf
or eax, edx
mov byte [rsi + 0x13], al
lea rdx, [rsp + 0x64]
call fcn.0040f1c0
movzx eax, byte [rsp + 0x64]
lea rdx, [rsp + 0x66]
lea r8, [rsp + 0x67]
mov byte [rsi + 0x14], al
movzx eax, byte [rsp + 0x65]
mov byte [rsi + 0x15], al
movzx ecx, byte [rbx + 4]
call fcn.0040f240
movzx eax, byte [rsp + 0x66]
mov byte [rsi + 0x16], al
movzx eax, byte [rsp + 0x67]
mov byte [rsi + 0x17], al
movzx eax, word [rbx + 0x14]
mov qword [rbx + 0x20], rsi
add eax, 0x18
movzx eax, ax
add rax, rsi
mov qword [rbx + 0x28], rax
jmp 0x42d19c