Function at 0x1010f550
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
movzx eax, word [ebx + 0x18]
mov cx, word [ebx + 0x1a]
neg cx
push esi
mov esi, dword [ebp + 0x14]
movsx edx, cx
imul eax, esi
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], ecx
movzx ecx, word [ebx + 0x16]
add ecx, edx
push edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edx
cmp ecx, eax
jae 0x1010f6aa
lea esp, [esp]
movzx ecx, word [ebx + 0x16]
movzx esi, word [ebx + 0x18]
add dword [ebp - 4], ecx
mov edi, dword [ebp - 0xc]
add edx, ecx
mov dword [ebp - 0x14], edx
cmp edx, esi
jb 0x1010f5bd
movzx ecx, word [ebx + 0x18]
jmp 0x1010f5b0
sub edx, esi
inc edi
cmp edx, ecx
jae 0x1010f5b0
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edx
movsx ecx, di
mov edi, ecx
add ecx, 9
mov dword [ebp + 8], 0
mov dword [ebp - 0x18], ecx
cmp edi, ecx
ja 0x1010f663
mov edx, dword [ebp + 0xc]
movzx eax, word [ebx + 0x14]
lea ecx, [edx + edi*2 - 0x12]
lea edx, [edi - 4]
imul edx, esi
sub edx, dword [ebp - 4]
cwde
mov dword [ebp - 0x10], ecx
nop
mov esi, edx
sar esi, 0x1f
mov ecx, edx
xor ecx, esi
sub ecx, esi
mov esi, ecx
and esi, 0xffff
sar ecx, 0x10
imul esi, eax
imul ecx, eax
sar esi, 0xf
lea ecx, [esi + ecx*2]
sar ecx, 6
cmp ecx, 0x12e
jl 0x1010f622
mov ecx, 0x12d
movsx ecx, word [ecx*2 + 0x101d7e28]
cmp edi, 8
ja 0x1010f63e
movsx esi, word [ebx + edi*2]
imul esi, ecx
sar esi, 0xf
add dword [ebp + 8], esi
jmp 0x1010f64d
mov esi, dword [ebp - 0x10]
movsx esi, word [esi]
imul ecx, esi
sar ecx, 0xf
add dword [ebp + 8], ecx
movzx ecx, word [ebx + 0x18]
add dword [ebp - 0x10], 2
inc edi
add edx, ecx
cmp edi, dword [ebp - 0x18]
jbe 0x1010f5f0
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
movsx ecx, word [ebx + 0x12]
imul ecx, dword [ebp + 8]
sar ecx, 0xf
cmp ecx, 0x7fff
jle 0x1010f67d
mov ecx, 0x7fff
jmp 0x1010f68a
cmp ecx, 0xffff8000
jge 0x1010f68a
mov ecx, 0xffff8000
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 0x10]
mov word [edi + esi*2], cx
movzx ecx, word [ebx + 0x16]
add ecx, dword [ebp - 4]
inc esi
mov dword [ebp - 8], esi
cmp ecx, eax
jb 0x1010f590
mov esi, dword [ebp + 0x14]
cmp esi, 8
jbe 0x1010f704
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx + esi*2 - 0x12]
mov word [ebx], dx
movzx edx, word [ecx + esi*2 - 0x10]
mov word [ebx + 2], dx
movzx edx, word [ecx + esi*2 - 0xe]
mov word [ebx + 4], dx
movzx edx, word [ecx + esi*2 - 0xc]
mov word [ebx + 6], dx
movzx edx, word [ecx + esi*2 - 0xa]
mov word [ebx + 8], dx
movzx edx, word [ecx + esi*2 - 8]
mov word [ebx + 0xa], dx
movzx edx, word [ecx + esi*2 - 6]
mov word [ebx + 0xc], dx
movzx edx, word [ecx + esi*2 - 4]
mov word [ebx + 0xe], dx
mov cx, word [ecx + esi*2 - 2]
mov word [ebx + 0x10], cx
jmp 0x1010f742
mov edi, 9
xor ecx, ecx
sub edi, esi
mov dword [ebp + 0x14], edi
je 0x1010f727
lea edx, [ebx + esi*2]
mov di, word [edx]
mov word [ebx + ecx*2], di
mov edi, dword [ebp + 0x14]
inc ecx
add edx, 2
cmp ecx, edi
jb 0x1010f715
xor ecx, ecx
test esi, esi
je 0x1010f742
lea edx, [ebx + edi*2]
mov edi, dword [ebp + 0xc]
mov di, word [edi + ecx*2]
mov word [edx], di
inc ecx
add edx, 2
cmp ecx, esi
jb 0x1010f730
sub eax, dword [ebp - 4]
cmp eax, 0x7fff
jle 0x1010f75f
pop edi
mov eax, 0x7fff
mov word [ebx + 0x1a], ax
mov eax, dword [ebp - 8]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0xffff8000
jge 0x1010f76b
mov eax, 0xffff8000
pop edi
mov word [ebx + 0x1a], ax
mov eax, dword [ebp - 8]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret