Function at 0x429440
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
push edi
mov eax, dword [esi + 0x14]
cmp dword [esi + 4], eax
je 0x4294a4
movzx ecx, word [esi + 0x28]
xor edx, edx
div ecx
xor edi, edi
cmp dword [esi + 0x48], 2
mov ecx, eax
jne 0x429487
cmp dword [esi + 0x64], 2
jne 0x42947e
cmp ecx, dword [esi + 0x4c]
jae 0x42947e
push str.Invalid_number_of_sample_frames_in_WAVE_fact_chunk__too_many_
call fcn.0041ad60
add esp, 4
cdq
jmp 0x42948b
mov eax, dword [esi + 0x4c]
xor edx, edx
cmp ecx, eax
ja 0x42948b
mov eax, ecx
mov edx, edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
test edx, edx
jg 0x4294a4
jl 0x42949b
test eax, eax
jae 0x4294a4
pop edi
or eax, 0xffffffff
pop esi
add esp, 8
ret
mov ecx, dword [esi + 0x50]
mov eax, ecx
mov edi, dword [esi + 0x54]
or eax, edi
jne 0x4294cc
mov eax, dword [esp + 0x18]
pop edi
pop esi
mov dword [eax], 0
mov eax, dword [esp + 0x14]
mov dword [eax], 0
xor eax, eax
add esp, 8
ret
push ebp
movzx ebp, word [esi + 0x1c]
test ecx, ecx
je 0x4294e0
or eax, 0xffffffff
xor edx, edx
div ecx
cmp eax, ebp
jbe 0x4294f3
imul ebp, ecx
test ebp, ebp
je 0x429504
or eax, 0xffffffff
xor edx, edx
div ebp
cmp eax, 2
ja 0x429504
push 0
call fcn.0041ac90
add esp, 4
pop ebp
pop edi
pop esi
add esp, 8
ret
lea edx, [ebp*2]
mov dword [esp + 0x10], edx
test edi, edi
jg 0x4296a4
jl 0x429522
cmp ecx, 0xffffffff
ja 0x4296a4
test edx, edx
mov eax, 1
push ebx
cmovne eax, edx
push eax
push dword [esi + 0x10]
call fcn.004582b0
mov ebx, eax
add esp, 8
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x429554
push eax
call fcn.0041ac90
add esp, 4
pop ebx
pop ebp
pop edi
pop esi
add esp, 8
ret
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movzx eax, word [esi + 0x1a]
sub eax, 6
je 0x42961b
sub eax, 1
je 0x42958f
push ebx
call fcn.00458250
push str.Unknown_companded_encoding
call fcn.0041ad60
add esp, 8
pop ebx
pop ebp
pop edi
pop esi
add esp, 8
ret
test ebp, ebp
je 0x42968a
mov bl, byte [ebx + ebp - 1]
dec ebp
not bl
mov eax, 4
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
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 [esp + 0x1c]
movzx eax, dx
cmovns ecx, eax
mov word [ebx + ebp*2], cx
test ebp, ebp
jne 0x429597
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov dword [eax], ebx
mov eax, dword [esp + 0x24]
pop ebx
pop ebp
pop edi
mov dword [eax], ecx
xor eax, eax
pop esi
add esp, 8
ret
test ebp, ebp
je 0x42968a
nop
mov al, byte [ebx + ebp - 1]
dec ebp
mov byte [esp + 0x1c], 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 [esp + 0x10], ecx
cmp al, 1
jbe 0x429669
dec al
mov cx, ax
mov ax, word [esp + 0x10]
shl ax, cl
jmp 0x42966e
mov ax, word [esp + 0x10]
movzx eax, ax
mov ecx, eax
mov edx, eax
neg ecx
cmp byte [esp + 0x1c], 0
movzx eax, cx
cmovge edx, eax
mov word [ebx + ebp*2], dx
test ebp, ebp
jne 0x429620
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
mov dword [eax], ebx
mov eax, dword [esp + 0x24]
pop ebx
pop ebp
pop edi
mov dword [eax], ecx
xor eax, eax
pop esi
add esp, 8
ret
push str.WAVE_file_too_big
call fcn.0041ad60
add esp, 4
pop ebp
pop edi
pop esi
add esp, 8
ret