Function at 0x1004e145
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xbc
mov eax, dword [0x1030b908]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
movss xmm1, dword [0x1014e378]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xac], eax
mov eax, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp + 0x18]
push esi
mov dword [ebp - 0xa4], eax
or esi, 0xffffffff
push edi
xor eax, eax
and dword [ebp - 0xa0], 0
mov edi, ecx
mov ebx, dword [ebp + 0x10]
inc eax
mov dword [ebp - 0x90], ebx
mov ecx, dword [edi + 0x38]
shl eax, cl
dec eax
cmp dword [ebp + 0x28], 0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm1, xmm0
movss dword [ebp - 0xb8], xmm1
jle 0x1004e549
mov ecx, dword [ebp + 0x1c]
mov eax, ecx
cdq
mov dword [ebp - 0xb0], edx
mov edx, dword [ebp + 0x24]
sub ecx, edx
dec ecx
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp + 0x1c], ecx
add eax, edx
cmp dword [ebp + 0x20], 0
push 0
push dword [ebp + 0x10]
cmovne eax, ecx
cdq
push edx
push eax
call fcn.10127440
push dword [ebp - 0xb0]
push dword [ebp - 0xb4]
push edx
push eax
call fcn.10127390
xor edx, edx
div dword [ebp + 0x10]
mov eax, edx
mov dword [ebp - 0x9c], eax
cmp eax, ebx
jne 0x1004e224
mov ebx, esi
jmp 0x1004e4f4
push dword [edi + 0x40]
lea ecx, [ebp - 0x88]
call fcn.1004d5b0
mov eax, dword [edi + 0x38]
test al, 7
je 0x1004e337
mov ebx, dword [edi + 0x40]
xor edx, edx
and dword [ebp - 0x90], edx
imul ebx, eax
mov dword [ebp - 0x8c], edx
imul ebx, dword [ebp - 0x9c]
mov ecx, ebx
shr ebx, 3
add ebx, dword [ebp - 0xa8]
and ecx, 7
mov dword [ebp - 0x94], ecx
cmp dword [edi + 0x40], edx
jbe 0x1004e2e6
movss xmm1, dword [ebp - 0xb8]
cmp dword [ebp - 8], 0
lea esi, [ebp - 0x88]
push eax
cmovne esi, dword [ebp - 8]
push edx
push ecx
push ebx
call fcn.1004e8ad
mov edx, dword [ebp - 0x90]
add esp, 0x10
mov ecx, dword [ebp - 0x94]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1014e380]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
cvttss2si eax, xmm0
mov byte [esi + edx], al
mov eax, dword [edi + 0x38]
add ecx, eax
mov dword [ebp - 0x94], ecx
adc dword [ebp - 0x8c], 0
inc edx
cmp edx, dword [edi + 0x40]
mov dword [ebp - 0x90], edx
mov edx, dword [ebp - 0x8c]
jb 0x1004e279
mov eax, dword [ebp - 8]
lea esi, [ebp - 0x88]
test eax, eax
cmovne esi, eax
mov dword [ebp - 0x94], esi
mov ebx, dword [ebp - 8]
mov eax, dword [edi + 0x30]
test eax, eax
je 0x1004e467
mov ecx, edi
call fcn.100501b2
cmp dword [edi + 0x50], 0
mov dword [ebp - 0x90], eax
je 0x1004e38f
mov ecx, dword [edi + 0x30]
push eax
push 0
push 0
mov edx, dword [ecx]
lea eax, [ebp - 0x98]
push 1
push esi
push eax
call dword [edx + 0xc]
jmp 0x1004e447
mov esi, dword [ebp - 0xbc]
imul esi, dword [ebp - 0x9c]
add esi, dword [ebp - 0xa8]
mov dword [ebp - 0x94], esi
cmp eax, 0x10
jne 0x1004e2fa
xor edx, edx
cmp dword [edi + 0x40], edx
jbe 0x1004e376
cmp dword [ebp - 8], 0
lea ecx, [ebp - 0x88]
mov al, byte [esi + edx*2]
cmovne ecx, dword [ebp - 8]
mov byte [ecx + edx], al
inc edx
cmp edx, dword [edi + 0x40]
jb 0x1004e35c
mov ebx, dword [ebp - 8]
lea esi, [ebp - 0x88]
test ebx, ebx
cmovne esi, ebx
mov dword [ebp - 0x94], esi
jmp 0x1004e2fd
xor edx, edx
mov dword [ebp - 0x8c], edx
cmp dword [edi + 0x40], edx
jbe 0x1004e420
xor ebx, ebx
mov esi, dword [ebp - 8]
lea eax, [ebp - 0x88]
mov ecx, dword [edi + 0x68]
test esi, esi
cmovne eax, esi
movzx eax, byte [eax + edx]
lea edx, [ebp - 0x88]
cmovne edx, esi
xor esi, esi
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mulss xmm0, dword [ebx + ecx + 4]
addss xmm0, dword [ebx + ecx]
mulss xmm0, dword [0x1014e378]
addss xmm0, dword [0x1014e264]
cvttss2si ecx, xmm0
test ecx, ecx
movzx eax, cl
cmovs eax, esi
mov esi, 0xff
cmp ecx, esi
movzx eax, al
mov ecx, dword [ebp - 0x8c]
cmovg eax, esi
add ebx, 0x10
mov byte [edx + ecx], al
mov edx, ecx
inc edx
mov dword [ebp - 0x8c], edx
cmp edx, dword [edi + 0x40]
jb 0x1004e3a2
mov esi, dword [ebp - 0x94]
mov ebx, dword [ebp - 8]
push dword [ebp - 0x90]
mov ecx, dword [edi + 0x30]
lea edx, [ebp - 0x88]
push 0
push 0
test ebx, ebx
mov eax, dword [ecx]
cmovne edx, ebx
push 1
push edx
lea edx, [ebp - 0x98]
push edx
call dword [eax + 0xc]
movzx ebx, byte [ebp - 0x96]
mov eax, dword [ebp - 0x98]
or ebx, 0xffffff00
movzx ecx, ah
shl ebx, 8
or ebx, ecx
movzx eax, al
jmp 0x1004e47d
movzx ebx, byte [esi + 2]
movzx eax, byte [esi + 1]
or ebx, 0xffffff00
shl ebx, 8
or ebx, eax
movzx eax, byte [esi]
shl ebx, 8
or ebx, eax
cmp dword [edi + 0x5c], 0
je 0x1004e4d8
cmp dword [edi + 0x40], 3
mov edx, 0xff
mov eax, edx
jne 0x1004e4cd
cmp dword [edi + 0x38], 8
jne 0x1004e4cd
mov eax, dword [edi + 0x68]
movzx ecx, byte [esi]
cmp ecx, dword [eax + 8]
jl 0x1004e4cb
cmp ecx, dword [eax + 0xc]
jg 0x1004e4cb
movzx ecx, byte [esi + 1]
cmp ecx, dword [eax + 0x18]
jl 0x1004e4cb
cmp ecx, dword [eax + 0x1c]
jg 0x1004e4cb
movzx ecx, byte [esi + 2]
cmp ecx, dword [eax + 0x28]
jl 0x1004e4cb
cmp ecx, dword [eax + 0x2c]
jg 0x1004e4cb
xor eax, eax
jmp 0x1004e4cd
mov eax, edx
shl eax, 0x18
and ebx, 0xffffff
or ebx, eax
mov eax, dword [ebp - 0x9c]
mov esi, ebx
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x1004e4f4
push eax
call fcn.1012ef4e
pop ecx
cmp dword [ebp - 0xac], 4
mov edx, dword [ebp - 0xa4]
jne 0x1004e507
mov dword [edx], ebx
jmp 0x1004e517
mov eax, ebx
mov byte [edx], bl
shr eax, 8
shr ebx, 0x10
mov byte [edx + 1], al
mov byte [edx + 2], bl
mov eax, dword [ebp - 0xa0]
mov ecx, dword [ebp + 0x1c]
inc eax
add edx, dword [ebp - 0xac]
dec ecx
mov ebx, dword [ebp - 0x90]
mov dword [ebp - 0xa4], edx
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0xa0], eax
mov dword [ebp + 0x1c], ecx
cmp eax, dword [ebp + 0x28]
jl 0x1004e1e3
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10127041
mov esp, ebp
pop ebp
ret 0x24