Function at 0x1000f549
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
imul eax, dword [ebp + 0x10]
and dword [ebp - 8], 0
and dword [ebp - 0xc], 0
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, esi
mov dword [ebp - 0x1c], eax
push edi
mov edi, dword [ebp + 0x20]
lea ecx, [eax + esi]
mov al, byte [ecx - 1]
not al
mov dword [ebp - 0x14], ecx
push edi
mov byte [ecx], al
call fcn.1001273c
pop ecx
cmp esi, dword [ebp - 0x14]
jae 0x1000f5b1
mov esi, dword [ebp - 8]
mov al, byte [ebx]
inc ebx
cmp byte [ebx], al
je 0x1000f594
inc dword [ebp - 0xc]
jmp 0x1000f59a
inc ebx
cmp byte [ebx], al
je 0x1000f594
inc esi
movzx eax, al
push eax
push edi
call fcn.10012786
pop ecx
pop ecx
cmp ebx, dword [ebp - 0x14]
jb 0x1000f588
mov dword [ebp - 8], esi
mov esi, dword [ebp + 8]
mov ebx, dword [edi + 0x5478]
cmp ebx, 1
jne 0x1000f5d9
push ebx
push dword [ebp + 0x14]
call fcn.10012bc2
movzx eax, byte [edi]
push eax
push dword [ebp + 0x14]
call fcn.10012bc2
add esp, 0x10
jmp 0x1000f821
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
and dword [ebp - 4], 0
add eax, eax
mov edx, dword [ebp - 0x1c]
mov ecx, eax
cmp eax, edx
cmovge ecx, edx
mov dword [ebp - 0x18], ecx
xor ecx, ecx
cmp eax, edx
setl cl
mov dword [ebp - 0x10], ecx
cmp ebx, 0x80
jge 0x1000f65b
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
lea eax, [ebx + eax*2]
add eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jge 0x1000f623
xor edx, edx
mov dword [ebp - 0x18], eax
inc edx
mov ecx, edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x10], ecx
cmp ebx, 0x11
jge 0x1000f654
mov eax, dword [ebx*4 + 0x10022a2c]
imul eax, dword [ebp + 0xc]
imul eax, dword [ebp + 0x10]
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, ebx
cmp eax, dword [ebp - 0x18]
jge 0x1000f654
xor ecx, ecx
xor eax, eax
inc eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], eax
jmp 0x1000f657
mov eax, dword [ebp - 4]
test eax, eax
jne 0x1000f662
and dword [edi + 0x5478], 0
mov ebx, dword [ebp + 0x14]
test ecx, ecx
sete al
dec al
and al, 0x80
or al, byte [edi + 0x5478]
movzx eax, al
push eax
push ebx
call fcn.10012bc2
and dword [ebp - 0x18], 0
cmp dword [edi + 0x5478], 0
pop ecx
pop ecx
jle 0x1000f6a9
mov esi, dword [ebp - 0x18]
movzx eax, byte [edi + esi*4]
push eax
push ebx
call fcn.10012bc2
inc esi
pop ecx
pop ecx
cmp esi, dword [edi + 0x5478]
jl 0x1000f690
mov esi, dword [ebp + 8]
cmp dword [ebp - 0x10], 0
jne 0x1000f807
cmp dword [ebp - 4], 0
je 0x1000f814
cmp dword [ebp + 0x10], 0
mov eax, dword [edi + 0x5478]
mov eax, dword [eax*4 + 0x10022a2c]
mov dword [ebp - 0x1c], eax
jle 0x1000f821
mov eax, dword [ebp + 0xc]
add eax, esi
mov byte [ebp + 0xb], 0
mov byte [ebp + 0x23], 0
mov dword [ebp - 0x14], eax
cmp esi, eax
jae 0x1000f744
mov al, byte [esi]
inc esi
movzx eax, al
push eax
push edi
call fcn.100127fb
mov dl, byte [ebp + 0x23]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
shl dl, cl
or dl, al
mov al, byte [ebp + 0xb]
add al, cl
mov byte [ebp + 0x23], dl
mov byte [ebp - 0x18], dl
mov byte [ebp + 0xb], al
cmp al, 8
jb 0x1000f729
push dword [ebp - 0x18]
push ebx
call fcn.10012bc2
mov dl, byte [ebp + 0x23]
xor al, al
pop ecx
pop ecx
mov byte [ebp + 0xb], al
cmp esi, dword [ebp - 0x14]
jb 0x1000f6eb
test al, al
je 0x1000f744
mov cl, 8
sub cl, al
shl dl, cl
movzx eax, dl
push eax
push ebx
call fcn.10012bc2
pop ecx
pop ecx
sub dword [ebp + 0x10], 1
jne 0x1000f6d7
jmp 0x1000f821
mov al, byte [esi]
mov edx, esi
inc esi
mov byte [ebp + 0x10], al
mov dword [ebp + 8], esi
cmp byte [esi], al
jne 0x1000f76a
cmp esi, ecx
jae 0x1000f767
inc esi
cmp byte [esi], al
je 0x1000f75e
mov dword [ebp + 8], esi
mov edi, esi
sub edi, edx
cmp edi, 2
jg 0x1000f79e
cmp dword [ebp - 4], 0
je 0x1000f7c1
movzx eax, al
push eax
push dword [ebp + 0x20]
call fcn.100127fb
mov dword [ebp + 8], eax
pop ecx
pop ecx
cmp edi, 2
jne 0x1000f79b
push eax
push ebx
call fcn.10012bc2
mov eax, dword [ebp + 8]
pop ecx
pop ecx
push eax
jmp 0x1000f7ff
cmp dword [ebp - 4], 0
je 0x1000f7c1
movzx eax, al
push eax
push dword [ebp + 0x20]
call fcn.100127fb
or al, 0x80
movzx eax, al
push eax
push ebx
call fcn.10012bc2
add esp, 0x10
jmp 0x1000f7cc
push dword [ebp + 0x10]
push ebx
call fcn.10012bc2
pop ecx
pop ecx
dec edi
mov ecx, 0xff
cmp edi, ecx
jl 0x1000f7fe
mov eax, edi
xor edx, edx
div ecx
imul ecx, eax, 0xffffff01
mov esi, eax
mov dword [ebp + 0xc], eax
add edi, ecx
push 0xff
push ebx
call fcn.10012bc2
pop ecx
pop ecx
sub esi, 1
jne 0x1000f7e9
mov esi, dword [ebp + 8]
push edi
push ebx
call fcn.10012bc2
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
cmp esi, ecx
jb 0x1000f74f
jmp 0x1000f821
push dword [ebp - 0x1c]
push esi
push ebx
call fcn.10012ab5
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret