Function at 0x669210
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x18], 0
jmp 0x66926a
mov eax, dword [ebp - 0x18]
sar eax, 3
mov edx, eax
mov eax, dword [ebp - 0x20]
add eax, edx
movzx eax, byte [eax]
movzx edx, al
mov eax, dword [ebp - 0x18]
and eax, 7
mov ecx, eax
sar edx, cl
mov eax, edx
mov ecx, eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
and ecx, 1
mov edx, ecx
mov byte [eax], dl
add dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0xff
jle 0x669236
mov dword [ebp - 0x18], 0
jmp 0x66940e
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x66940a
mov dword [ebp - 0x14], 1
jmp 0x6693ee
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x6693ea
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
movsx edx, al
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
add eax, edx
cmp eax, 0xf
jg 0x669339
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx edx, byte [eax]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
mov ebx, eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, ecx
add edx, ebx
mov byte [eax], dl
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov edx, eax
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 0
jmp 0x6693ea
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
movsx edx, al
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
sub edx, eax
mov eax, edx
cmp eax, 0xfffffff1
jl 0x669409
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx edx, byte [eax]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, ecx
mov ecx, eax
mov eax, dword [ebp - 0x1c]
add eax, ecx
movzx eax, byte [eax]
movsx ebx, al
mov eax, dword [ebp - 0x14]
mov ecx, eax
shl ebx, cl
mov eax, ebx
mov ebx, eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
add eax, ecx
sub edx, ebx
mov byte [eax], dl
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ebp - 0x10], eax
jmp 0x6693e1
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
test al, al
jne 0x6693d2
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 1
jmp 0x6693ea
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 0
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0xff
jle 0x6693b6
add dword [ebp - 0x14], 1
cmp dword [ebp - 0x14], 6
jg 0x66940a
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
add eax, edx
cmp eax, 0xff
jle 0x66929e
jmp 0x66940a
nop
add dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0xff
jle 0x66927f
nop
mov eax, dword [ebp - 0xc]
xor eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
je 0x66942c
call sub.libssp_0.dll___stack_chk_fail
add esp, 0x24
pop ebx
pop ebp
ret