Function at 0xff032c
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
cmp dword [ebp + 0xc], 0
push ebx
push esi
push edi
push 0xb
pop edi
cmovne edi, dword [ebp + 0xc]
cmp edi, 5
jb 0xff0529
cmp edi, 0xc
jbe 0xff0356
push 0xffffffffffffffd4
pop eax
jmp 0xff052c
mov esi, dword [ebp + 0x14]
xor edx, edx
mov dword [ebp + 0xc], edx
mov dword [ebp + 0xc], edx
lea eax, [esi - 1]
bsr ecx, eax
mov eax, dword [ebp + 0x18]
bsr eax, eax
inc ecx
add eax, 2
cmp ecx, eax
cmovb eax, ecx
cmp edi, eax
jb 0xff0529
push 0x3e
pop ebx
push edx
push esi
push 0x40000000
sub ebx, edi
mov dword [ebp - 0x4c], edx
push edx
mov dword [ebp - 0x48], 0x7386b
mov dword [ebp - 0x44], 0x7b20d
mov dword [ebp - 0x40], 0x7f29c
mov dword [ebp - 0x3c], 0x86470
mov dword [ebp - 0x38], 0xaae60
mov dword [ebp - 0x34], 0xb71b0
mov dword [ebp - 0x30], 0xcaa30
mov dword [ebp - 0x10], ebx
call fcn.00fec230
xor ecx, ecx
mov dword [ebp - 0x20], eax
lea eax, [ebx - 0x14]
mov dword [ebp - 0x1c], edx
bts ecx, eax
xor edx, edx
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov dword [ebp - 0x28], ecx
mov eax, esi
cmovae edx, ecx
and dword [ebp - 8], 0
and dword [ebp - 4], 0
xor ebx, ebx
mov ecx, edi
mov dword [ebp - 0x24], edx
mov edx, dword [ebp + 0x14]
inc ebx
shr eax, cl
shl ebx, cl
xor esi, esi
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x14], esi
mov ecx, dword [ecx + esi*4]
cmp ecx, edx
je 0xff0525
test ecx, ecx
je 0xff04d4
cmp ecx, dword [ebp - 0x18]
ja 0xff0430
dec ebx
or ecx, 0xffffffff
jmp 0xff04d4
mov eax, dword [ebp - 0x1c]
mul ecx
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x20]
mul ecx
mov ecx, dword [ebp + 0xc]
add ecx, edx
mov dword [ebp - 0xc], eax
mov dword [ebp + 0xc], ecx
mov edx, ecx
mov ecx, dword [ebp - 0x10]
call fcn.00fe35ac
movzx edx, ax
mov dword [ebp - 0x2c], edx
cmp dx, 8
jge 0xff04a1
mov ecx, dword [ebp - 0x10]
movsx esi, dx
mov eax, esi
cdq
call fcn.00ff2198
sub dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x24]
sbb dword [ebp + 0xc], edx
mul dword [ebp + esi*4 - 0x4c]
mov ecx, eax
mov eax, dword [ebp - 0x28]
mul dword [ebp + esi*4 - 0x4c]
add ecx, edx
mov edx, eax
cmp dword [ebp + 0xc], ecx
jb 0xff0497
ja 0xff0492
cmp dword [ebp - 0xc], edx
jbe 0xff0497
xor eax, eax
inc eax
jmp 0xff0499
xor eax, eax
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x14]
add edx, eax
movsx eax, dx
sub ebx, eax
movzx ecx, dx
cmp dx, word [ebp - 4]
movzx eax, dx
mov edx, dword [ebp + 0x14]
mov dword [ebp + 0xc], eax
mov eax, esi
cmovle eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
movzx eax, ax
cmovle ecx, eax
movzx eax, cx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov word [eax + esi*2], cx
inc esi
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x14], esi
cmp esi, dword [ebp + 0x18]
jbe 0xff040f
mov ecx, dword [ebp - 8]
movzx esi, word [eax + ecx*2]
mov eax, ebx
movsx ecx, si
neg eax
sar ecx, 1
cmp eax, ecx
mov eax, dword [ebp + 8]
jl 0xff0517
push dword [ebp + 0x18]
push edx
push dword [ebp + 0x10]
push edi
push eax
call fcn.010004b0
add esp, 0x14
cmp eax, 0xffffff88
jbe 0xff0521
jmp 0xff052c
mov edx, dword [ebp - 8]
lea ecx, [esi + ebx]
mov word [eax + edx*2], cx
mov eax, edi
jmp 0xff052c
xor eax, eax
jmp 0xff052c
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret