Function at 0x10010610
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x30]
test ecx, ecx
jle 0x100108d8
xor eax, eax
cmp dword [esp + 0x34], 1
mov ebx, dword [esp + 0x38]
mov dword [esp + 8], 0
mov ebp, 2
jle 0x100107e8
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp edx, eax
jae 0x10010814
lea esi, cs:[esi]
lea ecx, [edx + 1]
mov dword [esi + 0xc], ecx
movzx edi, byte [edx]
mov dword [esp + 4], edi
cmp ecx, eax
jae 0x10010889
lea edx, [ecx + 1]
mov dword [esi + 0xc], edx
movzx ecx, byte [ecx]
shl ecx, 8
or dword [esp + 4], ecx
mov edi, dword [esp + 4]
sub edi, 0xd800
cmp edi, 0x7ff
ja 0x100108a0
mov ebp, dword [esp + 8]
add ebp, 4
cmp dword [esp + 0x34], ebp
jge 0x100106b0
mov eax, ebp
jmp 0x100107e8
cmp edx, eax
jae 0x10010850
lea ecx, [edx + 1]
mov dword [esi + 0xc], ecx
movzx edx, byte [edx]
cmp ecx, eax
jae 0x10010867
lea eax, [ecx + 1]
mov dword [esi + 0xc], eax
movzx eax, byte [ecx]
shl eax, 8
or eax, edx
sub eax, 0xdc00
cmp eax, 0x3ff
ja 0x100106a0
cmp edi, 0x3ff
ja 0x100106a0
shl edi, 0xa
lea eax, [eax + edi + 0x10000]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
lea edi, [eax - 1]
mov eax, ebx
sub eax, dword [esp + 0x38]
cmp eax, edi
jge 0x100107f8
mov eax, dword [esp + 4]
mov edx, 0x23
or eax, 1
bsr ecx, eax
mov eax, 0xcccccccd
xor ecx, 0x1f
sub edx, ecx
mul edx
mov ecx, edx
shr ecx, 2
lea eax, [ecx + ecx*2 - 3]
lea edx, [eax + eax]
mov eax, 0x100
sar eax, cl
mov dword [esp + 8], edx
movzx ecx, byte [esp + 8]
lea edx, [ebx + 1]
neg eax
mov byte [esp + 0xf], al
mov eax, dword [esp + 4]
shr eax, cl
mov ecx, eax
movzx eax, byte [esp + 0xf]
or eax, ecx
mov ecx, dword [esp + 8]
mov byte [ebx], al
mov eax, edx
sub eax, dword [esp + 0x38]
sub ecx, 6
cmp edi, eax
jle 0x100107f3
mov eax, dword [esp + 4]
lea edx, [ebx + 2]
shr eax, cl
and eax, 0x3f
or eax, 0xffffff80
mov byte [ebx + 1], al
cmp ecx, 5
jle 0x100107d0
mov ecx, dword [esp + 8]
mov eax, edx
sub eax, dword [esp + 0x38]
sub ecx, 0xc
cmp edi, eax
jle 0x100107d0
mov eax, dword [esp + 4]
lea edx, [ebx + 3]
shr eax, cl
and eax, 0x3f
or eax, 0xffffff80
mov byte [ebx + 2], al
cmp ecx, 6
jne 0x100107d0
mov ecx, edx
sub ecx, dword [esp + 0x38]
cmp edi, ecx
jle 0x100107d0
movzx eax, byte [esp + 4]
lea edx, [ebx + 4]
and eax, 0x3f
or eax, 0xffffff80
mov byte [ebx + 3], al
nop
mov ebx, edx
lea eax, [ebp + 1]
cmp eax, dword [esp + 0x34]
jge 0x100106a0
lea eax, [ebp + 2]
cmp dword [esp + 0x34], eax
jge 0x10010800
mov byte [ebx], 0
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, edx
lea esi, [esi]
mov edx, ebx
jmp 0x100107d0
mov dword [esp + 8], ebp
mov edx, dword [esi + 0xc]
mov ebp, eax
mov eax, dword [esi + 0x10]
cmp edx, eax
jb 0x10010658
mov eax, esi
call fcn.1000a8a0
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp edx, eax
jb 0x10010658
mov eax, esi
call fcn.1000a8a0
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp ecx, eax
jae 0x100106a0
xor edx, edx
mov dword [esp + 4], edx
jmp 0x1001066d
mov eax, esi
call fcn.1000a8a0
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp edx, eax
jb 0x100106b8
xor edx, edx
mov eax, esi
mov dword [esp + 4], edx
call fcn.1000a8a0
mov ecx, dword [esi + 0xc]
cmp ecx, dword [esi + 0x10]
mov edx, dword [esp + 4]
jb 0x100106c9
mov eax, ebp
jmp 0x100107e8
mov eax, esi
call fcn.1000a8a0
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp ecx, eax
jb 0x1001066d
nop
mov eax, dword [esp + 4]
test eax, eax
je 0x100106a0
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 4]
mov eax, ebx
sub eax, dword [esp + 0x38]
sub edi, 1
cmp edx, 0x7f
ja 0x10010700
cmp eax, edi
jge 0x100107d2
mov byte [ebx], dl
add ebx, 1
jmp 0x100107d2
mov eax, 0xffffffea
jmp 0x100107eb