Function at 0x10031100
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
dec esi
mov dword [ebp - 4], edx
mov eax, esi
mov dword [ebp - 0xc], edx
sar eax, 1
push edi
mov dword [ebp - 8], eax
cmp edx, eax
mov eax, dword [ebp + 0x10]
mov edi, ecx
mov dword [ebp - 0x10], esi
jge 0x10031211
nop dword [eax]
mov edx, dword [eax]
lea esi, [ebx + ebx]
mov ecx, esi
shl ecx, 4
sub ecx, esi
sub edx, 0
je 0x1003115a
sub edx, 1
je 0x1003114a
xor cl, cl
jmp 0x1003116b
movss xmm0, dword [edi + ecx*4 + 0x60]
comiss xmm0, dword [edi + ecx*4 + 0x9c]
jmp 0x10031168
movss xmm0, dword [edi + ecx*4 + 0x5c]
comiss xmm0, dword [edi + ecx*4 + 0x98]
seta cl
mov edx, dword [ebp - 4]
inc esi
movzx ebx, cl
xor ebx, 1
shl edx, 4
sub edx, dword [ebp - 4]
add ebx, esi
mov esi, ebx
shl esi, 4
sub esi, ebx
mov ecx, dword [edi + esi*4]
mov dword [edi + edx*4], ecx
mov ecx, dword [edi + esi*4 + 4]
mov dword [edi + edx*4 + 4], ecx
mov ecx, dword [edi + esi*4 + 8]
mov dword [edi + edx*4 + 8], ecx
mov ecx, dword [edi + esi*4 + 0xc]
mov dword [edi + edx*4 + 0xc], ecx
mov ecx, dword [edi + esi*4 + 0x10]
mov dword [edi + edx*4 + 0x10], ecx
mov ecx, dword [edi + esi*4 + 0x14]
mov dword [edi + edx*4 + 0x14], ecx
mov ecx, dword [edi + esi*4 + 0x18]
mov dword [edi + edx*4 + 0x18], ecx
mov ecx, dword [edi + esi*4 + 0x1c]
mov dword [edi + edx*4 + 0x1c], ecx
mov ecx, dword [edi + esi*4 + 0x20]
mov dword [edi + edx*4 + 0x20], ecx
mov ecx, dword [edi + esi*4 + 0x24]
mov dword [edi + edx*4 + 0x24], ecx
mov ecx, dword [edi + esi*4 + 0x28]
mov dword [edi + edx*4 + 0x28], ecx
movzx ecx, byte [edi + esi*4 + 0x2c]
mov byte [edi + edx*4 + 0x2c], cl
mov ecx, dword [edi + esi*4 + 0x30]
mov dword [edi + edx*4 + 0x30], ecx
movzx ecx, byte [edi + esi*4 + 0x34]
mov byte [edi + edx*4 + 0x34], cl
mov ecx, dword [edi + esi*4 + 0x38]
mov dword [edi + edx*4 + 0x38], ecx
mov edx, ebx
mov ecx, dword [ebp - 8]
mov dword [ebp - 4], edx
cmp ebx, ecx
jl 0x10031130
mov esi, dword [ebp - 0x10]
jmp 0x10031214
mov ecx, dword [ebp - 8]
cmp ebx, ecx
jne 0x10031245
mov ecx, dword [ebp + 8]
test cl, 1
jne 0x10031245
mov eax, ecx
shl eax, 4
sub eax, ecx
add eax, 0xfffffff1
lea eax, [edi + eax*4]
push eax
mov eax, edx
shl eax, 4
sub eax, edx
lea ecx, [edi + eax*4]
call fcn.10031000
mov eax, dword [ebp + 0x10]
mov edx, esi
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], edx
jge 0x1003131f
nop
mov ecx, dword [eax]
lea ebx, [edx - 1]
sar ebx, 1
mov esi, ebx
shl esi, 4
sub esi, ebx
sub ecx, 0
je 0x1003127b
sub ecx, 1
jne 0x1003131f
mov ecx, dword [ebp + 0xc]
movss xmm0, dword [ecx + 0x24]
comiss xmm0, dword [edi + esi*4 + 0x24]
jmp 0x10031288
mov ecx, dword [ebp + 0xc]
movss xmm0, dword [ecx + 0x20]
comiss xmm0, dword [edi + esi*4 + 0x20]
seta cl
test cl, cl
je 0x1003131f
mov ecx, dword [edi + esi*4]
shl edx, 4
sub edx, dword [ebp - 4]
mov dword [edi + edx*4], ecx
mov ecx, dword [edi + esi*4 + 4]
mov dword [edi + edx*4 + 4], ecx
mov ecx, dword [edi + esi*4 + 8]
mov dword [edi + edx*4 + 8], ecx
mov ecx, dword [edi + esi*4 + 0xc]
mov dword [edi + edx*4 + 0xc], ecx
mov ecx, dword [edi + esi*4 + 0x10]
mov dword [edi + edx*4 + 0x10], ecx
mov ecx, dword [edi + esi*4 + 0x14]
mov dword [edi + edx*4 + 0x14], ecx
mov ecx, dword [edi + esi*4 + 0x18]
mov dword [edi + edx*4 + 0x18], ecx
mov ecx, dword [edi + esi*4 + 0x1c]
mov dword [edi + edx*4 + 0x1c], ecx
mov ecx, dword [edi + esi*4 + 0x20]
mov dword [edi + edx*4 + 0x20], ecx
mov ecx, dword [edi + esi*4 + 0x24]
mov dword [edi + edx*4 + 0x24], ecx
mov ecx, dword [edi + esi*4 + 0x28]
mov dword [edi + edx*4 + 0x28], ecx
movzx ecx, byte [edi + esi*4 + 0x2c]
mov byte [edi + edx*4 + 0x2c], cl
mov ecx, dword [edi + esi*4 + 0x30]
mov dword [edi + edx*4 + 0x30], ecx
movzx ecx, byte [edi + esi*4 + 0x34]
mov byte [edi + edx*4 + 0x34], cl
mov ecx, dword [edi + esi*4 + 0x38]
mov dword [edi + edx*4 + 0x38], ecx
mov edx, ebx
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], ebx
jl 0x10031250
mov ecx, edx
shl ecx, 4
sub ecx, edx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov dword [edi + ecx*4], eax
mov eax, dword [edx + 4]
mov dword [edi + ecx*4 + 4], eax
mov eax, dword [edx + 8]
mov dword [edi + ecx*4 + 8], eax
mov eax, dword [edx + 0xc]
mov dword [edi + ecx*4 + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [edi + ecx*4 + 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [edi + ecx*4 + 0x14], eax
mov eax, dword [edx + 0x18]
mov dword [edi + ecx*4 + 0x18], eax
mov eax, dword [edx + 0x1c]
mov dword [edi + ecx*4 + 0x1c], eax
mov eax, dword [edx + 0x20]
mov dword [edi + ecx*4 + 0x20], eax
mov eax, dword [edx + 0x24]
mov dword [edi + ecx*4 + 0x24], eax
mov eax, dword [edx + 0x28]
mov dword [edi + ecx*4 + 0x28], eax
movzx eax, byte [edx + 0x2c]
mov byte [edi + ecx*4 + 0x2c], al
mov eax, dword [edx + 0x30]
mov dword [edi + ecx*4 + 0x30], eax
movzx eax, byte [edx + 0x34]
mov byte [edi + ecx*4 + 0x34], al
mov eax, dword [edx + 0x38]
mov dword [edi + ecx*4 + 0x38], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret