Function at 0x18000d090
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov qword [rbp + 0x50], rcx
mov rcx, qword [rcx + 0x108]
mov rbx, rdx
mov qword [rbp + 0x60], r8
movzx eax, word [rcx + 0x12]
mov dword [rbp + 0x68], r9d
mov dword [rbp - 0x20], eax
mov rsi, rax
mov rax, qword [rbp + 0x50]
mov r10, qword [rax]
test byte [r10 + 0xe0], 0x20
jne 0x18000d361
mov rax, qword [rbp + 0x50]
xor edx, edx
movzx r10d, word [rcx + 0xc]
mov eax, dword [rax + 0xf0]
div dword [rbp - 0x20]
imul eax, r10d
add rax, qword [rbx + 8]
mov dword [rbp - 0x10], edx
mov rbx, rax
lea rax, [rsi + rsi + 0xf]
and eax, 0x3fff0
call fcn.180001550
sub rsp, rax
lea rax, [rsp + 0x30]
mov qword [rbp - 0x18], rax
mov eax, dword [rbp + 0x68]
test eax, eax
je 0x18000d330
lea rax, [rsp + 0x34]
mov dword [rbp - 0xc], 0
mov qword [rbp - 0x38], rax
nop word [rax + rax]
mov eax, dword [rbp - 0x20]
mov r8d, dword [rbp + 0x68]
lea r11, [rbx + 7]
sub eax, dword [rbp - 0x10]
sub r8d, dword [rbp - 0xc]
mov qword [rbp - 0x28], r11
cmp eax, r8d
movsx r9d, word [rbx + 5]
mov rsi, qword [rbp - 0x18]
cmovbe r8d, eax
movzx ecx, word [rbx + 1]
movzx eax, byte [rbx]
mov dword [rbp - 0x1c], r8d
movsx r8d, word [rbx + 3]
mov word [rsi], r9w
mov word [rsi + 2], r8w
cmp r10d, 7
je 0x18000d358
lea rdi, [0x180021370]
lea rdx, [0x180021390]
mov esi, 0x10
mov r14d, dword [rdi + rax*4]
mov r13d, dword [rdx + rax*4]
lea eax, [r10 - 8]
lea r12, [0x1800213c0]
mov qword [rbp - 0x30], rax
lea rax, [rbx + rax + 8]
mov rbx, qword [rbp - 0x38]
mov edi, 0x7fff
mov qword [rbp - 8], rax
nop dword [rax]
movzx edx, byte [r11]
mov eax, r8d
movsx ecx, cx
mov r15d, 0xffff8000
shr dl, 4
test dl, 8
lea r10d, [rdx - 0x10]
cmove r10d, edx
imul eax, r14d
imul r9d, r13d
movsx r10d, r10b
add r9d, eax
lea eax, [r9 + 0xff]
cmovns eax, r9d
imul r10d, ecx
sar eax, 8
add eax, r10d
cmp eax, 0xffff8000
cmovl eax, r15d
cmp eax, 0x7fff
cmovg eax, edi
and edx, 0xf
imul ecx, dword [r12 + rdx*4]
mov word [rbx], ax
movzx r10d, byte [r11]
movsx r9d, ax
test ecx, ecx
lea edx, [rcx + 0xff]
mov r15d, r10d
cmovs ecx, edx
mov edx, r10d
sar ecx, 8
cmp cx, 0x10
cmovl ecx, esi
and edx, 0xf
add rbx, 4
or r15d, 0xfffffff0
test r10b, 8
cmove r15d, edx
imul r8d, r13d
movsx ecx, cx
imul eax, r14d
movsx r15d, r15b
add eax, r8d
lea edx, [rax + 0xff]
cmovns edx, eax
imul r15d, ecx
mov eax, edx
sar eax, 8
lea edx, [r15 + rax]
mov r15d, 0xffff8000
cmp edx, 0xffff8000
cmovl edx, r15d
cmp edx, 0x7fff
cmovg edx, edi
and r10d, 0xf
imul ecx, dword [r12 + r10*4]
mov word [rbx - 2], dx
movsx r8d, dx
test ecx, ecx
lea eax, [rcx + 0xff]
cmovs ecx, eax
sar ecx, 8
cmp cx, 0x10
cmovl ecx, esi
inc r11
cmp r11, qword [rbp - 8]
jne 0x18000d1c0
mov rax, qword [rbp - 0x28]
mov rsi, qword [rbp - 0x30]
lea rbx, [rax + rsi + 1]
mov edi, dword [rbp - 0x1c]
movsxd rax, dword [rbp - 0x10]
mov rsi, qword [rbp - 0x18]
mov rdx, qword [rbp + 0x60]
mov r8d, edi
lea rcx, [rsi + rax*2]
call qword [0x18001e0b0]
mov rsi, qword [rbp + 0x60]
mov eax, edi
add dword [rbp - 0xc], edi
lea rax, [rsi + rax*4]
mov qword [rbp + 0x60], rax
mov eax, dword [rbp - 0xc]
cmp dword [rbp + 0x68], eax
jbe 0x18000d330
mov rax, qword [rbp + 0x50]
mov dword [rbp - 0x10], 0
mov rax, qword [rax + 0x108]
movzx r10d, word [rax + 0xc]
jmp 0x18000d138
mov rax, qword [rbp + 0x50]
mov rcx, qword [rax]
test byte [rcx + 0xe0], 0x20
jne 0x18000d39e
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rbx, qword [rbp - 0x28]
jmp 0x18000d2d5
lea rax, [0x180020d8e]
lea r9, str.FAudio_INTERNAL_DecodeMonoMSADPCM
mov rcx, r10
mov r8d, 0x74f
mov qword [rsp + 0x20], rax
lea rdx, str..._src_wine_libs_faudio_src_FAudio_internal.c
mov qword [rsp + 0x28], r9
call sym.FAudio_INTERNAL_debug
mov rax, qword [rbp + 0x50]
mov rcx, qword [rax + 0x108]
jmp 0x18000d0da
lea r9, str.FAudio_INTERNAL_DecodeMonoMSADPCM
lea rax, [0x180020d9d]
mov r8d, 0x76e
mov qword [rsp + 0x28], r9
lea rdx, str..._src_wine_libs_faudio_src_FAudio_internal.c
mov qword [rsp + 0x20], rax
call sym.FAudio_INTERNAL_debug
jmp 0x18000d340