Function at 0x10054f20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x28
push ebx
mov ebx, dword [esp + 0x30]
cmp dword [ebx], 0
jne 0x10054f45
push 0x11948
call fcn.1005b981
add esp, 4
mov dword [ebx], eax
test eax, eax
jne 0x10054f45
pop ebx
add esp, 0x28
ret
push ebp
push esi
push edi
push ebx
call fcn.10054ea0
xor ebx, ebx
mov dword [esp + 0x1c], 0x1ff
add esp, 4
mov dword [esp + 0x30], 0x2710
mov ebp, 0x102
mov dword [esp + 0x28], ebx
xor esi, esi
mov dword [esp + 0x10], ebp
mov edi, 9
cmp dword [esp + 0x48], ebx
jle 0x10055301
push dword [esp + 0x40]
lea ebx, [ebp - 2]
push 0x80
call fcn.1005c0de
mov ecx, dword [esp + 0x4c]
lea esi, [edi - 8]
add esp, 8
mov dword [esp + 0x1c], edi
mov eax, esi
movzx edx, byte [ecx]
inc ecx
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x48]
dec ecx
mov dword [esp + 0x48], ecx
test ecx, ecx
jle 0x10055259
mov ecx, 0x200
mov dword [esp + 0x20], ecx
mov ebp, dword [esp + 0x44]
inc eax
dec dword [esp + 0x48]
mov dword [esp + 0x14], eax
movzx ecx, byte [ebp]
inc ebp
mov eax, ecx
mov dword [esp + 0x44], ebp
movzx ebp, dx
mov edx, ecx
shl eax, 5
xor eax, ebp
shl edx, 0xc
add edx, ebp
mov dword [esp + 0x34], ecx
cmp eax, 0x2329
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], edx
lea ecx, [eax - 0x2329]
cmovb ecx, eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax]
lea ebp, [eax + ecx*8]
mov eax, dword [ebp]
cmp eax, edx
jne 0x10055022
movzx edx, word [ebp + 4]
mov ebp, dword [esp + 0x10]
jmp 0x1005524a
test eax, eax
js 0x1005505b
mov edx, 0x2329
mov eax, 1
sub edx, ecx
test ecx, ecx
cmove edx, eax
mov ebp, dword [esp + 0x3c]
mov eax, ecx
sub eax, edx
lea ecx, [eax + 0x2329]
cmovns ecx, eax
mov eax, dword [ebp]
lea ebp, [eax + ecx*8]
mov eax, dword [ebp]
cmp eax, dword [esp + 0x2c]
je 0x10055015
test eax, eax
jns 0x10055037
push dword [esp + 0x40]
mov ecx, edi
add esi, 0xfffffff8
shl ebx, cl
add esi, edi
or ebx, dword [esp + 0x28]
mov ecx, esi
mov eax, ebx
shr eax, cl
movzx eax, al
push eax
call fcn.1005c0de
add esp, 8
cmp esi, 8
jl 0x1005509c
push dword [esp + 0x40]
add esi, 0xfffffff8
mov eax, ebx
mov ecx, esi
shr eax, cl
movzx eax, al
push eax
call fcn.1005c0de
add esp, 8
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
movzx edx, ax
add ecx, edi
mov eax, dword [esp + 0x10]
mov word [ebp + 4], ax
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [ebp], eax
mov ebp, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x24], edx
cmp ebp, 0xffe
jne 0x1005515b
push dword [esp + 0x3c]
call fcn.10054ea0
push dword [esp + 0x44]
xor eax, eax
mov dword [esp + 0x30], 0
mov ecx, edi
mov dword [esp + 0x1c], eax
shl ebx, cl
add esi, 0xfffffff8
or ebx, 0x100
add esi, edi
mov ecx, esi
mov eax, ebx
shr eax, cl
mov ebp, 0x102
movzx eax, al
push eax
mov dword [esp + 0x1c], ebp
call fcn.1005c0de
add esp, 0xc
cmp esi, 8
jl 0x10055138
push dword [esp + 0x40]
add esi, 0xfffffff8
mov eax, ebx
mov ecx, esi
shr eax, cl
movzx eax, al
push eax
call fcn.1005c0de
add esp, 8
mov edx, dword [esp + 0x24]
mov ecx, 0x200
mov dword [esp + 0x1c], edi
mov edi, 9
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], 0x1ff
jmp 0x1005524a
mov eax, dword [esp + 0x14]
cmp ebp, dword [esp + 0x18]
jle 0x1005517a
mov ecx, dword [esp + 0x20]
inc edi
rol ecx, 1
mov dword [esp + 0x20], ecx
dec ecx
mov dword [esp + 0x18], ecx
jmp 0x1005524e
mov ebp, dword [esp + 0x10]
cmp eax, dword [esp + 0x30]
jl 0x1005524e
lea ebp, [eax + 0x2710]
mov dword [esp + 0x30], ebp
cmp eax, 0x7fffff
jle 0x100551a7
sar ecx, 8
test ecx, ecx
jne 0x100551aa
mov eax, 0x7fffffff
jmp 0x100551b1
shl eax, 8
cdq
idiv ecx
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x10]
cmp eax, dword [esp + 0x28]
jg 0x10055246
push dword [esp + 0x3c]
call fcn.10054ea0
push dword [esp + 0x44]
xor eax, eax
mov dword [esp + 0x30], 0
mov ecx, edi
mov dword [esp + 0x1c], eax
shl ebx, cl
add esi, 0xfffffff8
or ebx, 0x100
add esi, edi
mov ecx, esi
mov eax, ebx
shr eax, cl
mov ebp, 0x102
movzx eax, al
push eax
mov dword [esp + 0x1c], ebp
call fcn.1005c0de
add esp, 0xc
cmp esi, 8
jl 0x10055138
push dword [esp + 0x40]
add esi, 0xfffffff8
mov eax, ebx
mov ecx, esi
shr eax, cl
movzx eax, al
push eax
call fcn.1005c0de
mov edx, dword [esp + 0x2c]
mov ecx, 0x200
mov dword [esp + 0x24], edi
add esp, 8
mov edi, 9
mov dword [esp + 0x20], ecx
mov dword [esp + 0x18], 0x1ff
jmp 0x1005524a
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x48], 0
jg 0x10054fc4
mov eax, 0xffff
cmp dx, ax
je 0x10055301
push dword [esp + 0x40]
mov ecx, edi
movzx eax, dx
shl ebx, cl
add esi, 0xfffffff8
or ebx, eax
add esi, edi
mov ecx, esi
mov eax, ebx
shr eax, cl
movzx eax, al
push eax
call fcn.1005c0de
add esp, 8
cmp esi, 8
jl 0x100552a9
push dword [esp + 0x40]
add esi, 0xfffffff8
mov eax, ebx
mov ecx, esi
shr eax, cl
movzx eax, al
push eax
call fcn.1005c0de
add esp, 8
inc ebp
cmp ebp, 0xffe
jne 0x100552fa
mov ebp, dword [esp + 0x40]
mov ecx, edi
shl ebx, cl
add esi, 0xfffffff8
or ebx, 0x100
add esi, edi
mov ecx, esi
mov eax, ebx
shr eax, cl
movzx eax, al
push ebp
push eax
call fcn.1005c0de
add esp, 8
cmp esi, 8
jl 0x100552f3
add esi, 0xfffffff8
mov eax, ebx
mov ecx, esi
shr eax, cl
movzx eax, al
push ebp
push eax
call fcn.1005c0de
add esp, 8
mov edi, 9
jmp 0x10055301
cmp ebp, dword [esp + 0x18]
jle 0x10055301
inc edi
mov ecx, edi
add edi, 0xfffffff8
shl ebx, cl
add esi, edi
mov edi, dword [esp + 0x40]
or ebx, 0x101
mov ecx, esi
mov eax, ebx
shr eax, cl
movzx eax, al
push edi
push eax
call fcn.1005c0de
add esp, 8
cmp esi, 8
jl 0x10055342
add esi, 0xfffffff8
mov eax, ebx
mov ecx, esi
shr eax, cl
movzx eax, al
push edi
push eax
call fcn.1005c0de
add esp, 8
test esi, esi
jle 0x1005535c
mov ecx, 8
sub ecx, esi
shl ebx, cl
movzx ecx, bl
push edi
push ecx
call fcn.1005c0de
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x28
ret