Function at 0x18004196c
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 0x1800419ab
lock inc dword [rdi + 8]
mov rdi, qword [r12 + 8]
mov r13, qword [r12]
or r14d, 0xffffffff
test r13, r13
jne 0x1800419c9
call fcn.180034d4c
mov dword [r15], 6
jmp 0x180041bdb
mov rdx, qword [r8 + 0x10]
cmp rdx, 0x7d
jbe 0x1800419e4
call fcn.180034d4c
mov dword [r15], 8
jmp 0x180041bdb
mov bl, byte [rcx + 9]
lea r14, [r13 + 0x50]
test bl, bl
movzx eax, r9b
mov r8d, 0x80
mov byte [rbp + 0x7f], 0x89
cmove eax, r8d
or al, dl
mov byte [rbp + 0x80], al
cmp rdx, qword [r14 + 0x10]
ja 0x180041a24
cmp qword [r14 + 0x18], 0x10
mov rax, r14
jb 0x180041a1a
mov rax, qword [r14]
mov qword [r14 + 0x10], rdx
mov byte [rax + rdx], r9b
jmp 0x180041a37
sub rdx, qword [r14 + 0x10]
xor r8d, r8d
mov rcx, r14
call fcn.18002a1d4
mov rcx, qword [rbp + 0x67]
test bl, bl
jne 0x180041b1a
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 0x180041ac2
mov rcx, qword [rbp - 0x21]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180041abd
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180041c68
call fcn.180054638
cmp qword [r14 + 0x18], 0x10
mov dword [rbp - 0x49], ebx
jb 0x180041acf
mov r14, qword [r14]
cmp qword [rsi + 0x18], 0x10
mov rcx, rsi
jb 0x180041adc
mov rcx, qword [rsi]
mov rax, qword [rsi + 0x10]
add rax, rcx
cmp qword [rsi + 0x18], 0x10
jb 0x180041aed
mov rsi, qword [rsi]
xor ebx, ebx
mov edx, ebx
cmp rsi, rax
je 0x180041bc0
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 0x180041afd
jmp 0x180041bc0
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 0x180041b88
mov rcx, qword [rbp - 1]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x180041b83
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x180041c62
call fcn.180054638
cmp qword [r14 + 0x18], 0x10
jb 0x180041b92
mov r14, qword [r14]
cmp qword [rsi + 0x18], 0x10
mov rcx, rsi
jb 0x180041b9f
mov rcx, qword [rsi]
mov r8, qword [rsi + 0x10]
add r8, rcx
cmp qword [rsi + 0x18], 0x10
jb 0x180041bb0
mov rsi, qword [rsi]
sub r8, rsi
mov rdx, rsi
mov rcx, r14
call fcn.180056680
xor ebx, ebx
mov dword [r13 + 0x70], 9
lea rax, [0x1800c1050]
mov byte [r13 + 0x74], 1
or r14d, 0xffffffff
mov dword [r15], ebx
mov qword [r15 + 8], rax
test rdi, rdi
je 0x180041c0f
mov eax, r14d
lock xadd dword [rdi + 8], eax
add eax, r14d
jne 0x180041c0f
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax]
mov eax, r14d
lock xadd dword [rdi + 0xc], eax
add eax, r14d
jne 0x180041c0f
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + reloc.WS2_32.dll_htonl]
mov rbx, qword [r12 + 8]
test rbx, rbx
je 0x180041c44
mov eax, r14d
lock xadd dword [rbx + 8], eax
add eax, r14d
jne 0x180041c44
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r14d
lock xadd dword [rbx + 0xc], eax
add eax, r14d
jne 0x180041c44
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