Function at 0x46b181
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp byte [esi + 4], bl
je 0x46b2bc
cmp byte [esi + 5], bl
je 0x46b2bc
cmp dword [esi + 0x1484], ebx
je 0x46b2bc
mov edi, 0x100
lea eax, [esi + 0x6ad]
push edi
push ebx
push eax
call fcn.005b9760
add esp, 0xc
cmp byte [ebp + 8], bl
je 0x46b1d1
mov ecx, esi
call fcn.0046b06f
lea edx, [esi + 0xe84]
mov ebx, edi
movzx ecx, byte [edx]
mov al, byte [edx + 0x300]
inc edx
mov byte [ecx + esi + 0x6ad], al
sub ebx, 1
jne 0x46b1d9
lea ecx, [esi + 0x6ad]
cmp byte [ecx], bl
jne 0x46b204
cmp ebx, edi
jge 0x46b204
inc ebx
cmp byte [ecx + ebx], 0
je 0x46b1f9
cmp byte [ebx + esi + 0x6ad], 0xff
je 0x46b2a8
cmp ebx, edi
jge 0x46b486
cmp byte [ecx + ebx], 0
jne 0x46b29d
lea eax, [ebx - 1]
cmp eax, 0xfd
ja 0x46b29d
lea edx, [ebx + 1]
jmp 0x46b236
cmp byte [ecx + edx], 0
jne 0x46b23a
inc edx
cmp edx, edi
jl 0x46b22f
mov al, byte [ebx + esi + 0x6ac]
movzx ecx, byte [ecx + edx]
mov byte [esp + 0x13], al
movzx eax, al
sub ecx, eax
mov eax, edx
sub eax, ebx
inc eax
movd xmm1, ecx
lea ecx, [esi + 0x6ad]
cvtdq2pd xmm1, xmm1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm1, xmm0
cmp ebx, edx
jge 0x46b29a
xor edi, edi
inc edi
sub edi, ebx
lea eax, [edi + ebx]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm1
cvttsd2si eax, xmm0
add al, byte [esp + 0x13]
mov byte [ecx + ebx], al
inc ebx
cmp ebx, edx
jl 0x46b276
mov edi, 0x100
lea ebx, [edx - 1]
inc ebx
cmp byte [ecx + ebx], 0xff
jne 0x46b212
cmp ebx, edi
jge 0x46b486
lea eax, [esi + 0x6ad]
add eax, ebx
sub edi, ebx
jmp 0x46b2fe
mov eax, dword [esi + 0x3f0]
cmp eax, 0x64
jne 0x46b312
mov eax, ebx
cmp dword [esi + 0x7b0], ebx
jle 0x46b2e1
mov byte [esi + eax + 0x6ad], bl
inc eax
cmp eax, dword [esi + 0x7b0]
jl 0x46b2d1
mov ecx, dword [esi + 0x7b0]
mov edi, 0x100
cmp ecx, edi
jge 0x46b486
lea eax, [esi + 0x6ad]
add eax, ecx
sub edi, ecx
push edi
push 0xff
push eax
call fcn.005b9760
add esp, 0xc
jmp 0x46b486
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x872660]
divsd xmm0, qword [0x8726a0]
addsd xmm0, qword [0x872660]
mulsd xmm0, qword [0x872600]
divsd xmm0, qword [0x8726b8]
call fcn.005cf910
mov ecx, dword [esi + 0x7b0]
movaps xmm4, xmm0
movsd xmm3, qword [0x8726d0]
mov edx, ebx
mov dword [esp + 0x14], ebx
movd xmm1, ecx
cvtdq2pd xmm1, xmm1
mulsd xmm1, xmm4
cvttsd2si eax, xmm1
sub ecx, eax
mov eax, 0xff
movd xmm5, ecx
lea edi, [eax + 1]
cvtdq2pd xmm5, xmm5
movd xmm0, dword [esi + 0x3ec]
movaps xmm1, xmm3
movd xmm2, edx
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm0, xmm0
mulsd xmm2, xmm4
addsd xmm2, xmm5
addsd xmm2, xmm0
xorps xmm0, xmm0
minsd xmm1, xmm2
maxsd xmm0, xmm1
cvttsd2si ecx, xmm0
mov dword [esp + 0x18], ecx
test cl, cl
mov byte [esi + edx + 0x6ad], cl
mov ecx, dword [esp + 0x14]
jne 0x46b3cd
cmp edx, ecx
jle 0x46b3d9
mov dword [esp + 0x14], edx
cmp byte [esp + 0x18], 0xff
jne 0x46b3d9
cmp edx, eax
cmovl eax, edx
inc edx
cmp edx, edi
jl 0x46b380
mov ecx, dword [esi + 0x3f4]
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
xor eax, edx
movsd xmm2, qword [0x8725b8]
sub eax, edx
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm1, qword [0x872650]
addsd xmm1, xmm2
test ecx, ecx
jns 0x46b419
movaps xmm0, xmm2
divsd xmm0, xmm1
movaps xmm1, xmm0
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp eax, edi
jge 0x46b486
divsd xmm2, xmm1
add esi, 0x6ad
add esi, eax
sub edi, eax
movsd qword [esp + 0x18], xmm2
movzx eax, byte [esi]
movaps xmm1, xmm2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm0, xmm3
call fcn.005d3760
movsd xmm3, qword [0x8726d0]
mulsd xmm0, xmm3
comisd xmm0, xmm3
jbe 0x46b467
mov byte [esi], 0xff
jmp 0x46b47a
xorps xmm1, xmm1
comisd xmm1, xmm0
jbe 0x46b474
mov byte [esi], bl
jmp 0x46b47a
cvttsd2si eax, xmm0
mov byte [esi], al
movsd xmm2, qword [esp + 0x18]
inc esi
sub edi, 1
jne 0x46b439
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4