Function at 0x180003ba0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x30
lea rdi, [rcx + 0x40]
xor r15d, r15d
movaps xmmword [rsp + 0x20], xmm6
mov ebx, r8d
mov rsi, rdx
mov r13, rcx
cmp qword [rdi + 8], r15
jne 0x180003bd4
mov eax, r15d
jmp 0x180003bda
mov eax, dword [rdi + 0x10]
sub eax, dword [rdi + 8]
lea edx, [rax + rbx]
mov rcx, rdi
call fcn.180001080
mov rcx, qword [rdi + 0x10]
mov r8, rbx
mov rdx, rsi
call fcn.180013610
add qword [rdi + 0x10], rbx
mov qword [rsp + 0x78], rbp
movsd xmm6, qword [0x18002c768]
cmp qword [rdi + 8], 0
je 0x180003edb
mov eax, dword [rdi + 0x10]
sub eax, dword [rdi + 8]
cmp eax, 0xe
jle 0x180003edb
mov r9, qword [r13 + 0x48]
mov r8, qword [r13 + 0x30]
lea r14, [r13 + 0x30]
mov qword [rsp + 0x88], r14
cmp r8, qword [r9 + 4]
jne 0x180003c4a
movzx r8d, word [r14 + 8]
cmp r8w, word [r9 + 0xc]
jne 0x180003c4a
mov ecx, r15d
jmp 0x180003c4f
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
jne 0x180003ec2
mov esi, dword [r9]
test esi, esi
je 0x180003edb
cmp eax, esi
jl 0x180003edb
call qword [sym.imp.WINMM.dll_timeGetTime]
lea rbx, [r13 + 0x60]
mov edx, 0x400
mov dword [r13 + 0x1c], eax
mov rax, qword [rbx + 8]
mov rcx, rbx
mov qword [rbx + 0x10], rax
call fcn.180001140
cmp qword [rbx + 8], 0
mov r15, qword [r13 + 0x48]
lea r12d, [rsi - 0xe]
jne 0x180003ca0
xor eax, eax
jmp 0x180003ca6
mov eax, dword [rbx + 0x10]
sub eax, dword [rbx + 8]
lea ecx, [rax + r12]
cmp ecx, dword [rbx + 0x18]
jb 0x180003d3d
pxor xmm0, xmm0
mov eax, ecx
cvtsi2sd xmm0, rax
mulsd xmm0, xmm6
call fcn.180024324
xor ecx, ecx
mov r8d, 0x1000
lea r9d, [rcx + 4]
cvttsd2si r14, xmm0
shl r14d, 0xa
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, qword [rbx + 8]
mov rbp, rax
test rdx, rdx
jne 0x180003cf5
xor ecx, ecx
jmp 0x180003cfa
mov ecx, dword [rbx + 0x10]
sub ecx, edx
mov r13d, ecx
mov r8d, ecx
mov rcx, rax
call fcn.180013610
mov rcx, qword [rbx + 8]
test rcx, rcx
je 0x180003d1f
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rax, [r13 + rbp]
mov r13, qword [rsp + 0x70]
mov dword [rbx + 0x18], r14d
mov r14, qword [rsp + 0x88]
mov qword [rbx + 0x10], rax
mov qword [rbx + 8], rbp
mov rcx, qword [rbx + 0x10]
lea rdx, [r15 + 0xe]
mov r8d, r12d
mov ebp, r12d
call fcn.180013610
xor r15d, r15d
mov r11d, r15d
mov r10d, r15d
mov r9d, r15d
test r12d, r12d
jle 0x180003daf
movzx ecx, byte [r14 + r9]
mov r8, qword [rbx + 0x10]
inc r9
mov eax, 0x20f30021
imul ecx
sar edx, 8
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 0xcccccccd
imul edx, edx, 0x7c5
sub ecx, edx
mul r11d
add cl, 0x36
xor byte [r8 + r10], cl
shr edx, 3
lea ecx, [rdx + rdx*4]
add ecx, ecx
cmp r11d, ecx
cmove r9, r15
inc r11d
inc r10
cmp r11d, r12d
jl 0x180003d61
add qword [rbx + 0x10], rbp
cmp qword [rbx + 8], r15
jne 0x180003dbe
mov r8d, r15d
jmp 0x180003dc6
mov r8d, dword [rbx + 0x10]
sub r8d, dword [rbx + 8]
mov rcx, qword [r13 + 0x28]
mov rdx, qword [r13 + 0x68]
mov rax, qword [rcx]
call qword [rax]
mov edx, dword [rdi + 0x18]
cmp esi, edx
ja 0x180003c05
mov rax, qword [rdi + 8]
test rax, rax
jne 0x180003dec
mov ecx, r15d
jmp 0x180003df1
mov ecx, dword [rdi + 0x10]
sub ecx, eax
cmp esi, ecx
jbe 0x180003dff
test rax, rax
je 0x180003e23
mov esi, dword [rdi + 0x10]
sub esi, eax
test esi, esi
je 0x180003e1a
sub edx, esi
mov ebx, esi
mov rcx, rax
mov r8d, edx
lea rdx, [rax + rbx]
call fcn.180013610
sub qword [rdi + 0x10], rbx
mov rax, qword [rdi + 8]
test rax, rax
jne 0x180003e28
mov ecx, r15d
jmp 0x180003e2d
mov ecx, dword [rdi + 0x10]
sub ecx, eax
test rax, rax
je 0x180003e40
mov eax, dword [rdi + 0x10]
sub eax, dword [rdi + 8]
cmp ecx, eax
jb 0x180003c05
pxor xmm0, xmm0
mov eax, ecx
cvtsi2sd xmm0, rax
mulsd xmm0, xmm6
call fcn.180024324
cvttsd2si rsi, xmm0
shl esi, 0xa
cmp esi, dword [rdi + 0x18]
jb 0x180003c05
xor ecx, ecx
mov edx, esi
mov r8d, 0x1000
lea r9d, [rcx + 4]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdx, qword [rdi + 8]
mov rbp, rax
test rdx, rdx
jne 0x180003e8a
mov ecx, r15d
jmp 0x180003e8f
mov ecx, dword [rdi + 0x10]
sub ecx, edx
mov ebx, ecx
mov r8d, ecx
mov rcx, rax
call fcn.180013610
mov rcx, qword [rdi + 8]
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rax, [rbx + rbp]
mov qword [rdi + 8], rbp
mov qword [rdi + 0x10], rax
mov dword [rdi + 0x18], esi
jmp 0x180003c05
mov rax, qword [rdi + 8]
mov edx, 0x400
mov rcx, rdi
mov qword [rdi + 0x10], rax
call fcn.180001140
xor al, al
jmp 0x180003edd
mov al, 1
mov rbp, qword [rsp + 0x78]
movaps xmm6, xmmword [rsp + 0x20]
add rsp, 0x30
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret