Function at 0x563170
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
mov eax, edx
push edi
mov dword [esp + 0x18], ecx
lea edx, [esp + 0x1c]
push esi
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], eax
xor edi, edi
xor ebp, ebp
call fcn.0056dfb0
push esi
push dword [esp + 0x38]
lea edx, [esp + 0x24]
lea ecx, [esp + 0x30]
call fcn.0056dfb0
mov edx, dword [esp + 0x24]
add esp, 0x10
mov esi, dword [esp + 0x1c]
mov ebx, edx
cmp esi, edx
cmovg ebx, esi
mov eax, ebx
and eax, 1
add ebx, eax
mov eax, dword [esp + 0x20]
mov ecx, ebx
sub ecx, edx
sar eax, cl
mov ecx, ebx
sub ecx, esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x24]
sar eax, cl
mov ecx, 1
cmp eax, ecx
cmovg ecx, eax
mov eax, dword [esp + 0x34]
xor edx, edx
mov dword [esp + 0x14], ecx
xor esi, esi
cmp eax, 2
jl 0x56324d
mov ecx, dword [esp + 0x10]
dec eax
mov dword [esp + 0x20], eax
mov edx, ecx
mov eax, dword [esp + 0x2c]
add eax, 2
sub edx, dword [esp + 0x2c]
mov dword [esp + 0x24], edx
movsx edx, word [ecx + esi*2]
lea eax, [eax + 4]
movsx ecx, word [eax - 6]
add esi, 2
imul edx, ecx
mov ecx, ebx
sar edx, cl
mov ecx, dword [esp + 0x24]
add edi, edx
movsx edx, word [ecx + eax - 4]
movsx ecx, word [eax - 4]
imul edx, ecx
mov ecx, ebx
sar edx, cl
mov ecx, dword [esp + 0x10]
add ebp, edx
cmp esi, dword [esp + 0x20]
jl 0x563210
mov eax, dword [esp + 0x34]
xor edx, edx
cmp esi, eax
jge 0x563268
mov eax, dword [esp + 0x10]
mov ecx, ebx
movsx edx, word [eax + esi*2]
mov eax, dword [esp + 0x2c]
movsx eax, word [eax + esi*2]
imul edx, eax
sar edx, cl
lea ecx, [edi + ebp]
mov edi, dword [esp + 0x14]
add ecx, edx
mov edx, edi
push 0xd
mov dword [esp + 0x28], ecx
call fcn.00556350
add esp, 4
cmp eax, 0x4000
jle 0x56328f
mov eax, 0x4000
jmp 0x563299
mov ecx, 0xffffc000
cmp eax, ecx
cmovl eax, ecx
movsx ecx, ax
movzx ebp, ax
mov dword [esp + 0x34], eax
sar eax, 0x10
imul ebp, ecx
imul eax, ecx
mov ecx, edi
sar ebx, 1
mov dword [esp + 0x10], ebx
sar ebp, 0x10
add ebp, eax
mov eax, ebp
cdq
mov esi, eax
mov eax, dword [esp + 0x30]
xor esi, edx
sub esi, edx
mov ebx, dword [eax]
call fcn.00560ab0
mov ecx, dword [esp + 0x10]
mov edi, eax
mov eax, dword [esp + 0x38]
shl edi, cl
movzx ecx, ax
sub edi, ebx
cmp eax, esi
movzx edx, si
mov esi, dword [esp + 0x24]
cmovg edx, ecx
movzx eax, di
movsx ecx, dx
mov edx, dword [esp + 0x14]
imul eax, ecx
mov dword [esp + 0x38], ecx
sar edi, 0x10
imul edi, ecx
mov ecx, dword [esp + 0x30]
sar eax, 0x10
add ebx, eax
movsx eax, bp
mov ebp, dword [esp + 0x34]
add ebx, edi
mov edi, dword [ecx + 4]
mov dword [ecx], ebx
movzx ecx, dx
imul ecx, eax
sar edx, 0x10
imul edx, eax
movzx eax, si
sar esi, 0xc
sar ecx, 0x10
and esi, 0xfffffff0
add ecx, edx
movsx edx, bp
imul eax, edx
shl ecx, 6
imul esi, edx
sar eax, 0xc
and eax, 0xfffffff0
sub ecx, eax
sub ecx, esi
add ecx, dword [esp + 0x1c]
call fcn.00560ab0
mov ecx, dword [esp + 0x10]
mov esi, eax
shl esi, cl
mov edx, 1
mov ecx, dword [esp + 0x38]
sub esi, edi
movzx eax, si
imul eax, ecx
sar esi, 0x10
imul ecx, esi
push 0xe
sar eax, 0x10
add eax, edi
add ecx, eax
mov eax, dword [esp + 0x34]
cmp ebx, 1
cmovg edx, ebx
mov dword [eax + 4], ecx
call fcn.00556350
add esp, 4
cmp eax, 0x7fff
jle 0x5633a9
mov ecx, dword [esp + 0x18]
mov eax, ebp
pop edi
pop esi
pop ebp
mov dword [ecx], 0x7fff
pop ebx
add esp, 0x18
ret
xor ecx, ecx
test eax, eax
pop edi
cmovs eax, ecx
mov ecx, dword [esp + 0x14]
pop esi
mov dword [ecx], eax
mov eax, ebp
pop ebp
pop ebx
add esp, 0x18
ret