Function at 0x100c7460
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x1c
mov ecx, dword [esp + 0x2c]
xor eax, eax
cmp dword [esp + 0x30], 4
push ebp
mov ebp, ecx
mov dword [esp + 4], eax
mov dword [esp + 0x14], eax
jb 0x100c770d
mov edx, dword [ecx]
push edi
mov edi, edx
and edi, 0xf
add edi, 5
cmp edi, 0xf
jbe 0x100c749c
pop edi
mov eax, 0xffffffd4
pop ebp
add esp, 0x1c
ret 0x14
mov eax, dword [esp + 0x30]
mov ecx, edi
push ebx
push esi
mov esi, 1
shr edx, 4
shl esi, cl
mov ebx, 4
mov dword [eax], edi
inc edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x18], edi
lea eax, [esi + 1]
mov dword [esp + 0x14], eax
cmp eax, 1
jle 0x100c76de
nop
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esi]
mov esi, dword [esp + 0x38]
ja 0x100c76bd
cmp dword [esp + 0x20], 0
je 0x100c75c1
mov edi, ecx
cmp dx, 0xffff
jne 0x100c752b
mov esi, dword [esp + 0x40]
add esi, 0xfffffffb
add esi, dword [esp + 0x3c]
add edi, 0x18
cmp ebp, esi
jae 0x100c7516
mov edx, dword [ebp + 2]
add ebp, 2
mov ecx, ebx
shr edx, cl
jmp 0x100c751c
shr edx, 0x10
add ebx, 0x10
cmp dx, 0xffff
je 0x100c7503
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
mov eax, edx
and eax, 3
cmp al, 3
jne 0x100c7546
shr edx, 2
add edi, 3
mov eax, edx
add ebx, 2
and eax, 3
cmp al, 3
je 0x100c7534
mov eax, edx
add ebx, 2
and eax, 3
add edi, eax
mov eax, dword [esp + 0x34]
cmp edi, dword [eax]
ja 0x100c76cf
cmp ecx, edi
jae 0x100c7582
mov esi, ecx
xor eax, eax
mov ecx, edi
sub ecx, dword [esp + 0x10]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x30]
shr ecx, 1
lea edi, [edi + esi*2]
mov esi, dword [esp + 0x38]
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
add eax, 0xfffffff9
add eax, edi
cmp ebp, eax
jbe 0x100c75ac
mov eax, dword [esp + 0x40]
mov ecx, ebx
sar ecx, 3
add eax, 0xfffffffc
add ecx, ebp
add eax, edi
cmp ecx, eax
jbe 0x100c75ac
shr edx, 2
jmp 0x100c75bd
mov eax, ebx
and ebx, 7
sar eax, 3
mov ecx, ebx
add ebp, eax
mov edx, dword [ebp]
shr edx, cl
mov edi, dword [esp + 0x18]
movzx eax, si
lea ecx, [esi - 1]
mov dword [esp + 0x24], eax
and ecx, edx
add eax, eax
add ebx, edi
mov dword [esp + 0x28], eax
sub eax, dword [esp + 0x14]
dec eax
movzx eax, ax
mov dword [esp + 0x20], eax
movzx eax, dx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
cwde
cmp ecx, eax
jae 0x100c7600
mov eax, dword [esp + 0x24]
dec eax
and eax, dword [esp + 0x1c]
dec ebx
movzx ecx, ax
jmp 0x100c7623
mov esi, dword [esp + 0x28]
dec esi
and esi, dword [esp + 0x1c]
movzx eax, si
movsx edx, ax
sub eax, dword [esp + 0x20]
cmp edx, dword [esp + 0x38]
movzx ecx, ax
movzx eax, si
cmovl ecx, eax
movzx ecx, cx
mov esi, dword [esp + 0x30]
dec ecx
movsx eax, cx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x14]
cwde
sub edx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], edx
mov word [esi + eax*2], cx
inc eax
mov esi, dword [esp + 0x38]
mov dword [esp + 0x10], eax
xor eax, eax
test cx, cx
sete al
mov dword [esp + 0x20], eax
cmp edx, esi
jge 0x100c766f
nop dword [eax]
sar esi, 1
dec edi
cmp edx, esi
jl 0x100c7660
mov dword [esp + 0x18], edi
mov dword [esp + 0x38], esi
mov edx, dword [esp + 0x3c]
add edx, dword [esp + 0x40]
lea eax, [edx - 7]
cmp ebp, eax
jbe 0x100c7698
mov eax, ebx
lea ecx, [edx - 4]
sar eax, 3
add eax, ebp
cmp eax, ecx
jbe 0x100c7698
sub ebp, edx
lea ebx, [ebx + ebp*8]
mov ebp, ecx
add ebx, 0x20
jmp 0x100c76a2
mov eax, ebx
sar eax, 3
add ebp, eax
and ebx, 7
mov edx, dword [ebp]
mov ecx, ebx
mov eax, dword [esp + 0x14]
and ecx, 0x1f
shr edx, cl
cmp eax, 1
jg 0x100c74d0
mov ecx, dword [esp + 0x10]
cmp eax, 1
je 0x100c76e2
pop esi
pop ebx
pop edi
or eax, 0xffffffff
pop ebp
add esp, 0x1c
ret 0x14
pop esi
pop ebx
pop edi
mov eax, 0xffffffd0
pop ebp
add esp, 0x1c
ret 0x14
xor ecx, ecx
jmp 0x100c76bd
lea eax, [ecx - 1]
mov ecx, dword [esp + 0x34]
pop esi
mov dword [ecx], eax
lea eax, [ebx + 7]
sar eax, 3
mov ecx, 0xffffffb8
sub eax, dword [esp + 0x38]
add eax, ebp
cmp eax, dword [esp + 0x3c]
pop ebx
pop edi
cmova eax, ecx
pop ebp
add esp, 0x1c
ret 0x14
mov eax, 0xffffffb8
pop ebp
add esp, 0x1c
ret 0x14