Function at 0x4515b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x520590]
push ebx
push esi
push edi
mov edi, dword [0x4da41c]
dec edi
mov dword [ebp - 0xc], ecx
mov ecx, dword [0x4da418]
add edi, eax
shr edi, cl
add edi, 2
mov dword [ebp - 0x3c], edi
cmp edx, edi
jl 0x451603
mov esi, dword [0x50cae0]
lea ecx, [eax - 0x18]
shr ecx, 2
mov ebx, esi
xor eax, eax
mov dword [ebp - 0x30], esi
nop
cmp dword [ebx], 0x3eb202fe
je 0x45160d
inc eax
add ebx, 4
mov dword [ebp - 0x30], ebx
cmp eax, ecx
jle 0x4515f0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, ecx
jg 0x451603
movzx eax, word [ebx + 0x16]
mov edx, dword [0x50cae4]
add eax, esi
mov dword [ebp - 0x18], eax
movzx ecx, word [eax + 0xe]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ecx + edx], eax
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
mov cl, 0x20
call fcn.00476170
mov edx, dword [ebp - 0x18]
xorps xmm0, xmm0
mov dword [ebp - 8], 0x8000
mov dword [ebp - 0x20], 0x8000
movlpd qword [ebp - 0x38], xmm0
movzx ecx, word [edx + 0x10]
mov edx, dword [0x50cae4]
mov dword [ecx + edx], eax
lea eax, [edi - 2]
mov ecx, dword [0x520590]
mov edx, dword [ebp - 0xc]
mov word [ebx + 8], ax
add edx, 8
mov eax, 2
shr ecx, 2
mov word [ebx + 0xa], ax
lea eax, [edi - 3]
mov dword [ebp - 0x2c], eax
xor edi, edi
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0xc], ecx
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], ecx
movzx ebx, word [eax + 0xa]
movzx eax, word [eax + 0xc]
add ebx, esi
mov dword [ebp - 0x24], edx
lea eax, [eax + eax*4]
add eax, eax
push eax
push edi
push ebx
call fcn.00478bc0
mov eax, dword [ebp - 0x2c]
add esp, 0xc
mov dword [ebp - 0x28], eax
test eax, eax
je 0x45177c
mov eax, dword [ebp - 0x34]
mov ecx, 0x8000
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
lea esi, [esi + 8]
mov dword [ebp - 0x24], eax
mov eax, dword [esi - 4]
mov dword [ebp - 0x1c], eax
test edi, edi
je 0x451745
lea eax, [edi + 1]
xor edx, edx
mov ecx, eax
mov dword [ebp - 0x34], eax
imul ecx, dword [0x4da41c]
mov eax, edi
add eax, dword [ebp - 0x10]
adc edx, dword [ebp - 0x14]
cmp dword [ebp - 0x24], eax
jne 0x45172d
cmp dword [ebp - 0x1c], edx
jne 0x45172d
cmp ecx, 0x10000
jae 0x45172d
mov eax, dword [ebp - 0x20]
dec eax
add eax, ecx
mov ecx, dword [ebp - 8]
xor eax, ecx
test eax, 0xffff0000
jne 0x451730
mov edi, dword [ebp - 0x34]
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
jmp 0x451756
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov dword [ebx], eax
mov eax, dword [ebp - 0x14]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x1c]
mov word [ebx + 8], di
add ebx, 0xa
mov edx, dword [ebp - 0x24]
mov edi, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], eax
add ecx, dword [0x4da41c]
sub dword [ebp - 0x28], 1
mov dword [ebp - 8], ecx
jne 0x4516d3
mov esi, dword [0x50cae0]
test edi, edi
je 0x45177c
mov dword [ebx], edx
mov dword [ebx + 4], eax
mov word [ebx + 8], di
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x14], 0x3eb202fe
movzx edx, word [edx]
add edx, esi
mov eax, dword [ebx + edi*8]
mov ecx, dword [ebx + edi*8 + 4]
mov dword [edx + 4], ecx
mov ecx, dword [ebp - 0x3c]
mov dword [edx], eax
mov eax, dword [ebx + ecx*8 - 0x10]
mov ecx, dword [ebx + ecx*8 - 0xc]
mov ebx, dword [ebp - 0x30]
mov dword [edx + 8], eax
mov eax, dword [ebp - 4]
mov dword [edx + 0xc], ecx
xor ecx, ecx
mov dword [ebx + 0x10], 0
test eax, eax
je 0x451824
cmp eax, 8
jb 0x451824
and eax, 0x80000007
jns 0x4517d2
dec eax
or eax, 0xfffffff8
inc eax
mov edx, dword [ebp - 4]
xorps xmm1, xmm1
sub edx, eax
xorps xmm2, xmm2
nop dword [eax]
movups xmm0, xmmword [esi]
add ecx, 8
psubd xmm1, xmm0
movups xmm0, xmmword [esi + 0x10]
add esi, 0x20
psubd xmm2, xmm0
cmp ecx, edx
jl 0x4517e0
paddd xmm1, xmm2
movaps xmm0, xmm1
psrldq xmm0, 8
paddd xmm1, xmm0
movups xmm0, xmm1
psrldq xmm0, 4
paddd xmm1, xmm0
movd eax, xmm1
add eax, 0x3eb202fe
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
xor edx, edx
xor edi, edi
cmp ecx, eax
jge 0x451885
sub eax, ecx
cmp eax, 2
jl 0x451853
mov eax, dword [ebp - 4]
sub eax, ecx
sub eax, 2
shr eax, 1
inc eax
lea ecx, [ecx + eax*2]
sub edx, dword [esi]
sub edi, dword [esi + 4]
add esi, 8
sub eax, 1
jne 0x451841
cmp ecx, dword [ebp - 4]
jge 0x45186d
mov ecx, dword [ebp - 0x14]
lea eax, [edx + edi]
sub ecx, dword [esi]
add ecx, eax
mov eax, dword [ebp - 4]
mov dword [ebx + 0x10], ecx
shl eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
lea eax, [edx + edi]
add ecx, eax
mov eax, dword [ebp - 4]
mov dword [ebx + 0x10], ecx
shl eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
pop edi
pop esi
mov dword [ebx + 0x10], ecx
shl eax, 2
pop ebx
mov esp, ebp
pop ebp
ret