Function at 0x100806d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10269840]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [eax + 4]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], esi
test esi, esi
jns 0x10080723
cmp dword [eax], 0
jg 0x10080723
push dword [ebp + 0xc]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
add ecx, edx
push ecx
push edx
call fcn.1007ef10
add esp, 0xc
mov dword [ebx], edx
mov eax, ebx
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10104603
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
push edi
add ecx, eax
mov dword [ebp - 8], 0
push edx
push ecx
push eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call fcn.10089190
mov edx, dword [ebp - 0x18]
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0x10], eax
mov byte [ebp - 8], 0
cmp edx, dword [ebp - 0x14]
je 0x10080814
nop dword [eax]
mov dword [ebp - 0x20], ebx
cmp ebx, esi
jne 0x1008077f
test esi, esi
jns 0x10080814
mov edi, dword [ebp - 0xc]
cmp edi, 0x25fd
jae 0x100807ad
mov eax, 1
mov ecx, 0x10172180
cmp edi, dword [ecx]
jb 0x100807e7
add ecx, 4
xor eax, 3
cmp ecx, str.properly
jne 0x10080794
mov eax, 1
jmp 0x100807e7
mov eax, 0x10172180
mov edx, 0xca
mov esi, edx
shr esi, 1
cmp edi, dword [eax + esi*4]
lea ecx, [eax + esi*4]
jae 0x100807c7
mov edx, esi
jmp 0x100807d1
lea eax, [ecx + 4]
or ecx, 0xffffffff
sub ecx, esi
add edx, ecx
test edx, edx
jg 0x100807b7
mov esi, dword [ebp - 0x1c]
sub eax, 0x10172180
mov edx, dword [ebp - 0x18]
sar eax, 2
and eax, 1
inc eax
mov ecx, 0x7fffffff
sub ecx, eax
cmp ecx, ebx
jl 0x10080880
add ebx, eax
cmp ebx, esi
jle 0x10080800
test esi, esi
jns 0x1008087b
lea ecx, [ebp - 0x18]
call fcn.100883e0
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x14]
jne 0x10080770
mov dword [ebp - 0x24], edx
mov eax, dword [ebp + 0x10]
xor esi, esi
mov ecx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x20], esi
mov al, byte [eax + 9]
test al, al
movzx edx, al
cmove edx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp + 0x18]
mov edx, dword [edx]
cmp ebx, edx
jge 0x1008088f
mov eax, dword [ebp - 0x1c]
movzx eax, al
sub eax, 1
je 0x100808fc
sub eax, 1
je 0x1008088b
sub eax, 1
jne 0x1008088f
mov eax, edx
sub eax, ebx
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp + 0x18]
sar edi, 1
mov esi, dword [eax]
sub esi, edi
sub esi, ebx
mov dword [ebp - 0x20], esi
jmp 0x10080892
mov ebx, dword [ebp - 0x20]
jmp 0x10080814
test esi, esi
jns 0x10080814
mov ebx, 0x7fffffff
jmp 0x10080817
mov edi, edx
sub edi, ebx
mov eax, dword [ebp + 0x18]
lea ebx, [eax + 0xf]
movzx eax, byte [eax + 0xe]
mov dword [ebp - 0x1c], eax
test edi, edi
jle 0x100808b8
lea esi, [eax + ebx]
push ecx
push esi
push ebx
call fcn.1007ef10
dec edi
add esp, 0xc
mov ecx, edx
test edi, edi
jg 0x100808a3
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
sub edx, eax
push ecx
add edx, eax
push edx
push eax
call fcn.1007ef10
add esp, 0xc
test esi, esi
jle 0x100808e6
add edi, ebx
push edx
push edi
push ebx
call fcn.1007ef10
dec esi
add esp, 0xc
test esi, esi
jg 0x100808d6
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov dword [eax], edx
pop ebx
call fcn.10104603
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x18]
mov esi, edx
sub esi, ebx
movzx edi, byte [eax + 0xe]
lea ebx, [eax + 0xf]
jmp 0x100808bb