Function at 0x10020340
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10047020]
push esi
mov esi, ecx
push edi
test byte [eax + 0x1435], 1
movss xmm0, dword [eax + 0x16f8]
mov edi, dword [ebx + 8]
movss dword [ebp - 0x14], xmm0
movss xmm0, dword [eax + 0x16fc]
mov dword [ebp - 8], esi
movss dword [ebp - 0x18], xmm0
je 0x1002062a
mov eax, dword [ebx + 0x10]
and eax, 0xffffff
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0xc]
lea ecx, [eax + eax]
lea eax, [eax + eax*8]
mov dword [ebp - 0x2c], ecx
push ecx
add eax, 0xfffffffa
mov ecx, esi
push eax
call fcn.1001f660
mov ecx, dword [esi + 0x28]
lea eax, [ecx + 1]
movzx ecx, cx
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 0xc]
cmp eax, 2
jle 0x100203fc
mov dword [ebp - 0xc], ecx
mov edi, 2
nop
mov eax, dword [esi + 0x30]
lea edx, [ecx + edi*2]
inc edi
mov word [eax], cx
lea ecx, [edx - 2]
mov eax, dword [esi + 0x30]
mov word [eax + 2], cx
mov eax, dword [esi + 0x30]
mov ecx, dword [ebp - 0xc]
mov word [eax + 4], dx
add dword [esi + 0x30], 6
mov eax, dword [ebx + 0xc]
cmp edi, eax
jl 0x100203d0
mov edi, dword [ebx + 8]
movzx ecx, cx
shl eax, 3
mov dword [ebp - 0x24], ecx
call fcn.10039180
mov edx, dword [ebx + 0xc]
mov ecx, esp
mov dword [ebp - 0x10], ecx
lea eax, [edx - 1]
mov dword [ebp - 4], eax
test edx, edx
jle 0x10020499
movss xmm4, dword [0x10043240]
xorps xmm5, xmm5
shl eax, 3
xor esi, esi
movss xmm1, dword [edi + esi*8]
lea ecx, [edi + 4]
movss xmm2, dword [edi + esi*8 + 4]
lea edx, [esi*8]
subss xmm1, dword [eax + edi]
subss xmm2, dword [eax + edi + 4]
mov dword [ebp - 0xc], ecx
movaps xmm0, xmm1
movaps xmm3, xmm2
mulss xmm0, xmm1
mulss xmm3, xmm2
addss xmm3, xmm0
comiss xmm3, xmm5
jbe 0x10020479
xorps xmm0, xmm0
sqrtss xmm0, xmm3
divss xmm1, xmm0
divss xmm2, xmm0
mov ecx, dword [ebp - 0x10]
xorps xmm1, xmm4
inc esi
movss dword [eax + ecx], xmm2
movss dword [eax + ecx + 4], xmm1
mov eax, edx
mov edx, dword [ebx + 0xc]
cmp esi, edx
jl 0x10020430
mov esi, dword [ebp - 8]
jmp 0x1002049f
lea eax, [edi + 4]
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], eax
test edx, edx
jle 0x10020613
movss xmm5, dword [0x10042c70]
mov eax, ecx
movss xmm6, dword [0x10042c90]
sub eax, edi
movss xmm7, dword [0x10042d18]
xor edx, edx
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 4]
movss xmm0, dword [ecx + edx*8]
mov edx, dword [ebp - 0x1c]
addss xmm0, dword [ecx + eax*8]
movss xmm2, dword [edx + edi]
addss xmm2, dword [ecx + eax*8 + 4]
mov edx, dword [ebp - 8]
movaps xmm3, xmm0
mulss xmm0, xmm0
mulss xmm3, xmm5
movaps xmm4, xmm2
mulss xmm2, xmm2
mulss xmm4, xmm5
addss xmm2, xmm0
mulss xmm2, dword [0x10042c60]
comiss xmm2, dword [0x10042c3c]
jbe 0x1002052f
movaps xmm1, xmm6
divss xmm1, xmm2
minss xmm1, xmm7
movaps xmm0, xmm1
mulss xmm4, xmm1
mulss xmm3, xmm0
movss xmm1, dword [edi - 4]
movss xmm0, dword [edi]
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebx + 0x10]
mulss xmm3, xmm5
mulss xmm4, xmm5
subss xmm1, xmm3
subss xmm0, xmm4
movss dword [eax], xmm1
movss xmm1, dword [ebp - 0x18]
movss dword [eax + 4], xmm0
mov eax, dword [esi + 0x2c]
movss xmm0, dword [ebp - 0x14]
movss dword [eax + 8], xmm0
movss dword [eax + 0xc], xmm1
mov eax, dword [esi + 0x2c]
mov dword [eax + 0x10], ecx
addss xmm3, dword [edi - 4]
addss xmm4, dword [edi]
mov eax, dword [esi + 0x2c]
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
movss dword [eax + 0x14], xmm3
movss dword [eax + 0x18], xmm4
mov eax, dword [esi + 0x2c]
movss dword [eax + 0x1c], xmm0
movss dword [eax + 0x20], xmm1
mov eax, dword [esi + 0x2c]
mov dword [eax + 0x24], ecx
mov eax, dword [esi + 0x30]
mov ecx, dword [ebp - 0x24]
add dword [esi + 0x2c], 0x28
lea edx, [ecx + edx*2]
mov word [eax], dx
mov eax, dword [ebp - 4]
lea ecx, [ecx + eax*2]
mov eax, dword [esi + 0x30]
mov word [eax + 2], cx
mov eax, dword [ebp - 4]
movzx ecx, di
lea ecx, [ecx + eax*2]
mov eax, dword [esi + 0x30]
mov word [eax + 4], cx
mov eax, dword [esi + 0x30]
mov word [eax + 6], cx
mov eax, dword [ebp - 8]
movzx ecx, di
mov edi, dword [ebp - 0xc]
add edi, 8
mov dword [ebp - 0xc], edi
lea ecx, [ecx + eax*2]
mov eax, dword [esi + 0x30]
mov word [eax + 8], cx
mov eax, dword [esi + 0x30]
mov ecx, dword [ebp - 0x10]
mov word [eax + 0xa], dx
mov edx, dword [ebp - 8]
mov eax, edx
add dword [esi + 0x30], 0xc
inc edx
mov dword [ebp - 4], eax
mov dword [ebp - 8], edx
cmp edx, dword [ebx + 0xc]
jl 0x100204d3
mov eax, dword [ebp - 0x2c]
movzx eax, ax
add dword [esi + 0x28], eax
lea esp, [ebp - 0x38]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
mov eax, dword [ebx + 0xc]
push eax
lea eax, [eax + eax*2]
add eax, 0xfffffffa
push eax
call fcn.1001f660
mov eax, dword [ebx + 0xc]
test eax, eax
jle 0x10020684
movss xmm0, dword [ebp - 0x14]
movss xmm1, dword [ebp - 0x18]
mov dword [ebp - 0x10], eax
nop
mov eax, dword [esi + 0x2c]
lea edi, [edi + 8]
mov ecx, dword [edi - 8]
mov edx, dword [edi - 4]
mov dword [eax], ecx
mov ecx, dword [ebx + 0x10]
mov dword [eax + 4], edx
mov eax, dword [esi + 0x2c]
movss dword [eax + 8], xmm0
movss dword [eax + 0xc], xmm1
mov eax, dword [esi + 0x2c]
mov dword [eax + 0x10], ecx
add dword [esi + 0x2c], 0x14
sub dword [ebp - 0x10], 1
jne 0x10020650
mov eax, dword [ebx + 0xc]
mov edi, 2
cmp eax, edi
jle 0x100206c7
nop dword [eax]
mov ecx, dword [esi + 0x30]
mov ax, word [esi + 0x28]
movzx edx, di
inc edi
mov word [ecx], ax
movzx ecx, word [esi + 0x28]
mov eax, dword [esi + 0x30]
dec cx
add cx, dx
mov word [eax + 2], cx
mov eax, dword [esi + 0x30]
movzx ecx, word [esi + 0x28]
add cx, dx
mov word [eax + 4], cx
add dword [esi + 0x30], 6
mov eax, dword [ebx + 0xc]
cmp edi, eax
jl 0x10020690
movzx eax, ax
add dword [esi + 0x28], eax
lea esp, [ebp - 0x38]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10