Function at 0x1003a270
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [edx + 8]
mov edi, dword [edx + 4]
mov esi, ecx
mov cl, 1
lea ebx, [eax + 1]
cmp ebx, edi
mov dword [edx + 8], ebx
jae 0x1003a2ad
mov ecx, dword [edx]
movzx ecx, byte [ecx + ebx]
cmp ecx, 0x2b
je 0x1003a2a3
cmp ecx, 0x2d
mov cl, 1
jne 0x1003a2ad
xor ecx, ecx
jmp 0x1003a2a5
mov cl, 1
add eax, 2
mov ebx, eax
mov dword [edx + 8], eax
cmp ebx, edi
jae 0x1003a44e
mov eax, dword [edx]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x10], esi
mov esi, edx
lea edx, [ebx + 1]
mov dword [ebp - 0x14], esi
movzx ecx, byte [eax + ebx]
mov dword [esi + 8], edx
add cl, 0xd0
cmp cl, 0xa
jae 0x1003a46c
mov esi, dword [ebp + 0xc]
cmp edx, edi
mov dword [ebp - 0x28], esi
movzx esi, cl
jae 0x1003a34e
mov edx, dword [ebp - 0x14]
neg edi
add ebx, 2
jmp 0x1003a303
movzx ecx, cl
lea esi, [esi + esi*4]
lea esi, [ecx + esi*2]
lea ecx, [edi + ebx + 1]
inc ebx
cmp ecx, 1
je 0x1003a351
movzx ecx, byte [eax + ebx - 1]
add cl, 0xd0
cmp cl, 0xa
jae 0x1003a351
cmp esi, 0xccccccb
mov dword [edx + 8], ebx
jle 0x1003a2f0
cmp esi, 0xccccccc
jne 0x1003a328
cmp cl, 7
jbe 0x1003a2f0
mov ecx, dword [ebp - 0x28]
xor eax, eax
movzx esi, byte [ebp - 0x18]
movzx edi, byte [ebp + 8]
or ecx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x10]
sete al
push esi
push eax
push edi
call fcn.1003a8e0
add esp, 0x28
jmp 0x1003a43d
mov edx, dword [ebp - 0x14]
mov edi, dword [ebp + 0x14]
cmp byte [ebp - 0x18], 0
je 0x1003a369
lea eax, [edi + esi]
sar eax, 0x1f
add eax, 0x80000000
add edi, esi
jmp 0x1003a377
xor eax, eax
cmp edi, esi
setns al
add eax, 0x7fffffff
sub edi, esi
cmovo edi, eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
movd xmm0, eax
movd xmm1, ecx
mov eax, edi
punpckldq xmm1, xmm0
neg eax
punpckldq xmm1, xmmword [0x102cc270]
cmovs eax, edi
cmp eax, 0x135
subpd xmm1, xmmword [0x102cc280]
movapd xmm0, xmm1
unpckhpd xmm0, xmm1
addsd xmm0, xmm1
jb 0x1003a3f8
movsd xmm2, qword [0x102cc290]
xorpd xmm1, xmm1
nop word cs:[eax + eax]
nop
ucomisd xmm0, xmm1
jne 0x1003a3d8
jnp 0x1003a423
test edi, edi
jns 0x1003a48c
divsd xmm0, xmm2
add edi, 0x134
mov eax, edi
neg eax
cmovs eax, edi
cmp eax, 0x134
ja 0x1003a3d0
mov ecx, dword [0x1044efe0]
test edi, edi
movsd xmm1, qword [ecx + eax*8]
js 0x1003a442
mulsd xmm0, xmm1
ucomisd xmm0, qword [0x102cc298]
jae 0x1003a48c
movsd xmm1, qword [0x102cc2a0]
ucomisd xmm1, xmm0
jae 0x1003a48c
cmp byte [ebp + 8], 0
jne 0x1003a431
xorpd xmm0, xmmword [0x102cc2b0]
movsd qword [esi + 8], xmm0
xor eax, eax
mov dword [esi], eax
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
divsd xmm0, xmm1
cmp byte [ebp + 8], 0
je 0x1003a429
jmp 0x1003a431
lea eax, [ebp - 0x24]
mov ecx, edx
mov dword [ebp - 0x24], 5
mov edx, eax
call fcn.1003a970
mov dword [esi + 4], eax
mov dword [esi], 1
jmp 0x1003a43a
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x24]
mov dword [ebp - 0x24], 0xd
call fcn.1003a970
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 4], eax
mov dword [ecx], 1
jmp 0x1003a43a
lea eax, [ebp - 0x24]
mov ecx, edx
mov dword [ebp - 0x24], 0xe
mov edx, eax
call fcn.1003a970
mov dword [esi + 4], eax
mov eax, 1
jmp 0x1003a438