Function at 0x100a9dd0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
xor edx, edx
push edi
mov edi, ecx
movzx ecx, word [edi + 8]
mov dword [esp + 0x14], ecx
mov eax, dword [esi + 8]
inc eax
lea ebp, [edi + 8]
imul eax, ecx
movzx ecx, word [edi + 0xa]
lea ebx, [edi + 0xa]
dec eax
div dword [esi + 4]
mov edx, 1
mov dword [esp + 0x20], edx
cmp ecx, eax
jbe 0x100a9e20
mov ecx, eax
nop dword [eax + eax]
movzx eax, word [ebx + 2]
lea ebx, [ebx + 2]
inc edx
cmp eax, ecx
ja 0x100a9e10
mov dword [esp + 0x20], edx
movzx eax, word [edi + edx*2 + 6]
xor edx, edx
imul eax, dword [esi + 4]
movzx ebx, word [ebp]
mov ecx, dword [esi]
div ebx
lea ebx, [ecx - 1]
xor edx, edx
add ebx, eax
mov eax, dword [esp + 0x20]
movzx eax, word [edi + eax*2 + 8]
imul eax, dword [esi + 4]
div dword [esp + 0x14]
sub dword [esi + 8], eax
add eax, ecx
mov dword [esi], eax
mov ecx, dword [esi]
mov eax, ecx
xor eax, ebx
test eax, 0x8000
je 0x100a9e7d
test ecx, 0x4000
je 0x100a9edb
test ebx, 0x4000
jne 0x100a9edb
and ecx, 0x3fff
or ebx, 0x4000
mov dword [esi], ecx
and ecx, 0x7fff
and ebx, 0x7fff
add ecx, ecx
add ebx, ebx
mov dword [esi], ecx
or ebx, 1
mov ecx, dword [esi + 0xc]
cmp ecx, 0x10000
jb 0x100a9ec0
mov eax, dword [esi + 0x14]
cmp eax, dword [esi + 0x18]
jb 0x100a9eae
or cl, 0xff
mov byte [esi + 0x10], 1
jmp 0x100a9eb4
mov cl, byte [eax]
inc eax
mov dword [esi + 0x14], eax
movzx ecx, cl
or ecx, 0x100
mov dword [esi + 0xc], ecx
lea eax, [ecx + ecx]
shr ecx, 7
mov dword [esi + 0xc], eax
and ecx, 1
mov eax, dword [esi + 8]
add eax, eax
or ecx, eax
mov dword [esi + 8], ecx
jmp 0x100a9e52
sub ebx, ecx
mov ecx, dword [esp + 0x20]
inc ebx
dec ecx
mov dword [esi + 4], ebx
movzx ebx, byte [ecx + edi + 0x8a]
lea edx, [ecx + 4]
mov dword [esp + 0x14], ebx
lea edx, [edi + edx*2]
nop dword [eax + eax]
add word [edx], 8
lea edx, [edx - 2]
mov eax, ecx
dec ecx
test eax, eax
jne 0x100a9f00
mov eax, 0xed8
cmp word [ebp], ax
jbe 0x100aa03f
add dword [edi + 4], 0xffffffff
mov esi, dword [edi]
jne 0x100aa010
xor ebx, ebx
mov dword [edi + 4], 0x32
test esi, esi
je 0x100a9f59
mov edx, ebp
nop dword [eax + eax]
movzx ecx, word [edx]
lea edx, [edx + 2]
movzx eax, word [edx]
inc ebx
sub ecx, eax
inc ecx
sar ecx, 1
mov word [edx - 2], cx
mov esi, dword [edi]
cmp ebx, esi
jb 0x100a9f40
xor ebx, ebx
lea eax, [esi - 1]
mov dword [esp + 0x10], ebx
test eax, eax
je 0x100a9fe9
mov edx, 1
mov dword [esp + 0x20], edx
mov eax, edx
mov ecx, esi
cmp edx, esi
jae 0x100a9fd3
lea esi, [ebp + 2]
nop
movzx ecx, word [ebp]
movzx ebx, word [esi]
mov edx, ecx
mov dword [esp + 0x18], edx
cmp cx, bx
jae 0x100a9fc1
mov ecx, dword [esp + 0x20]
mov dl, byte [ecx + edi + 0x89]
mov word [ebp], bx
mov cl, byte [eax + edi + 0x8a]
mov ebx, dword [esp + 0x20]
mov byte [ebx + edi + 0x89], cl
mov ecx, dword [esp + 0x18]
mov word [esi], cx
mov byte [eax + edi + 0x8a], dl
mov ecx, dword [edi]
inc eax
add esi, 2
cmp eax, ecx
jb 0x100a9f80
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
inc ebx
lea eax, [ecx - 1]
inc edx
mov dword [esp + 0x10], ebx
add ebp, 2
mov dword [esp + 0x20], edx
mov esi, ecx
cmp ebx, eax
jb 0x100a9f73
lea edx, [edi + 8]
lea edx, [edx + ebx*2]
nop
mov cx, word [edx + 2]
lea edx, [edx - 2]
add word [edx + 2], cx
mov ecx, ebx
dec ebx
test ecx, ecx
jne 0x100a9ff0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 4
dec esi
lea ecx, [edi + 8]
lea ecx, [ecx + esi*2]
nop word [eax + eax]
shr word [ecx], 1
movzx eax, word [ecx]
movzx edx, word [ecx + 2]
cmp ax, dx
ja 0x100aa035
lea eax, [edx + 1]
mov word [ecx], ax
mov eax, esi
sub ecx, 2
dec esi
test eax, eax
jne 0x100aa020
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xc
ret 4