Function at 0x547690
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x44
push ebx
push ebp
mov ebp, ecx
mov ebx, edx
push esi
mov esi, dword [ebp + 0x10]
cmp esi, 3
jae 0x5476b0
call fcn.00549990
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov ecx, dword [ebp]
push edi
mov dword [esp + 0x30], 2
mov dword [esp + 0x28], 0
movzx edx, byte [ecx]
movzx eax, byte [ecx + 2]
shl edx, 8
or edx, eax
mov dword [esp + 0x24], 0
movzx eax, byte [ecx + 1]
movzx eax, word [ebp + eax*4 + 0x60]
xor edx, eax
mov eax, dword [ebp + 0x24]
lea ecx, [eax + edx*4]
mov eax, dword [ebp + 4]
mov edx, dword [ecx]
mov dword [ecx], eax
mov eax, dword [ebp + 0x30]
mov edi, dword [ebp + 0x28]
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [ebp]
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x2c], eax
sub eax, edx
cmp edx, dword [esp + 0x2c]
mov dword [esp + 0x44], edx
sbb edx, edx
mov dword [esp + 0x40], ecx
and edx, eax
mov dword [esp + 0x48], edi
lea ecx, [edi + ecx*8]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x10]
lea edi, [ecx + 4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x20], edi
cmp dword [esp + 0x3c], edx
jae 0x54785c
nop dword [eax + eax]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x48]
sub edi, edx
cmp dword [esp + 0x40], edi
mov edx, dword [esp + 0x14]
sbb eax, eax
mov dword [esp + 0x4c], edi
and eax, dword [esp + 0x44]
sub eax, edi
neg edi
add eax, dword [esp + 0x40]
add edx, edi
mov dword [esp + 0x34], edx
lea ecx, [ecx + eax*8]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], ecx
mov ecx, eax
cmp dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x1c]
cmovb eax, dword [esp + 0x28]
mov ecx, dword [ecx]
mov dword [esp + 0x50], ecx
mov cl, byte [eax + edx]
mov edx, dword [esp + 0x14]
cmp cl, byte [eax + edx]
mov edx, dword [esp + 0x10]
jne 0x547800
inc eax
cmp eax, esi
je 0x5477e1
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edx]
mov edx, dword [esp + 0x10]
jne 0x5477e1
inc eax
cmp eax, esi
je 0x5477e1
mov edx, dword [esp + 0x14]
add edx, eax
nop
mov cl, byte [edx + edi]
cmp cl, byte [edx]
jne 0x5477dd
inc eax
inc edx
cmp eax, esi
jne 0x5477d0
mov edx, dword [esp + 0x10]
cmp dword [esp + 0x30], eax
jae 0x547800
mov ecx, dword [esp + 0x4c]
dec ecx
mov dword [ebx], eax
mov dword [ebx + 4], ecx
add ebx, 8
mov dword [esp + 0x30], eax
cmp eax, esi
je 0x54788b
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x14]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edi]
jae 0x54782d
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x1c]
add ecx, 4
mov dword [esp + 0x18], ecx
mov edx, dword [ecx]
jmp 0x547847
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov dword [ecx], edx
mov ecx, dword [esp + 0x1c]
mov edi, ecx
mov dword [esp + 0x20], edi
mov edx, dword [ecx]
mov ecx, dword [esp + 0x18]
sub dword [esp + 0x38], 1
mov dword [esp + 0x10], edx
je 0x54785c
cmp dword [esp + 0x3c], edx
jb 0x547750
mov dword [ecx], 0
mov dword [edi], 0
mov ecx, dword [ebp + 4]
inc dword [ebp + 0x14]
inc ecx
inc dword [ebp]
mov dword [ebp + 4], ecx
pop edi
cmp ecx, dword [ebp + 8]
jne 0x547882
mov ecx, ebp
call fcn.00549210
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x44
ret
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x50]
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 4]
mov ecx, dword [esp + 0x20]
mov dword [ecx], eax
jmp 0x547868