Function at 0x429fe0
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 0x42a044
movzx ecx, word [esi + 0x28]
xor edx, edx
div ecx
xor edi, edi
cmp dword [esi + 0x48], 2
mov ecx, eax
jne 0x42a027
cmp dword [esi + 0x64], 2
jne 0x42a01e
cmp ecx, dword [esi + 0x4c]
jae 0x42a01e
push str.Invalid_number_of_sample_frames_in_WAVE_fact_chunk__too_many_
call fcn.0041b670
add esp, 4
cdq
jmp 0x42a02b
mov eax, dword [esi + 0x4c]
xor edx, edx
cmp ecx, eax
ja 0x42a02b
mov eax, ecx
mov edx, edi
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
test edx, edx
jg 0x42a044
jl 0x42a03b
test eax, eax
jae 0x42a044
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 0x42a06c
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 0x42a080
or eax, 0xffffffff
xor edx, edx
div ecx
cmp eax, ebp
jbe 0x42a093
imul ebp, ecx
test ebp, ebp
je 0x42a0a4
or eax, 0xffffffff
xor edx, edx
div ebp
cmp eax, 2
ja 0x42a0a4
push 0
call fcn.0041b5a0
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 0x42a244
jl 0x42a0c2
cmp ecx, 0xffffffff
ja 0x42a244
test edx, edx
mov eax, 1
push ebx
cmovne eax, edx
push eax
push dword [esi + 0x10]
call fcn.00458e40
mov ebx, eax
add esp, 8
mov dword [esp + 0x1c], ebx
test ebx, ebx
jne 0x42a0f4
push eax
call fcn.0041b5a0
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 0x42a1bb
sub eax, 1
je 0x42a12f
push ebx
call fcn.00458de0
push str.Unknown_companded_encoding
call fcn.0041b670
add esp, 8
pop ebx
pop ebp
pop edi
pop esi
add esp, 8
ret
test ebp, ebp
je 0x42a22a
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 0x42a137
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 0x42a22a
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 0x42a209
dec al
mov cx, ax
mov ax, word [esp + 0x10]
shl ax, cl
jmp 0x42a20e
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 0x42a1c0
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.0041b670
add esp, 4
pop ebp
pop edi
pop esi
add esp, 8
ret