Function at 0x100d0950
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x14]
cmp dword [esi + 4], eax
je 0x100d09b6
movzx ecx, word [esi + 0x28]
xor edx, edx
div ecx
xor edi, edi
cmp dword [esi + 0x48], 2
mov ecx, eax
jne 0x100d099a
cmp dword [esi + 0x64], 2
jne 0x100d0991
cmp ecx, dword [esi + 0x4c]
jae 0x100d0991
push str.Invalid_number_of_sample_frames_in_WAVE_fact_chunk__too_many_
call fcn.100638c0
add esp, 4
cdq
jmp 0x100d099e
mov eax, dword [esi + 0x4c]
xor edx, edx
cmp ecx, eax
ja 0x100d099e
mov eax, ecx
mov edx, edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
test edx, edx
jl 0x100d0a43
jg 0x100d09b6
test eax, eax
jb 0x100d0a43
mov ecx, dword [esi + 0x50]
mov eax, ecx
mov edi, dword [esi + 0x54]
or eax, edi
jne 0x100d09dd
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov dword [eax], 0
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
xor eax, eax
mov esp, ebp
pop ebp
ret
movzx ebx, word [esi + 0x1c]
test ecx, ecx
je 0x100d09f4
or eax, 0xffffffff
xor edx, edx
div ecx
cmp eax, ebx
jbe 0x100d0b91
imul ebx, ecx
test ebx, ebx
je 0x100d0a0b
or eax, 0xffffffff
xor edx, edx
div ebx
cmp eax, 2
jbe 0x100d0b91
lea edx, [ebx + ebx]
mov dword [ebp - 8], edx
test edi, edi
jg 0x100d0b91
jl 0x100d0a24
cmp ecx, 0xffffffff
ja 0x100d0b91
test edx, edx
mov eax, 1
cmovne eax, edx
push eax
push dword [esi + 0x10]
call fcn.100913d0
mov edi, eax
add esp, 8
mov dword [ebp - 4], edi
test edi, edi
jne 0x100d0a4d
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movzx eax, word [esi + 0x1a]
sub eax, 6
je 0x100d0b14
sub eax, 1
je 0x100d0a87
push edi
call fcn.10091350
push str.Unknown_companded_encoding
call fcn.100638c0
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x100d0b7b
nop
dec ebx
mov eax, 4
mov dword [ebp + 8], ebx
mov bl, byte [ebx + edi]
not bl
movzx edi, bl
shr edi, 4
and edi, 7
lea ecx, [edi + 1]
shl ax, cl
movzx edx, ax
mov al, bl
and al, 0xf
movsx ecx, dx
movzx eax, al
movsx esi, ax
imul esi, ecx
mov ecx, edi
mov edi, dword [ebp - 4]
movsx eax, dx
cdq
sub eax, edx
sar eax, 1
add si, ax
mov eax, 0x80
shl ax, cl
lea ecx, [eax + esi]
mov eax, 0x84
sub eax, ecx
lea edx, [ecx - 0x84]
test bl, bl
movzx ecx, ax
mov ebx, dword [ebp + 8]
movzx eax, dx
cmovns ecx, eax
mov word [edi + ebx*2], cx
test ebx, ebx
jne 0x100d0a90
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
mov dword [eax], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret
test ebx, ebx
je 0x100d0b7b
mov al, byte [ebx + edi - 1]
dec ebx
mov byte [ebp + 0xb], al
xor al, 0xd5
and al, 0x7f
mov cl, al
shr al, 4
and cl, 0xf
movzx edx, cl
mov ecx, edx
or ecx, 0x10
test al, al
movzx esi, cx
mov ecx, edx
cmove esi, ecx
shl si, 4
or si, 8
movzx ecx, si
mov dword [ebp - 4], ecx
cmp al, 1
jbe 0x100d0b5c
lea ecx, [eax - 1]
mov ax, word [ebp - 4]
shl ax, cl
jmp 0x100d0b60
mov ax, word [ebp - 4]
movzx eax, ax
mov ecx, eax
mov edx, eax
neg ecx
cmp byte [ebp + 0xb], 0
movzx eax, cx
cmovge edx, eax
mov word [edi + ebx*2], dx
test ebx, ebx
jne 0x100d0b18
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
mov dword [eax], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret
push str.WAVE_file_too_big
call fcn.100638c0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret