Function at 0x100794d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, dword [esi + 0x1cec8]
mov eax, dword [esi + 0x1cebc]
inc byte [eax + ecx*8]
mov eax, dword [esi + 0x1cebc]
mov ecx, dword [esi + 0x1cec8]
movsx edx, word [eax + ecx*8 + 2]
movzx ecx, byte [eax + ecx*8]
mov eax, edx
cdq
idiv ecx
movzx ebp, byte [eax + esi + 0x1aed8]
test ebp, ebp
je 0x1007951c
mov ebx, dword [esi + 0x28]
mov ecx, 0x20
sub ecx, ebp
shr ebx, cl
jmp 0x1007951e
xor ebx, ebx
push ebp
mov ecx, esi
call fcn.10078400
test dword [esi + 0x28], 0x80000000
push 1
je 0x1007953e
mov eax, 1
mov ecx, ebp
shl eax, cl
add ebx, eax
jmp 0x1007951f
mov ecx, esi
call fcn.10078400
mov ecx, dword [esi + 0x1cec8]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
test bl, 1
mov edx, eax
not edx
cmove edx, eax
mov eax, dword [esi + 0x1cebc]
mov dword [esp + 0x14], edx
lea edi, [eax + ecx*8]
movzx eax, byte [edi + 1]
cmp eax, 3
ja case.default.0x10079572
jmp dword [eax*4 + 0x100797a8]
movzx ecx, byte [esi + 0x1ced0]
jmp 0x100795bc
movzx ecx, byte [esi + 0x1ced1]
jmp 0x100795bc
movzx ecx, byte [esi + 0x1ced0]
movzx eax, byte [esi + 0x1ced1]
add ecx, eax
shr ecx, 1
jmp 0x100795bc
movzx eax, byte [esi + 0x1ced2]
movzx ecx, byte [esi + 0x1ced0]
sub ecx, eax
movzx eax, byte [esi + 0x1ced1]
add ecx, eax
jmp 0x100795bc
xor ecx, ecx
lea eax, [ecx + edx]
mov byte [esi + 0x1ced4], al
sub al, byte [esi + 0x1ced0]
movzx eax, al
movzx eax, byte [eax + esi + 0x1b6d8]
add byte [edi + 4], al
mov eax, dword [esi + 0x1cebc]
mov ecx, dword [esi + 0x1cec8]
mov bl, byte [eax + ecx*8 + 4]
lea ecx, [eax + ecx*8]
movzx eax, byte [esi + 0x1ced4]
sub al, byte [esi + 0x1ced1]
movzx eax, al
movzx ebp, bl
movzx eax, byte [eax + esi + 0x1b6d8]
add byte [ecx + 5], al
mov ecx, dword [esi + 0x1cec8]
mov eax, dword [esi + 0x1cebc]
cmp byte [eax + ecx*8 + 5], bl
lea edx, [eax + ecx*8]
movzx edi, byte [edx + 5]
movzx eax, byte [esi + 0x1ced0]
mov ebx, edi
movzx ecx, byte [esi + 0x1ced1]
cmovae ebx, ebp
add ecx, eax
movzx eax, byte [esi + 0x1ced4]
shr ecx, 1
sub al, cl
movzx eax, al
movzx eax, byte [eax + esi + 0x1b6d8]
add byte [edx + 6], al
cmp edi, ebp
mov eax, dword [esi + 0x1cebc]
mov edi, 2
mov ecx, dword [esi + 0x1cec8]
movzx edx, byte [eax + ecx*8 + 6]
lea ecx, [eax + ecx*8]
sbb eax, eax
neg eax
cmp edx, ebx
cmovb eax, edi
mov dword [esp + 0x10], eax
movzx eax, byte [esi + 0x1ced2]
sub al, byte [esi + 0x1ced1]
sub al, byte [esi + 0x1ced0]
add al, byte [esi + 0x1ced4]
movzx eax, al
movzx eax, byte [eax + esi + 0x1b6d8]
add byte [ecx + 7], al
cmp edx, ebx
mov ecx, dword [esi + 0x1cec8]
mov eax, dword [esi + 0x1cebc]
cmovae edx, ebx
lea edi, [eax + ecx*8]
mov ecx, 3
movzx eax, byte [edi + 7]
cmp eax, edx
mov eax, dword [esp + 0x10]
cmovb eax, ecx
mov ecx, dword [edi + 4]
test ecx, 0x80808080
je 0x100796da
shr ecx, 1
and ecx, 0x7f7f7f7f
mov dword [edi + 4], ecx
mov edx, dword [esi + 0x1cec8]
mov ecx, dword [esi + 0x1cebc]
mov byte [ecx + edx*8 + 1], al
mov edx, dword [esi + 0x1cec8]
mov ecx, dword [esi + 0x1cebc]
mov eax, dword [esp + 0x14]
lea ecx, [ecx + edx*8]
cdq
xor eax, edx
sub eax, edx
add word [ecx + 2], ax
mov ecx, dword [esi + 0x1cec8]
mov eax, dword [esi + 0x1cebc]
cmp byte [eax + ecx*8], 0x80
jne 0x1007972d
mov byte [eax + ecx*8], 0x40
mov ecx, dword [esi + 0x1cec8]
mov eax, dword [esi + 0x1cebc]
sar word [eax + ecx*8 + 2], 1
mov eax, dword [esi + 0x1cecc]
sub eax, 0
je 0x1007978b
sub eax, 1
je 0x1007976a
sub eax, 1
jne 0x100797a0
mov ecx, dword [esi + 0x1cec4]
add ecx, dword [esi + 0x1b7e0]
pop edi
movzx eax, byte [ecx - 1]
imul eax, eax, 0xb
sar eax, 4
sub al, 0x80
add al, byte [esi + 0x1ced4]
pop esi
pop ebp
mov byte [ecx], al
pop ebx
add esp, 8
ret
mov ecx, dword [esi + 0x1cec4]
add ecx, dword [esi + 0x1b7e0]
pop edi
mov al, byte [ecx - 1]
sub al, 0x80
add al, byte [esi + 0x1ced4]
pop esi
pop ebp
mov byte [ecx], al
pop ebx
add esp, 8
ret
mov edx, dword [esi + 0x1cec4]
mov ecx, dword [esi + 0x1b7e0]
mov al, byte [esi + 0x1ced4]
mov byte [edx + ecx], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret