Function at 0x1002e140
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x2c
push ebp
mov ebp, dword [eax + 4]
test ebp, ebp
jns 0x1002e177
cmp dword [eax], 0
jg 0x1002e177
push dword [esp + 0x38]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
add eax, ecx
push eax
push ecx
call fcn.1002c600
mov eax, dword [esp + 0x40]
add esp, 0xc
mov dword [eax], edx
pop ebp
add esp, 0x2c
ret
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x28]
mov ecx, dword [esp + 0x40]
push ebx
push esi
push edi
add ecx, eax
mov dword [esp + 0x28], eax
push edx
push ecx
push eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
call fcn.1003e5d0
mov edx, dword [esp + 0x34]
add esp, 0xc
xor ebx, ebx
mov dword [esp + 0x30], eax
mov byte [esp + 0x38], 0
cmp edx, dword [esp + 0x2c]
je 0x1002e279
mov esi, ebx
mov dword [esp + 0x14], esi
cmp ebx, ebp
jne 0x1002e1da
test ebp, ebp
jns 0x1002e279
mov edi, dword [esp + 0x34]
cmp edi, 0x25fd
jae 0x1002e209
mov eax, 1
mov ecx, 0x10072dc0
cmp edi, dword [ecx]
jb 0x1002e245
add ecx, 4
xor eax, 3
cmp ecx, 0x100730e8
jne 0x1002e1f0
mov eax, 1
jmp 0x1002e245
mov eax, 0x10072dc0
mov edx, 0xca
mov esi, edx
shr esi, 1
cmp edi, dword [eax + esi*4]
lea ecx, [eax + esi*4]
jae 0x1002e223
mov edx, esi
jmp 0x1002e22d
lea eax, [ecx + 4]
or ecx, 0xffffffff
sub ecx, esi
add edx, ecx
test edx, edx
jg 0x1002e213
mov edx, dword [esp + 0x28]
sub eax, 0x10072dc0
mov esi, dword [esp + 0x14]
sar eax, 2
and eax, 1
inc eax
mov ecx, 0x7fffffff
sub ecx, eax
cmp ecx, ebx
jl 0x1002e349
add ebx, eax
cmp ebx, ebp
jle 0x1002e262
test ebp, ebp
jns 0x1002e342
lea ecx, [esp + 0x28]
call fcn.1003bfc0
mov edx, dword [esp + 0x28]
cmp edx, dword [esp + 0x2c]
jne 0x1002e1c8
mov dword [esp + 0x10], edx
mov ebp, dword [esp + 0x50]
xor edi, edi
mov eax, dword [esp + 0x48]
xor esi, esi
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x20], eax
mov al, byte [ebp + 9]
mov ebp, dword [ebp]
test al, al
movzx edx, al
mov dword [esp + 0x14], 1
cmove edx, dword [esp + 0x14]
cmp ebx, ebp
jge 0x1002e2d8
movzx eax, dl
sub eax, 1
je 0x1002e364
sub eax, 1
je 0x1002e35b
sub eax, 1
jne 0x1002e2d8
mov eax, ebp
mov esi, ebp
sub eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
sub esi, edi
sub esi, ebx
mov edx, dword [esp + 0x50]
movzx ebp, byte [edx + 0xe]
lea ebx, [edx + 0xf]
mov dword [esp + 0x50], ebp
test edi, edi
jle 0x1002e306
add ebp, ebx
nop dword [eax]
push ecx
push ebp
push ebx
call fcn.1002c600
dec edi
add esp, 0xc
mov ecx, edx
test edi, edi
jg 0x1002e2f0
mov ebp, dword [esp + 0x50]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
sub edx, eax
push ecx
add edx, eax
push edx
push eax
call fcn.1002c600
add esp, 0xc
test esi, esi
jle 0x1002e334
lea edi, [ebx + ebp]
push edx
push edi
push ebx
call fcn.1002c600
dec esi
add esp, 0xc
test esi, esi
jg 0x1002e324
mov eax, dword [esp + 0x40]
pop edi
pop esi
pop ebx
mov dword [eax], edx
pop ebp
add esp, 0x2c
ret
mov ebx, esi
jmp 0x1002e279
test ebp, ebp
jns 0x1002e279
mov ebx, 0x7fffffff
jmp 0x1002e27d
mov edi, ebp
sub edi, ebx
jmp 0x1002e2d8
mov eax, dword [esp + 0x50]
mov esi, ebp
sub esi, ebx
movzx ebp, byte [eax + 0xe]
lea ebx, [eax + 0xf]
jmp 0x1002e306