Function at 0x54e0d0
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.00558f60
push esi
push dword [esp + 0x38]
lea edx, [esp + 0x24]
lea ecx, [esp + 0x30]
call fcn.00558f60
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 0x54e1ad
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 0x54e170
mov eax, dword [esp + 0x34]
xor edx, edx
cmp esi, eax
jge 0x54e1c8
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.005412a0
add esp, 4
cmp eax, 0x4000
jle 0x54e1ef
mov eax, 0x4000
jmp 0x54e1f9
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.0054b890
mov ecx, dword [esp + 0x10]
mov edi, eax
mov eax, dword [esp + 0x38]
shl edi, cl
sub edi, ebx
movzx ecx, ax
cmp eax, esi
movzx edx, si
movzx eax, di
cmovg edx, ecx
sar edi, 0x10
movsx ecx, dx
imul eax, ecx
imul edi, ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x30]
sar eax, 0x10
add ebx, eax
movsx eax, bp
mov ebp, dword [esp + 0x14]
add ebx, edi
mov edi, dword [esp + 0x24]
movzx edx, bp
imul edx, eax
sar ebp, 0x10
imul ebp, eax
movzx eax, di
sar edi, 0xc
sar edx, 0x10
and edi, 0xfffffff0
mov dword [ecx], ebx
add edx, ebp
mov ebp, dword [esp + 0x34]
movsx esi, bp
imul eax, esi
imul edi, esi
shl edx, 6
sar eax, 0xc
and eax, 0xfffffff0
sub edx, eax
mov eax, dword [esp + 0x1c]
sub edx, edi
mov edi, dword [ecx + 4]
add eax, edx
mov ecx, eax
call fcn.0054b890
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
sar eax, 0x10
add eax, edi
add ecx, eax
mov eax, dword [esp + 0x30]
cmp ebx, 1
mov dword [eax + 4], ecx
cmovg edx, ebx
push 0xe
call fcn.005412a0
add esp, 4
cmp eax, 0x7fff
jle 0x54e30d
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