Function at 0x10009ec0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
mov eax, dword [esi + 0x14]
mov dword [esp], eax
mov eax, dword [esp + 0x14]
add ecx, eax
cmp eax, ecx
mov dword [esp + 0xc], ecx
je 0x1000a219
push ebx
push ebp
push edi
jmp 0x10009ee4
mov eax, dword [esp + 0x20]
movzx edi, byte [eax]
mov ebx, dword [esp + 0xc]
mov edx, 1
add eax, edx
mov ebp, edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x40]
shl edi, 4
xor edi, eax
lea ecx, [edi + edi*2]
shl ebp, 0xc
lea ebx, [ebx + ecx*4]
mov ecx, dword [ebx]
or ebp, eax
cmp ecx, ebp
jne 0x10009f21
movzx edx, word [ebx + 8]
mov dword [esi + 0x40], edx
jmp 0x1000a208
cmp ecx, 0xffffffff
jne 0x10009ff4
mov ecx, dword [esi + 8]
shl eax, cl
or dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
add eax, ecx
cmp eax, 0x10
mov dword [esi + 8], eax
jl 0x10009fc5
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x28]
mov dword [esp + 0x14], ebx
mov bl, byte [esi + 0x4c]
mov byte [ecx + eax], bl
add dword [esi + 0x30], edx
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
mov ebx, dword [esp + 0x14]
jne 0x10009f81
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
call eax
add esp, 0xc
mov dword [esi + 0x30], 0
mov edx, 1
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x30]
mov edi, dword [esi + 0x28]
shr ecx, 8
mov byte [eax + edi], cl
add dword [esi + 0x30], edx
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
jne 0x10009fba
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
call eax
add esp, 0xc
mov dword [esi + 0x30], 0
mov edx, 1
movzx ecx, word [esi + 0x4e]
add dword [esi + 8], 0xfffffff0
mov dword [esi + 0x4c], ecx
mov eax, dword [esp + 0x10]
mov dword [esi + 0x40], eax
mov dword [ebx], ebp
mov cx, word [esi + 0x44]
mov word [ebx + 8], cx
add dword [esi + 0x44], edx
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x44]
add ecx, edx
cmp eax, ecx
jbe 0x1000a208
mov eax, dword [esi + 0xc]
add eax, edx
push eax
jmp 0x1000a1ff
mov ecx, dword [ebx + 4]
cmp ecx, ebp
jne 0x1000a01e
movzx ecx, word [ebx + 0xa]
mov dword [esi + 0x40], ecx
mov edx, dword [ebx]
mov ax, word [ebx + 8]
mov dword [ebx + 4], edx
mov word [ebx + 0xa], ax
mov dword [ebx], ebp
mov cx, word [esi + 0x40]
mov word [ebx + 8], cx
jmp 0x1000a208
cmp ecx, 0xffffffff
jne 0x1000a0d9
mov ecx, dword [esi + 8]
shl eax, cl
or dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
add eax, ecx
cmp eax, 0x10
mov dword [esi + 8], eax
jl 0x1000a0c2
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x28]
mov dword [esp + 0x14], ebx
mov bl, byte [esi + 0x4c]
mov byte [ecx + eax], bl
add dword [esi + 0x30], edx
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
mov ebx, dword [esp + 0x14]
jne 0x1000a07e
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
call eax
add esp, 0xc
mov dword [esi + 0x30], 0
mov edx, 1
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x30]
mov edi, dword [esi + 0x28]
shr ecx, 8
mov byte [eax + edi], cl
add dword [esi + 0x30], edx
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
jne 0x1000a0b7
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
call eax
add esp, 0xc
mov dword [esi + 0x30], 0
mov edx, 1
movzx ecx, word [esi + 0x4e]
add dword [esi + 8], 0xfffffff0
mov dword [esi + 0x4c], ecx
mov eax, dword [esp + 0x10]
mov dword [esi + 0x40], eax
mov dword [ebx + 4], ebp
mov cx, word [esi + 0x44]
mov word [ebx + 0xa], cx
jmp 0x10009fd6
test edi, edi
jne 0x1000a0e1
mov ecx, edx
jmp 0x1000a0e6
mov ecx, dword [esi + 0x18]
sub ecx, edi
mov dword [esp + 0x14], ecx
lea ebx, [ebx]
cmp edi, ecx
jae 0x1000a0fd
mov edx, dword [esi + 0x18]
sub edx, ecx
add edi, edx
jmp 0x1000a0ff
sub edi, ecx
mov edx, dword [esp + 0xc]
lea ecx, [edi + edi*2]
mov ecx, dword [edx + ecx*4 + 4]
cmp ecx, ebp
je 0x1000a119
cmp ecx, 0xffffffff
je 0x1000a143
mov ecx, dword [esp + 0x14]
jmp 0x1000a0f0
lea eax, [edi + edi*2]
movzx ecx, word [edx + eax*4 + 0xa]
lea eax, [edx + eax*4]
mov dword [esi + 0x40], ecx
mov edx, dword [ebx]
mov dword [eax + 4], edx
mov cx, word [ebx + 8]
mov word [eax + 0xa], cx
mov dword [ebx], ebp
mov dx, word [esi + 0x40]
mov word [ebx + 8], dx
jmp 0x1000a208
mov ecx, dword [esi + 8]
shl eax, cl
mov ebx, 1
or dword [esi + 0x4c], eax
mov eax, dword [esi + 0xc]
add eax, ecx
cmp eax, 0x10
mov dword [esi + 8], eax
jl 0x1000a1d1
mov ecx, dword [esi + 0x30]
mov al, byte [esi + 0x4c]
mov edx, dword [esi + 0x28]
mov byte [ecx + edx], al
add dword [esi + 0x30], ebx
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
jne 0x1000a18e
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
call eax
add esp, 0xc
mov dword [esi + 0x30], 0
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x28]
shr ecx, 8
mov byte [edx + eax], cl
add dword [esi + 0x30], ebx
mov ecx, dword [esi + 0x30]
mov eax, dword [esi + 0x2c]
cmp ecx, eax
jne 0x1000a1c2
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push eax
mov eax, dword [esi + 0x1c]
push ecx
push edx
call eax
add esp, 0xc
mov dword [esi + 0x30], 0
movzx ecx, word [esi + 0x4e]
add dword [esi + 8], 0xfffffff0
mov edx, dword [esp + 0xc]
mov dword [esi + 0x4c], ecx
mov eax, dword [esp + 0x10]
mov dword [esi + 0x40], eax
lea ecx, [edi + edi*2]
lea eax, [edx + ecx*4]
mov dword [eax + 4], ebp
mov dx, word [esi + 0x44]
mov word [eax + 0xa], dx
add dword [esi + 0x44], ebx
mov ecx, dword [esi + 0x48]
mov eax, dword [esi + 0x44]
add ecx, ebx
cmp eax, ecx
jbe 0x1000a208
mov edx, dword [esi + 0xc]
add edx, 1
push edx
push esi
call fcn.10009d70
add esp, 8
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x20], eax
jne 0x10009ee0
pop edi
pop ebp
pop ebx
add esp, 0x10
ret