Function at 0x1000ec10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0xdc
push ebx
push ebp
push esi
push edi
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x65]
mov byte [esp + 0x64], 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 + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [esp + 0x100]
xor eax, eax
cmp edi, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
je 0x1000ef3c
mov esi, dword [esp + 0xfc]
cmp esi, eax
je 0x1000ef3c
mov ebp, dword [esp + 0x104]
cmp ebp, eax
je 0x1000ef3c
mov ebx, dword [esp + 0x110]
lea eax, [esp + 0x64]
push ebx
push eax
push edi
call fcn.1000a080
mov eax, ebx
mov ecx, ebp
and eax, 0xffff
sub ecx, eax
test ecx, ecx
jle 0x1000ecbb
mov edx, ecx
lea edi, [esp + eax + 0x64]
mov eax, 0xa5a5a5a5
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x100]
lea eax, [esp + 0x54]
push eax
push esi
call fcn.1001c140
lea ecx, [esp + 0x18]
lea edx, [esp + 0x9c]
mov esi, dword [esp + 0xf0]
push ecx
mov ecx, dword [esp + 0xfc]
push 0x50
lea eax, [esp + 0x5c]
push edx
push eax
push ecx
push esi
call fcn.1000ef50
cmp ax, 0x4a
je 0x1000eed1
cmp ax, 0xa
je 0x1000eed1
cmp ax, 4
je 0x1000eed1
test ax, ax
jne 0x1000ef40
cmp esi, 7
jne 0x1000ee3c
cmp ebp, 4
lea eax, [esp + 0x1c]
mov ecx, ebp
jb 0x1000ed61
mov dl, byte [esp + ecx + 0x98]
sub ecx, 4
mov byte [eax], dl
inc eax
mov dl, byte [esp + ecx + 0x9d]
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x9e]
inc eax
mov byte [eax], dl
mov dl, byte [esp + ecx + 0x9f]
inc eax
mov byte [eax], dl
inc eax
cmp ecx, 4
jae 0x1000ed2a
mov edi, dword [esp + 0x100]
mov eax, dword [esp + 0x1f]
mov ecx, dword [esp + 0x1e]
mov edx, dword [esp + 0x1d]
and eax, 0xff
shl eax, 8
and ecx, 0xff
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0x1c]
shl eax, 8
or eax, edx
mov edx, dword [esp + 0x108]
shl eax, 8
and ecx, 0xff
or eax, ecx
lea ecx, [edx + edx]
xor ecx, eax
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10c]
jne 0x1000edde
test ecx, ecx
je 0x1000edc0
push ebx
push ecx
push edi
call fcn.1000a080
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x114]
test esi, esi
je 0x1000ee2c
cmp ebp, 4
jb 0x1000ee17
lea edx, [esp + 0x10]
push 4
lea eax, [esp + ebp + 0x64]
push edx
push eax
jmp 0x1000ee0e
test ecx, ecx
je 0x1000edf2
push ebx
lea eax, [esp + 0x20]
push ecx
push eax
call fcn.1000a080
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x114]
test esi, esi
je 0x1000ee2c
cmp ebp, 4
jb 0x1000ee17
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + ebp + 0x1c]
push ecx
push edx
call fcn.1000a080
mov eax, dword [esp + 0x10]
mov cx, word [esp + 0x12]
mov word [esp + 0x16], ax
mov word [esp + 0x14], cx
mov edx, dword [esp + 0x14]
mov dword [esi], edx
pop edi
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0xdc
ret 0x28
cmp esi, 5
jne 0x1000ef3c
cmp dword [esp + 0xf4], 0x12c0216
jne 0x1000ef3c
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
shr edx, 2
cmp edx, 1
jb 0x1000ee7b
lea eax, [esp + edx*4 + 0x9c]
mov esi, dword [eax - 4]
sub eax, 4
mov dword [ecx], esi
add ecx, 4
dec edx
jne 0x1000ee6d
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x1000ee92
push ebx
push eax
lea eax, [esp + 0x24]
push eax
call fcn.1000a080
mov esi, dword [esp + 0x114]
test esi, esi
je 0x1000ee2c
cmp ebp, 0x38
ja 0x1000ee2c
cmp ebp, 4
jb 0x1000eeb8
lea ecx, [esp + 0x10]
push 4
lea edx, [esp + ebp + 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
jmp 0x1000ee26
mov eax, dword [esp + 0x10c]
test eax, eax
je 0x1000eee4
push ebx
push eax
push edi
call fcn.1000a080
mov esi, dword [esp + 0x114]
test esi, esi
je 0x1000ee2c
cmp ebp, 0x38
ja 0x1000ee2c
cmp ebp, 4
jb 0x1000ef12
lea eax, [esp + 0x10]
push 4
lea ecx, [esp + ebp + 0x64]
push eax
push ecx
call fcn.1000a080
mov dx, word [esp + 0x12]
mov ax, word [esp + 0x10]
mov word [esp + 0x14], dx
mov word [esp + 0x16], ax
mov ecx, dword [esp + 0x14]
pop edi
mov dword [esi], ecx
pop esi
pop ebp
xor ax, ax
pop ebx
add esp, 0xdc
ret 0x28
mov ax, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdc
ret 0x28