Function at 0x47a070
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x4c]
push edi
mov edi, dword [eax + 0x90]
test edi, edi
mov dword [ebp - 4], edi
je 0x47a2ab
mov ebx, dword [ebp + 0xc]
mov edx, dword [esi + 0x10]
mov ecx, ebx
shl ecx, 8
mov dword [ebp - 0x14], ecx
mov ecx, dword [edx + 0x34]
shl ecx, 8
mov dword [ebp - 0x10], ecx
mov cl, byte [0x72b981]
lea edx, [ebp - 0x14]
add eax, 0x20
test cl, cl
mov ecx, edx
je 0x47a0c4
push eax
call fcn.00470360
add esp, 4
jmp 0x47a0cf
push edx
push ecx
push eax
call fcn.004441e0
add esp, 0xc
mov eax, dword [esi + 0x4c]
mov ecx, dword [eax + 0x20]
sar ecx, 8
xor edx, edx
cmp ecx, edx
mov dword [ebp - 8], ecx
jne 0x47a19f
mov esi, dword [ebp + 0x10]
xor edx, edx
mov dl, byte [eax + 0x94]
mov eax, dword [ebp - 0x14]
sar eax, 0xf
add eax, 0x80
sub esi, ebx
and edx, 0xc
push edx
push eax
call fcn.00479cc0
movzx dx, byte [edi + eax*4 + 2]
movzx cx, byte [edi + eax*4 + 3]
lea eax, [edi + eax*4]
mov word [ebp - 8], dx
movzx dx, byte [eax]
mov word [ebp - 6], cx
movzx cx, byte [eax + 1]
mov word [ebp - 0xc], dx
mov eax, esi
cdq
and edx, 3
add eax, edx
sar eax, 2
add esp, 8
test eax, eax
mov word [ebp - 0xa], cx
mov dword [ebp + 8], eax
je 0x47a167
mov edi, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
movq mm0, qword [ebp - 0xc]
movq qword [edi], mm0
movq qword [edi + 8], mm0
movq qword [edi + 0x10], mm0
movq qword [edi + 0x18], mm0
add edi, 0x20
sub ecx, 1
jne 0x47a14e
emms
mov ecx, eax
neg ecx
lea ecx, [esi + ecx*4]
mov esi, dword [ebp + 0x14]
shl eax, 5
add esi, eax
test ecx, ecx
je 0x47a2ab
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
lea ecx, [ecx*8 - 5]
shr ecx, 2
lea edi, [esi + 8]
mov dword [esi], edx
mov dword [esi + 4], eax
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, byte [eax + 0x94]
shr ecx, 2
mov dword [ebp + 8], ecx
mov dword [ebp - 0x2c], 0x80
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], 0x100
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], 0xff
mov dword [ebp - 0x18], edx
push ebx
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
sub ebx, eax
test ebx, ebx
je 0x47a2a8
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
mov esi, dword [ebp - 4]
mov edi, dword [ebp + 0x14]
pxor mm0, mm0
movq mm1, qword [ebp - 0x2c]
movq mm2, qword [ebp - 0x24]
cmp dword [ebp + 8], 0
je 0x47a280
movq mm4, qword [ebp - 0x1c]
cmp dword [ebp + 8], 1
je 0x47a240
jmp 0x47a210
movd mm3, edx
psrad mm3, 0xf
paddd mm3, mm1
pand mm3, mm4
pextrw eax, mm3, 0
movd mm3, dword [esi + eax*4]
punpcklbw mm3, mm0
movq qword [edi], mm3
add edx, ecx
add edi, 8
sub ebx, 1
jne 0x47a210
jmp 0x47a2a8
movd mm3, edx
psrad mm3, 0xf
paddd mm3, mm1
pshufw mm5, mm3, 0xe4
pand mm5, mm2
pcmpeqd mm5, mm2
pxor mm3, mm5
pand mm3, mm4
pextrw eax, mm3, 0
movd mm3, dword [esi + eax*4]
punpcklbw mm3, mm0
movq qword [edi], mm3
add edx, ecx
add edi, 8
sub ebx, 1
jne 0x47a240
jmp 0x47a2a8
movd mm3, edx
psrad mm3, 0xf
paddd mm3, mm1
pminsw mm3, mm2
pmaxsw mm3, mm0
pextrw eax, mm3, 0
movd mm3, dword [esi + eax*4]
punpcklbw mm3, mm0
movq qword [edi], mm3
add edx, ecx
add edi, 8
sub ebx, 1
jne 0x47a280
pop ebx
emms
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret