Function at 0x10014840
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x60
mov esi, esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov ecx, dword [ecx + 0xac]
movzx ecx, word [ecx + 0x12]
mov dword [esi + 0xc], ecx
test byte [eax + 0x90], 0x20
je 0x1001488b
push str.FAudio_INTERNAL_DecodeStereoMSADPCM
push str.FUNC_Enter:__s
push str.FAudio_INTERNAL_DecodeStereoMSADPCM
push 0x7c0
push str.libs_faudio_src_FAudio_internal.c
push eax
call dbg.FAudio_INTERNAL_debug
add esp, 0x18
mov eax, dword [esi + 0xc]
lea eax, [eax*4]
call sym.__alloca
mov eax, esp
and eax, 0xfffffff0
mov dword [esi + 8], eax
mov esp, eax
cmp dword [ebp + 0x14], 0
je 0x10014b1e
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xa0]
mov ecx, dword [ecx + 0xac]
xor edx, edx
div dword [esi + 0xc]
mov ebx, dword [ebp + 0x10]
movzx edi, word [ecx + 0xc]
mov ecx, dword [ebp + 0x14]
imul edi, eax
mov eax, dword [ebp + 0xc]
add edi, dword [eax + 8]
xor eax, eax
jmp 0x10014918
mov edi, eax
mov ebx, dword [esi + 0x14]
mov eax, dword [esi + 0x2c]
lea eax, [edi + eax*4]
mov edi, dword [esi + 0x24]
lea ecx, [edi + edi]
push ecx
push ebx
push eax
mov eax, dword [0x100363e8]
call dword [eax]
add esp, 0xc
lea ebx, [ebx + edi*8]
mov eax, dword [esi + 0x28]
add eax, edi
mov edi, dword [esi]
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
mov edx, 0
jae 0x10014b1e
mov dword [esi + 0x14], ebx
mov ebx, eax
mov eax, ecx
mov dword [esi + 0x28], ebx
sub eax, ebx
mov ecx, dword [esi + 0xc]
mov ebx, edx
mov dword [esi + 0x2c], edx
sub ecx, edx
cmp eax, ecx
cmovb ecx, eax
mov dword [esi + 0x24], ecx
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xac]
movzx ecx, word [eax + 0xc]
movzx ebx, byte [edi]
movsd xmm0, qword [edi + 6]
movzx edx, byte [edi + 1]
movzx eax, word [edi + 2]
mov dword [esi + 0x20], eax
movzx eax, word [edi + 4]
mov dword [esi + 0x1c], eax
lea eax, [edi + 0xe]
mov dword [esi], eax
movaps xmm1, xmm0
shufps xmm1, xmm1, 0xe1
mov eax, dword [esi + 8]
movlps qword [eax], xmm1
add ecx, 0xfffffff2
je 0x100148e0
mov eax, dword [ebx*4 + 0x100363a8]
mov dword [esi + 0x3c], eax
mov eax, dword [ebx*4 + 0x100363c4]
mov dword [esi + 0x38], eax
mov eax, dword [edx*4 + 0x100363a8]
mov dword [esi + 0x34], eax
mov eax, dword [edx*4 + 0x100363c4]
mov dword [esi + 0x30], eax
pextrw edx, xmm0, 1
pextrw eax, xmm0, 2
mov dword [esi + 4], eax
movd ebx, xmm0
pextrw eax, xmm0, 3
mov dword [esi + 0x18], eax
xor eax, eax
mov edi, dword [esi]
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], edx
mov dword [esi + 0x10], eax
movzx ecx, byte [edi + eax]
mov edx, ecx
shr edx, 4
mov eax, ebx
mov dword [esi + 0x4c], ebx
mov ebx, edx
or bl, 0xf0
test cl, cl
movzx ecx, bl
cmovns ecx, edx
movsx edi, ax
imul edi, dword [esi + 0x3c]
movsx eax, word [esi + 4]
imul eax, dword [esi + 0x38]
lea ebx, [edi + eax]
add ebx, 0xff
add edi, eax
cmovns ebx, edi
sar ebx, 8
movsx eax, cl
movsx ecx, word [esi + 0x20]
imul eax, ecx
add eax, ebx
cmp eax, 0xffff8001
mov edi, 0xffff8000
cmovl eax, edi
cmp eax, 0x7fff
mov edi, 0x7fff
cmovge eax, edi
mov ebx, eax
mov dword [esi + 0x48], eax
imul ecx, dword [edx*4 + 0x10036368]
test ecx, ecx
lea eax, [ecx + 0xff]
cmovns eax, ecx
shr eax, 8
cmp ax, 0x11
mov ecx, 0x10
cmovl eax, ecx
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov word [ecx + eax*4 + 8], bx
mov eax, dword [esi + 0x10]
mov ecx, dword [esi]
movzx ecx, byte [ecx + eax]
mov eax, ecx
and eax, 0xf
mov dword [esi + 4], eax
shl cl, 4
sar cl, 7
and cl, 0xf0
or cl, al
mov edi, dword [esi + 0x44]
movsx eax, di
imul eax, dword [esi + 0x34]
movsx edx, word [esi + 0x18]
imul edx, dword [esi + 0x30]
lea ebx, [eax + edx]
add ebx, 0xff
add eax, edx
cmovns ebx, eax
mov eax, dword [esi + 0x10]
sar ebx, 8
movsx ecx, cl
movsx edx, word [esi + 0x1c]
imul ecx, edx
add ecx, ebx
cmp ecx, 0xffff8001
mov ebx, 0xffff8000
cmovl ecx, ebx
cmp ecx, 0x7fff
mov ebx, 0x7fff
cmovge ecx, ebx
mov ebx, dword [esi + 4]
imul edx, dword [ebx*4 + 0x10036368]
test edx, edx
lea ebx, [edx + 0xff]
cmovns ebx, edx
mov dword [esi + 0x18], edi
mov edi, dword [esi]
mov edx, dword [esi + 0x4c]
mov dword [esi + 4], edx
shr ebx, 8
cmp bx, 0x11
mov edx, 0x10
cmovl ebx, edx
mov dword [esi + 0x1c], ebx
mov edx, dword [esi + 8]
mov word [edx + eax*4 + 0xa], cx
inc eax
mov edx, ecx
mov ecx, dword [esi + 0x40]
mov ebx, dword [esi + 0x48]
cmp ecx, eax
jne 0x100149c0
add edi, eax
mov dword [esi], edi
mov edi, dword [esi + 8]
jmp 0x100148e2
mov eax, dword [ebp + 8]
mov eax, dword [eax]
test byte [eax + 0x90], 0x20
je 0x10014b4e
push str.FAudio_INTERNAL_DecodeStereoMSADPCM
push str.FUNC_Exit:__s
push str.FAudio_INTERNAL_DecodeStereoMSADPCM
push 0x7df
push str.libs_faudio_src_FAudio_internal.c
push eax
call dbg.FAudio_INTERNAL_debug
add esp, 0x18
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret