Function at 0x180089c40
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push r12
push r15
sub rsp, 0x58
mov rax, qword [rcx + 0x180]
mov rbx, rcx
mov rcx, qword [rcx + 0x38]
mov rsi, r9
mov qword [rsp + 0x30], rax
add rcx, r9
movabs rax, 0xfffffffe0
mov r12, r8
mov r15, rdx
cmp rcx, rax
ja 0x180089ee3
cmp rcx, r9
jb 0x180089ee3
cmp dword [rbx + 0x174], 0
lea r8, [rbx + 0x60]
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r14
mov qword [rbx + 0x38], rcx
je 0x180089cc3
mov rdx, r8
lea rcx, [rbx + 0x40]
call fcn.18008af70
lea r8, [rbx + 0x60]
mov dword [rbx + 0x174], 0
movzx eax, byte [rbx + 0xd]
mov ebp, dword [rbx + 0x170]
movzx r14d, byte [rbx + 0xc]
shl r14d, 8
or r14d, eax
mov dword [rsp + 0x80], ebp
movzx eax, byte [rbx + 0xe]
shl r14d, 8
or r14d, eax
movzx eax, byte [rbx + 0xf]
shl r14d, 8
or r14d, eax
test ebp, ebp
je 0x180089d41
nop word [rax + rax]
test rsi, rsi
je 0x180089ebe
movzx edx, byte [r15]
dec rsi
mov ecx, ebp
inc r15
movzx eax, byte [rcx + rbx + 0x10]
xor al, dl
mov byte [r12], al
inc r12
xor byte [rcx + rbx + 0x40], dl
inc ebp
and ebp, 0xf
jne 0x180089d00
mov rdx, r8
lea rcx, [rbx + 0x40]
call fcn.18008af70
mov dword [rsp + 0x80], ebp
mov qword [rsp + 0x50], rdi
cmp rsi, 0xc00
jb 0x180089dfa
movabs rax, 0xaaaaaaaaaaaaaaab
mul rsi
mov rdi, rdx
shr rdi, 0xb
imul rax, rdi, 0xfffffffffffff400
add rsi, rax
mov qword [rsp + 0x98], rsi
mov rsi, qword [rsp + 0x30]
nop
mov r9d, 0xc00
lea rdx, [rbx + 0x60]
mov r8, r15
lea rcx, [rbx + 0x40]
call fcn.18008abc0
mov r9, rsi
mov qword [rsp + 0x20], rbx
mov r8d, 0xc0
mov rdx, r12
mov rcx, r15
call qword [rsp + 0xa0]
add r14d, 0xc0
add r12, 0xc00
mov eax, r14d
mov byte [rbx + 0xf], r14b
shr eax, 0x18
add r15, 0xc00
mov byte [rbx + 0xc], al
mov eax, r14d
shr eax, 0x10
mov byte [rbx + 0xd], al
mov eax, r14d
shr eax, 8
mov byte [rbx + 0xe], al
sub rdi, 1
jne 0x180089d80
mov rsi, qword [rsp + 0x98]
mov ebp, dword [rsp + 0x80]
mov r13, rsi
and r13, 0xfffffffffffffff0
je 0x180089e62
mov rdi, r13
lea rdx, [rbx + 0x60]
mov r9, r13
shr rdi, 4
mov r8, r15
lea rcx, [rbx + 0x40]
call fcn.18008abc0
mov r9, qword [rsp + 0x30]
mov r8, rdi
mov rdx, r12
mov qword [rsp + 0x20], rbx
mov rcx, r15
call qword [rsp + 0xa0]
add r14d, edi
add r12, r13
mov eax, r14d
mov byte [rbx + 0xf], r14b
shr eax, 0x18
add r15, r13
mov byte [rbx + 0xc], al
mov eax, r14d
shr eax, 0x10
mov byte [rbx + 0xd], al
mov eax, r14d
shr eax, 8
mov byte [rbx + 0xe], al
sub rsi, r13
mov rdi, qword [rsp + 0x50]
test rsi, rsi
je 0x180089ebe
mov r8, qword [rsp + 0x30]
lea rdx, [rbx + 0x10]
mov rcx, rbx
call qword [rbx + 0x178]
inc r14d
mov eax, r14d
mov byte [rbx + 0xf], r14b
shr eax, 0x18
mov byte [rbx + 0xc], al
mov eax, r14d
shr eax, 0x10
mov byte [rbx + 0xd], al
mov eax, r14d
shr eax, 8
mov byte [rbx + 0xe], al
mov edx, ebp
inc ebp
movzx ecx, byte [rdx + r15]
movzx eax, byte [rdx + rbx + 0x10]
xor byte [rdx + rbx + 0x40], cl
xor al, cl
mov byte [rdx + r12], al
sub rsi, 1
jne 0x180089ea0
mov r13, qword [rsp + 0x48]
xor eax, eax
mov r14, qword [rsp + 0x40]
mov dword [rbx + 0x170], ebp
mov rbp, qword [rsp + 0x88]
add rsp, 0x58
pop r15
pop r12
pop rsi
pop rbx
ret
mov eax, 0xffffffff
add rsp, 0x58
pop r15
pop r12
pop rsi
pop rbx
ret