Function at 0x180041c70
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x90
mov rdi, qword [r9 + 8]
mov r12, r9
xor r9d, r9d
mov rsi, r8
mov r15, rdx
test rdi, rdi
je 0x180041caf
lock inc dword [rdi + 8]
mov rdi, qword [r12 + 8]
mov r13, qword [r12]
or r14d, 0xffffffff
test r13, r13
jne 0x180041ccd
call fcn.180034d4c
mov dword [r15], 6
jmp 0x180041edf
mov rdx, qword [r8 + 0x10]
cmp rdx, 0x7d
jbe 0x180041ce8
call fcn.180034d4c
mov dword [r15], 8
jmp 0x180041edf
mov bl, byte [rcx + 9]
lea r14, [r13 + 0x50]
test bl, bl
movzx eax, r9b
mov r8d, 0x80
mov byte [rbp + 0x7f], 0x8a
cmove eax, r8d
or al, dl
mov byte [rbp + 0x80], al
cmp rdx, qword [r14 + 0x10]
ja 0x180041d28
cmp qword [r14 + 0x18], 0x10
mov rax, r14
jb 0x180041d1e
mov rax, qword [r14]
mov qword [r14 + 0x10], rdx
mov byte [rax + rdx], r9b
jmp 0x180041d3b
sub rdx, qword [r14 + 0x10]
xor r8d, r8d
mov rcx, r14
call fcn.18002a1d4
mov rcx, qword [rbp + 0x67]
test bl, bl
jne 0x180041e1e
mov rcx, qword [rcx + 0x98]
call fcn.180021968
mov rdx, qword [rsi + 0x10]
lea rcx, [rbp - 0x41]
mov ebx, eax
xor eax, eax
mov qword [rbp - 0x41], rax
mov dword [rbp - 0x39], eax
call fcn.18002ecd0
movsxd rcx, eax
lea r8, [rbp - 0x41]
lea rdx, [rbp + 0x7f]
mov dword [rbp + rcx - 0x41], ebx
lea rcx, [rbp - 0x21]
call fcn.180041830
lea rcx, [r13 + 0x10]
mov rdx, rax
call fcn.180020e28
mov rdx, qword [rbp - 9]
cmp rdx, 0x10
jb 0x180041dc6
mov rcx, qword [rbp - 0x21]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180041dc1
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180041f6c
call fcn.180054638
cmp qword [r14 + 0x18], 0x10
mov dword [rbp - 0x49], ebx
jb 0x180041dd3
mov r14, qword [r14]
cmp qword [rsi + 0x18], 0x10
mov rcx, rsi
jb 0x180041de0
mov rcx, qword [rsi]
mov rax, qword [rsi + 0x10]
add rax, rcx
cmp qword [rsi + 0x18], 0x10
jb 0x180041df1
mov rsi, qword [rsi]
xor ebx, ebx
mov edx, ebx
cmp rsi, rax
je 0x180041ec4
sub r14, rsi
mov cl, byte [rbp + rdx - 0x49]
xor cl, byte [rsi]
inc rdx
mov byte [r14 + rsi], cl
and edx, 3
inc rsi
cmp rsi, rax
jne 0x180041e01
jmp 0x180041ec4
mov rdx, qword [rsi + 0x10]
lea rcx, [rbp - 0x31]
xor eax, eax
mov qword [rbp - 0x31], rax
mov dword [rbp - 0x29], eax
call fcn.18002ecd0
lea r8, [rbp - 0x31]
lea rdx, [rbp + 0x7f]
lea rcx, [rbp - 1]
call fcn.180041830
lea rcx, [r13 + 0x10]
mov rdx, rax
call fcn.180020e28
mov rdx, qword [rbp + 0x17]
cmp rdx, 0x10
jb 0x180041e8c
mov rcx, qword [rbp - 1]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180041e87
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180041f66
call fcn.180054638
cmp qword [r14 + 0x18], 0x10
jb 0x180041e96
mov r14, qword [r14]
cmp qword [rsi + 0x18], 0x10
mov rcx, rsi
jb 0x180041ea3
mov rcx, qword [rsi]
mov r8, qword [rsi + 0x10]
add r8, rcx
cmp qword [rsi + 0x18], 0x10
jb 0x180041eb4
mov rsi, qword [rsi]
sub r8, rsi
mov rdx, rsi
mov rcx, r14
call fcn.180056680
xor ebx, ebx
mov dword [r13 + 0x70], 0xa
lea rax, [0x1800c1050]
mov byte [r13 + 0x74], 1
or r14d, 0xffffffff
mov dword [r15], ebx
mov qword [r15 + 8], rax
test rdi, rdi
je 0x180041f13
mov eax, r14d
lock xadd dword [rdi + 8], eax
add eax, r14d
jne 0x180041f13
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, r14d
lock xadd dword [rdi + 0xc], eax
add eax, r14d
jne 0x180041f13
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [r12 + 8]
test rbx, rbx
je 0x180041f48
mov eax, r14d
lock xadd dword [rbx + 8], eax
add eax, r14d
jne 0x180041f48
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r14d
lock xadd dword [rbx + 0xc], eax
add eax, r14d
jne 0x180041f48
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [rsp + 0xd8]
mov rax, r15
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.18005affc
int3
call fcn.18005affc
int3