Function at 0x47074b
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 0x470886
cmp byte [esi + 5], bl
je 0x470886
cmp dword [esi + 0x1484], ebx
je 0x470886
mov edi, 0x100
lea eax, [esi + 0x6ad]
push edi
push ebx
push eax
call fcn.005e1980
add esp, 0xc
cmp byte [ebp + 8], bl
je 0x47079b
mov ecx, esi
call fcn.00470639
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 0x4707a3
lea ecx, [esi + 0x6ad]
cmp byte [ecx], bl
jne 0x4707ce
cmp ebx, edi
jge 0x4707ce
inc ebx
cmp byte [ecx + ebx], 0
je 0x4707c3
cmp byte [ebx + esi + 0x6ad], 0xff
je 0x470872
cmp ebx, edi
jge 0x470a50
cmp byte [ecx + ebx], 0
jne 0x470867
lea eax, [ebx - 1]
cmp eax, 0xfd
ja 0x470867
lea edx, [ebx + 1]
jmp 0x470800
cmp byte [ecx + edx], 0
jne 0x470804
inc edx
cmp edx, edi
jl 0x4707f9
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 0x470864
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 0x470840
mov edi, 0x100
lea ebx, [edx - 1]
inc ebx
cmp byte [ecx + ebx], 0xff
jne 0x4707dc
cmp ebx, edi
jge 0x470a50
lea eax, [esi + 0x6ad]
add eax, ebx
sub edi, ebx
jmp 0x4708c8
mov eax, dword [esi + 0x3f0]
cmp eax, 0x64
jne 0x4708dc
mov eax, ebx
cmp dword [esi + 0x7b0], ebx
jle 0x4708ab
mov byte [esi + eax + 0x6ad], bl
inc eax
cmp eax, dword [esi + 0x7b0]
jl 0x47089b
mov ecx, dword [esi + 0x7b0]
mov edi, 0x100
cmp ecx, edi
jge 0x470a50
lea eax, [esi + 0x6ad]
add eax, ecx
sub edi, ecx
push edi
push 0xff
push eax
call fcn.005e1980
add esp, 0xc
jmp 0x470a50
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x8c2788]
divsd xmm0, qword [0x8c27c8]
addsd xmm0, qword [0x8c2788]
mulsd xmm0, qword [0x8c2728]
divsd xmm0, qword [0x8c27e0]
call fcn.005f7dc0
mov ecx, dword [esi + 0x7b0]
movaps xmm4, xmm0
movsd xmm3, qword [0x8c27f8]
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 0x470997
cmp edx, ecx
jle 0x4709a3
mov dword [esp + 0x14], edx
cmp byte [esp + 0x18], 0xff
jne 0x4709a3
cmp edx, eax
cmovl eax, edx
inc edx
cmp edx, edi
jl 0x47094a
mov ecx, dword [esi + 0x3f4]
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
xor eax, edx
movsd xmm2, qword [0x8c26e0]
sub eax, edx
movd xmm1, eax
cvtdq2pd xmm1, xmm1
divsd xmm1, qword [0x8c2778]
addsd xmm1, xmm2
test ecx, ecx
jns 0x4709e3
movaps xmm0, xmm2
divsd xmm0, xmm1
movaps xmm1, xmm0
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
cmp eax, edi
jge 0x470a50
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.005fbcd0
movsd xmm3, qword [0x8c27f8]
mulsd xmm0, xmm3
comisd xmm0, xmm3
jbe 0x470a31
mov byte [esi], 0xff
jmp 0x470a44
xorps xmm1, xmm1
comisd xmm1, xmm0
jbe 0x470a3e
mov byte [esi], bl
jmp 0x470a44
cvttsd2si eax, xmm0
mov byte [esi], al
movsd xmm2, qword [esp + 0x18]
inc esi
sub edi, 1
jne 0x470a03
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4