Function at 0x1000f4b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xcc
push ebx
push ebp
push esi
push edi
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0xa5]
mov byte [esp + 0xa4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0xe8]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
jne 0x1000f510
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0xcc
ret 0x18
mov ebp, dword [esp + 0xf4]
cmp bp, 0x38
jbe 0x1000f52e
pop edi
pop esi
pop ebp
mov ax, 0x14
pop ebx
add esp, 0xcc
ret 0x18
lea ecx, [esp + 0x1c]
push ebp
push ecx
push eax
call fcn.1000a080
mov edi, ebp
and edi, 0xffff
mov ecx, edi
and ecx, 3
je 0x1000f57a
mov edx, 4
xor eax, eax
sub edx, ecx
je 0x1000f571
mov esi, edi
mov bl, 0xa5
cmp esi, 0x38
jae 0x1000f56b
lea ebp, [edi + eax]
mov byte [esp + ebp + 0x1c], bl
mov ebp, dword [esp + 0xf4]
inc eax
inc esi
cmp eax, edx
jb 0x1000f558
mov edx, 4
sub edx, ecx
add edi, edx
mov al, byte [esp + 0x1c]
mov cl, byte [esp + 0x1d]
mov dl, byte [esp + 0x1e]
mov byte [esp + 0x54], al
mov al, byte [esp + 0x1f]
mov byte [esp + 0x55], cl
mov byte [esp + 0x57], al
cmp edi, 4
mov byte [esp + 0x56], dl
lea eax, [esp + 0x20]
mov ecx, edi
jbe 0x1000f5c9
mov dl, byte [eax]
sub ecx, 4
inc eax
mov byte [esp + ecx + 0x54], dl
mov dl, byte [eax]
inc eax
mov byte [esp + ecx + 0x55], dl
mov dl, byte [eax]
inc eax
mov byte [esp + ecx + 0x56], dl
mov dl, byte [eax]
inc eax
cmp ecx, 4
mov byte [esp + ecx + 0x57], dl
ja 0x1000f5a5
mov esi, dword [esp + 0x1f]
mov eax, dword [esp + 0x1e]
mov ecx, dword [esp + 0x1d]
and esi, 0xff
mov edx, dword [esp + 0x1c]
and eax, 0xff
shl esi, 8
or esi, eax
and ecx, 0xff
shl esi, 8
or esi, ecx
and edx, 0xff
shl esi, 8
mov ecx, dword [esp + 0xe4]
mov eax, 4
or esi, edx
cmp eax, edi
sbb eax, eax
mov edx, edi
neg eax
add eax, 0x12
cmp cx, 0xff
mov dword [esp + 0x18], edx
jbe 0x1000f63a
xor edx, edx
mov eax, 0x27
mov dl, ch
mov byte [esp + edi + 0x54], dl
lea edx, [edi + 2]
mov byte [esp + edi + 0x55], 0
mov dword [esp + 0x18], edx
lea ebx, [esp + 0x18]
and ecx, 0xff
push ebx
lea ebx, [esp + 0x58]
push edi
push ebx
push edx
lea edx, [esp + 0x64]
push edx
push 0
push ecx
push eax
mov eax, dword [esp + 0x100]
push eax
call fcn.1000e0f0
mov ebx, eax
lea eax, [esp + 0xa4]
mov ecx, dword [esp + 0x18]
cmp ecx, 4
jb 0x1000f69c
mov dl, byte [esp + ecx + 0x50]
sub ecx, 4
mov byte [eax], dl
inc eax
mov dl, byte [esp + ecx + 0x55]
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x56]
inc eax
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x57]
inc eax
mov byte [eax], dl
inc eax
cmp ecx, 4
jae 0x1000f674
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0xa7]
mov ecx, dword [esp + 0xa6]
mov edx, dword [esp + 0xa5]
and eax, 0xff
shl eax, 8
and ecx, 0xff
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0xa4]
shl eax, 8
or eax, edx
and ecx, 0xff
shl eax, 8
or eax, ecx
test bl, bl
mov dword [esp + 0x10], eax
jne 0x1000f76a
lea edx, [esi + esi]
xor edx, eax
je 0x1000f76a
mov eax, dword [esp + 0xec]
test eax, eax
je 0x1000f70b
push ebp
push eax
lea eax, [esp + 0xac]
push eax
call fcn.1000a080
mov esi, dword [esp + 0xf0]
test esi, esi
je 0x1000f7e2
cmp edi, 4
jb 0x1000f7e2
cmp edi, 0x38
ja 0x1000f7e2
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + edi + 0xa4]
push ecx
push edx
call fcn.1000a080
pop edi
mov ax, word [esp + 0xe]
mov cx, word [esp + 0xc]
mov word [esp + 0x10], ax
mov word [esp + 0x12], cx
mov edx, dword [esp + 0x10]
mov ax, bx
mov dword [esi], edx
pop esi
pop ebp
pop ebx
add esp, 0xcc
ret 0x18
cmp bx, 3
jne 0x1000f780
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0xcc
ret 0x18
mov eax, dword [esp + 0xec]
test eax, eax
je 0x1000f79a
push ebp
push eax
mov eax, dword [esp + 0xf0]
push eax
call fcn.1000a080
mov esi, dword [esp + 0xf0]
test esi, esi
je 0x1000f7da
cmp edi, 4
jb 0x1000f7da
cmp edi, 0x38
ja 0x1000f7da
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + edi + 0x1c]
push ecx
push edx
call fcn.1000a080
mov ax, word [esp + 0x12]
mov cx, word [esp + 0x10]
mov word [esp + 0x14], ax
mov word [esp + 0x16], cx
mov edx, dword [esp + 0x14]
mov dword [esi], edx
cmp bx, 2
jne 0x1000f7e2
xor ebx, ebx
pop edi
pop esi
mov ax, bx
pop ebp
pop ebx
add esp, 0xcc
ret 0x18