Function at 0x100108f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [esp + 0x3c]
test eax, eax
jle 0x10010b70
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x34], 1
mov ebx, 0
mov dword [esp + 8], eax
jle 0x10010980
lea esi, cs:[esi]
nop
lea ebp, [ebx + 2]
cmp dword [esp + 0x34], ebp
jge 0x10010930
mov ebx, ebp
jmp 0x10010980
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
cmp edx, eax
jae 0x10010998
mov esi, dword [esp + 0x30]
lea ecx, [edx + 1]
mov dword [esi + 0xc], ecx
movzx esi, byte [edx]
shl esi, 8
cmp ecx, eax
jae 0x10010bdd
mov edi, dword [esp + 0x30]
lea edx, [ecx + 1]
mov dword [edi + 0xc], edx
movzx ecx, byte [ecx]
or esi, ecx
lea edi, [esi - 0xd800]
cmp edi, 0x7ff
ja 0x10010ba1
add ebx, 4
cmp dword [esp + 0x34], ebx
jge 0x100109d0
mov eax, dword [esp + 8]
mov byte [eax], 0
add esp, 0x1c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
call fcn.1000a8a0
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
cmp edx, eax
jb 0x1001093e
mov eax, dword [esp + 0x30]
call fcn.1000a8a0
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
cmp ecx, eax
jae 0x10010929
xor esi, esi
jmp 0x10010956
cmp edx, eax
jae 0x10010b30
mov esi, dword [esp + 0x30]
lea ecx, [edx + 1]
mov dword [esi + 0xc], ecx
movzx esi, byte [edx]
shl esi, 8
cmp ecx, eax
jae 0x10010b7a
mov edx, dword [esp + 0x30]
lea eax, [ecx + 1]
mov dword [edx + 0xc], eax
movzx eax, byte [ecx]
or esi, eax
sub esi, 0xdc00
cmp esi, 0x3ff
ja 0x10010980
cmp edi, 0x3ff
ja 0x10010980
mov eax, dword [esp + 0x3c]
shl edi, 0xa
lea esi, [esi + edi + 0x10000]
lea edi, [eax - 1]
mov eax, dword [esp + 8]
sub eax, dword [esp + 0x38]
cmp eax, edi
jl 0x10010a58
mov ebp, dword [esp + 8]
mov dword [esp + 8], ebp
lea eax, [ebx + 1]
cmp eax, dword [esp + 0x34]
jl 0x10010920
jmp 0x10010980
mov ecx, esi
mov eax, 0xcccccccd
or ecx, 1
bsr ebp, ecx
mov ecx, 0x23
xor ebp, 0x1f
sub ecx, ebp
mul ecx
mov ecx, edx
mov edx, dword [esp + 8]
shr ecx, 2
lea eax, [ecx + ecx*2 - 3]
lea ebp, [edx + 1]
mov edx, 0x100
add eax, eax
sar edx, cl
mov dword [esp + 0xc], eax
movzx ecx, byte [esp + 0xc]
mov eax, esi
neg edx
shr eax, cl
mov ecx, dword [esp + 0xc]
or edx, eax
mov eax, dword [esp + 8]
sub ecx, 6
mov byte [eax], dl
mov edx, ebp
sub edx, dword [esp + 0x38]
cmp edi, edx
jle 0x10010b98
mov edx, esi
lea ebp, [eax + 2]
shr edx, cl
and edx, 0x3f
or edx, 0xffffff80
mov byte [eax + 1], dl
cmp ecx, 5
jle 0x10010a3e
mov ecx, dword [esp + 0xc]
mov edx, ebp
sub edx, dword [esp + 0x38]
sub ecx, 0xc
cmp edi, edx
jle 0x10010a3e
mov edx, esi
mov eax, dword [esp + 8]
shr edx, cl
and edx, 0x3f
lea ebp, [eax + 3]
or edx, 0xffffff80
mov byte [eax + 2], dl
cmp ecx, 6
jne 0x10010a3e
mov ecx, ebp
sub ecx, dword [esp + 0x38]
cmp edi, ecx
jle 0x10010a3e
and esi, 0x3f
mov edi, dword [esp + 8]
mov eax, esi
or eax, 0xffffff80
lea ebp, [edi + 4]
mov byte [edi + 3], al
jmp 0x10010a3e
mov eax, dword [esp + 0x30]
call fcn.1000a8a0
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
cmp edx, eax
jb 0x100109d8
mov eax, dword [esp + 0x30]
call fcn.1000a8a0
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0xc]
cmp ecx, dword [eax + 0x10]
jae 0x10010980
xor esi, esi
jmp 0x100109f0
mov ebx, 0xffffffea
jmp 0x10010987
mov eax, dword [esp + 0x30]
call fcn.1000a8a0
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0xc]
cmp ecx, dword [eax + 0x10]
jae 0x100109ff
jmp 0x100109f0
mov dword [esp + 8], ebp
jmp 0x10010a3a
test esi, esi
je 0x10010929
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 8]
lea edi, [ebx - 1]
mov eax, ecx
mov ebx, ebp
sub eax, dword [esp + 0x38]
cmp esi, 0x7f
ja 0x10010a2e
cmp eax, edi
jge 0x10010a42
mov eax, esi
mov byte [ecx], al
lea eax, [ecx + 1]
mov dword [esp + 8], eax
jmp 0x10010a42
mov eax, dword [esp + 0x30]
call fcn.1000a8a0
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
mov ecx, edx
cmp edx, eax
jae 0x10010965
jmp 0x10010956