Function at 0x10009760
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 0x10009ab9
push ebx
push ebp
push edi
jmp 0x10009784
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 0x100097c1
movzx edx, word [ebx + 8]
mov dword [esi + 0x40], edx
jmp 0x10009aa8
cmp ecx, 0xffffffff
jne 0x10009894
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 0x10009865
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 0x10009821
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 0x1000985a
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 0x10009aa8
mov eax, dword [esi + 0xc]
add eax, edx
push eax
jmp 0x10009a9f
mov ecx, dword [ebx + 4]
cmp ecx, ebp
jne 0x100098be
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 0x10009aa8
cmp ecx, 0xffffffff
jne 0x10009979
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 0x10009962
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 0x1000991e
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 0x10009957
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 0x10009876
test edi, edi
jne 0x10009981
mov ecx, edx
jmp 0x10009986
mov ecx, dword [esi + 0x18]
sub ecx, edi
mov dword [esp + 0x14], ecx
lea ebx, [ebx]
cmp edi, ecx
jae 0x1000999d
mov edx, dword [esi + 0x18]
sub edx, ecx
add edi, edx
jmp 0x1000999f
sub edi, ecx
mov edx, dword [esp + 0xc]
lea ecx, [edi + edi*2]
mov ecx, dword [edx + ecx*4 + 4]
cmp ecx, ebp
je 0x100099b9
cmp ecx, 0xffffffff
je 0x100099e3
mov ecx, dword [esp + 0x14]
jmp 0x10009990
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 0x10009aa8
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 0x10009a71
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 0x10009a2e
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 0x10009a62
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 0x10009aa8
mov edx, dword [esi + 0xc]
add edx, 1
push edx
push esi
call fcn.10009610
add esp, 8
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x20], eax
jne 0x10009780
pop edi
pop ebp
pop ebx
add esp, 0x10
ret