Function at 0x10005690
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x38], edx
push edi
mov ebx, dword [esi + 0x10]
mov edi, dword [esi]
cmp ebx, 3
jae 0x100056c9
inc dword [esi + 4]
lea eax, [edi + 1]
inc dword [esi + 0x14]
mov dword [esi], eax
mov eax, dword [esi + 4]
cmp eax, dword [esi + 8]
jne 0x100056c0
call fcn.10006550
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
movzx ecx, byte [edi]
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
mov dword [ebp - 0x2c], 2
movzx eax, byte [edi + 1]
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], 0
xor ecx, dword [esi + eax*4 + 0x60]
mov eax, dword [esi + 0x24]
movzx ecx, cx
mov edx, dword [eax + ecx*4]
lea ecx, [eax + ecx*4]
mov eax, dword [esi + 4]
mov dword [ecx], eax
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x30]
mov dword [ebp - 0x40], eax
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x28], eax
mov eax, dword [esi]
mov dword [ebp - 4], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x14], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x1c], 0
lea edx, [eax + edx*8]
mov dword [ebp - 8], edx
lea eax, [edx + 4]
mov dword [ebp - 0xc], eax
test ecx, ecx
je 0x10005852
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x3c]
dec ecx
sub edx, eax
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x18], edx
cmp edx, ecx
jae 0x1000584c
cmp dword [ebp - 0x24], edx
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0x28]
sub eax, edx
add eax, dword [ebp - 0x24]
lea ecx, [ecx + eax*8]
mov eax, dword [ebp - 4]
sub eax, edx
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x34]
mov ecx, dword [ecx]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
cmp edx, eax
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp - 0x10]
cmovb eax, edx
mov edx, dword [ebp - 4]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edx]
mov edx, dword [ebp - 0x18]
jne 0x100057ee
inc eax
cmp eax, ebx
je 0x100057d4
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edx]
mov edx, dword [ebp - 0x18]
jne 0x100057d4
inc eax
cmp eax, ebx
je 0x100057d4
mov ecx, dword [ebp - 4]
mov edi, dword [ebp - 0x10]
sub edi, ecx
lea edx, [eax + ecx]
mov cl, byte [edi + edx]
cmp cl, byte [edx]
jne 0x100057ce
inc eax
inc edx
cmp eax, ebx
jne 0x100057c1
mov edx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x30]
cmp dword [ebp - 0x2c], eax
jae 0x100057ee
mov dword [edi], eax
lea ecx, [edx - 1]
mov dword [edi + 4], ecx
add edi, 8
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], edi
cmp eax, ebx
je 0x10005837
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
mov cl, byte [eax + ecx]
cmp cl, byte [eax + edx]
mov edx, dword [ebp - 0x14]
jae 0x10005814
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
mov dword [ecx], edx
mov edx, dword [ebp - 0x20]
add edx, 4
mov dword [ebp - 8], edx
mov ecx, edx
jmp 0x10005825
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
mov dword [ecx], edx
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
mov eax, dword [ecx]
mov ecx, dword [ebp - 0x44]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x10005746
jmp 0x1000584f
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x48]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 4]
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
jmp 0x1000585e
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov dword [edx], 0
mov dword [eax], 0
sub edi, dword [ebp - 0x38]
inc dword [esi + 4]
inc dword [esi + 0x14]
inc dword [esi]
mov ecx, dword [esi + 4]
sar edi, 2
cmp ecx, dword [esi + 8]
jne 0x1000587b
mov ecx, esi
call fcn.10006550
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret