Function at 0x10052f20
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
mov dword [ebp - 8], 0
push edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 8]
push dword [esi + 0x68]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ebx, dword [ebp + 8]
test byte [ebx + 0x28], 2
je 0x10052f63
mov ecx, dword [esi + 8]
mov eax, dword [ecx]
call dword [eax + 0xec]
mov ecx, dword [ebp - 0x18]
xor eax, eax
mov edx, 0x1ff
mov dword [ebp - 0xc], eax
xor esi, esi
mov dword [ebp - 0x10], eax
xor edi, edi
cmp word [ecx + 0x41c], dx
jne 0x10052f9e
mov ecx, dword [ebx + 0x10]
mov eax, dword [ecx + 0xc]
cmp dword [eax + 8], 4
jne 0x10052fa2
movzx edx, word [ecx + 0x14]
mov eax, 1
dec edx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
jmp 0x10052fa6
xor edx, edx
jmp 0x10052fa6
xor edx, edx
xor eax, eax
test eax, eax
je 0x10052fb3
mov ecx, edx
not ecx
shr ecx, 0x1f
jmp 0x10052fc1
mov eax, dword [ebx + 0x10]
xor ecx, ecx
movzx eax, word [eax + 0x14]
cmp edx, eax
setl cl
test ecx, ecx
je 0x100530d0
mov eax, dword [ebx + 0x10]
lea ecx, [edx + edx*2]
shl ecx, 4
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
mov ebx, dword [eax + 0xc]
add ebx, ecx
cmp dword [ebp - 0xc], 0
je 0x1005303f
test edx, edx
jle 0x10053037
movzx ecx, word [ebx - 0x24]
mov eax, dword [eax + 0x1c]
cmp dword [eax + ecx*4], 0
je 0x10053012
test esi, esi
jne 0x10052ffb
mov esi, dword [ebx + 0x20]
add dword [ebp - 4], esi
xor edi, edi
mov eax, dword [ebp - 0x10]
xor esi, esi
mov ecx, dword [ebp - 4]
test eax, eax
cmovne ecx, eax
mov dword [ebp - 0x10], ecx
jmp 0x1005303f
test esi, esi
jne 0x10053019
mov esi, dword [ebx + 0x20]
test edi, edi
jne 0x10053027
mov eax, dword [ebx + 0x1c]
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov eax, dword [ebp - 0x10]
test eax, eax
mov ecx, dword [ebp - 4]
cmovne ecx, eax
mov dword [ebp - 0x10], ecx
jmp 0x1005303f
jne 0x1005303f
mov eax, dword [ebp - 0x10]
add dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 4]
sub eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
push eax
mov eax, dword [ecx]
add eax, edi
push eax
push ebx
push ecx
mov ecx, dword [ebp - 0x14]
call fcn.100519c0
cmp dword [ebp - 0xc], 0
mov edx, dword [ebp - 8]
jne 0x100530b8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
movzx eax, word [ecx + 0x14]
dec eax
cmp edx, eax
jge 0x100530b8
mov eax, dword [ecx + 0xc]
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 8]
movzx ecx, word [eax + ecx + 0x3c]
mov eax, dword [edx + 0x10]
mov edx, dword [ebp - 8]
mov eax, dword [eax + 0x1c]
cmp dword [eax + ecx*4], 0
je 0x100530a0
test esi, esi
jne 0x10053097
mov esi, dword [ebx + 0x20]
add dword [ebp - 4], esi
xor edi, edi
xor esi, esi
jmp 0x100530b8
test esi, esi
jne 0x100530a7
mov esi, dword [ebx + 0x20]
test edi, edi
jne 0x100530b8
mov eax, dword [ebx + 0x1c]
cdq
sub eax, edx
mov edx, dword [ebp - 8]
mov edi, eax
sar edi, 1
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp + 8]
xor eax, 1
lea edx, [edx + eax*2]
mov eax, dword [ebp - 0xc]
dec edx
mov dword [ebp - 8], edx
jmp 0x10052fa6
mov eax, dword [ebp - 0x18]
mov ecx, 0x400
test word [eax + 0xa], cx
je 0x10053165
mov eax, dword [ebx + 4]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x60]
mov eax, dword [eax]
movzx eax, byte [eax + 0xe]
dec eax
mov dword [ebp - 0x10], eax
cmp eax, 0xb
ja 0x10053165
mov ecx, dword [ebx + 0x10]
xor edx, edx
xor esi, esi
mov dword [ebp + 8], edx
mov dword [ebp - 0x18], edx
cmp si, word [ecx + 0x14]
jae 0x10053165
xor edi, edi
nop word [eax + eax]
movzx eax, word [eax*2 + 0x100c6208]
mov esi, dword [ecx + 0xc]
mov ecx, dword [ebp - 0x14]
add esi, edi
push eax
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
push ebx
add eax, edx
push eax
push dword [ebp - 0x1c]
push esi
call fcn.10052540
mov edx, dword [ebp + 8]
add edi, 0x30
add edx, dword [esi + 0x20]
mov ecx, dword [ebx + 0x10]
mov esi, dword [ebp - 0x18]
inc esi
mov dword [ebp + 8], edx
mov dword [ebp - 0x18], esi
movzx eax, word [ecx + 0x14]
cmp esi, eax
mov eax, dword [ebp - 0x10]
jl 0x10053120
mov ecx, dword [ebp - 0x14]
push ebx
call fcn.1004ee30
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4